Bug 854209

Summary: The remote software origin name was not found
Product: [Fedora] Fedora Reporter: Martin Krizek <mkrizek>
Component: PackageKitAssignee: Richard Hughes <hughsient>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 18CC: awilliam, eliadevito, el.vujke, ffesti, hughsient, james.antill, johnny.farlane, jonathan, jreznik, kevin, kparal, ltinkl, maxamillion, packaging-team, rdieter, rhughes, robatino, rvitale, smparrish, tla, zpavlas
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: AcceptedBlocker
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-09-12 16:36:03 EDT Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Bug Depends On:    
Bug Blocks: 752654, 855509    
Attachments:
Description Flags
Log (verbose) none

Description Martin Krizek 2012-09-04 07:19:18 EDT
Description of problem:
After selecting a package(s) to be installed and putting in root password, an error shows up saying: "The remote software origin name was not found. You may need to enable an item in Software Origins.". There is no item in Software Origins. Tested on Fedora 18 Alpha TC5.

Version-Release number of selected component (if applicable):
apper-0.8.0-0.4.20120724git.fc18.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Install Fedora 18 Alpha TC5 with KDE
2. Run Apper
3. Select a package(s) to install and try to install them
  
Actual results:
"The remote software origin name was not found. You may need to enable an item in Software Origins." error shows up.

Expected results:
Selected packages are installed.
Comment 1 Martin Krizek 2012-09-04 07:21:45 EDT
Proposing as an Alpha blocker per criterion: "The installed system must be able to download and install updates with yum and the default graphical package manager in all release-blocking desktops".
Comment 2 Lukáš Tinkl 2012-09-05 07:18:48 EDT
PackageKit version?
Comment 3 Jaroslav Reznik 2012-09-05 07:55:02 EDT
I checked the bug against Gnome PackageKit and it's hit by the same bug. No items in Software Sources tab neither. Package installation does not work (no error shown). Check Now button just says "Failed: failed".

I'm going to change the component to PackageKit to get more input from maintainers.
Comment 4 Richard Hughes 2012-09-05 07:58:16 EDT
What does "pkcon repo-list" say?
Comment 5 Martin Krizek 2012-09-05 08:13:58 EDT
PackageKit-0.8.3-1.fc18.x86_64


$ pkcon repo-list
Getting repositories [=========================]
Waiting in queue [=========================]
Starting [=========================]
Downloading repository information[=========================]
Downloading list of packages [=========================]
Getting information [=========================]
Disabled updates-debuginfo Fedora 18 - x86_64 - Updates - Debug
Enabled fedora Fedora 18 - x86_64
Disabled updates-source Fedora 18 - Updates Source
Disabled updates-testing-debuginfo Fedora 18 - x86_64 - Test Updates Debug
Enabled updates-testing Fedora 18 - x86_64 - Test Updates
Enabled updates Fedora 18 - x86_64 - Updates
Disabled updates-testing-source Fedora 18 - Test Updates Source
Disabled fedora-source Fedora 18 - Source
Disabled fedora-debuginfo Fedora 18 - x86_64 - Debug
Comment 6 Jaroslav Reznik 2012-09-05 09:14:55 EDT
New observations:
After clean restart, pkcon repo-list shows the correct output as mkrizek posted, then try to do any action in Apper or Gnome app, it fails and then you get:

pkcon repo-list
Getting repositories          [=========================]         
Waiting in queue              [=========================]         
Starting                      [=========================]         
Fatal error: Failed: failed
Comment 7 Jaroslav Reznik 2012-09-05 09:18:32 EDT
pkcon install scribus
Installing                    [=========================]         
Waiting in queue              [=========================]         
Waiting for authentication    [=========================]         
Waiting in queue              [=========================]         
Starting                      [=========================]         
Running                       [=========================]         
Fatal error: cannot find repo fedora/18/x86_64
Comment 8 Jaroslav Reznik 2012-09-05 09:57:58 EDT
Created attachment 610064 [details]
Log (verbose)
Comment 9 Richard Hughes 2012-09-05 12:07:30 EDT
I can reproduce this now. Debugging...
Comment 10 Adam Williamson 2012-09-05 12:59:41 EDT
Discussed at 2012-09-05 blocker review meeting. Accepted as a blocker per criterion cited in comment #1.
Comment 11 Richard Hughes 2012-09-05 13:03:15 EDT
The following commit in yum has broken the API that PackageKit uses:

commit e42ea3dc0b02ba73a11211de4062e87abfb77a6a
Author: James Antill <james@and.org>
Date:   Mon Aug 27 16:27:44 2012 -0400

    Add .ui_id to repos. showing $releasever/$basearch. Use it for str().

PackageKit needs to know the repo for a package, and has used str(pkg.repo) to return "fedora" for the last 5 years. The yum api has changed to return "fedora/18/x86_64" which breaks PackageKit.
Comment 12 Richard Hughes 2012-09-06 04:17:09 EDT
I've committed this upstream to PackageKit:

commit c817e88c5929c3a1448f47f6e16db86eef4fbf55
Author: Richard Hughes <richard@hughsie.com>
Date:   Thu Sep 6 09:09:19 2012 +0100

    yum: Work around a yum API break so that resolving still works
    
    In e42ea3dc0b02ba73a11211de4062e87abfb77a6a yum changed the public API so that
    str(repo) returned 'fedora/18/i386' rather than just 'fedora'.
    This broke PackageKit pretty hard as the repo name is used in the package_id.
    
    Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=854209

NOTE: if the commit to yum isn't reverted and then a new yum is pushed to F16/F17 then automatic updates will break and there will be no way to recover the situation. Ideally str(repo) would continue to return repo.id, not the new fancy repo.ui_id

I'd also appreciate anyone changing public API in yum to just do a 2 second search of yumBackend.py in PackageKit. Or rather, just not change public API at all and just add new methods for new features.
Comment 13 James Antill 2012-09-06 12:09:41 EDT
str(foo) is how things are output, foo.id is the API to get just the id.
Comment 14 Fedora Update System 2012-09-07 10:01:03 EDT
PackageKit-0.8.3-2.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/PackageKit-0.8.3-2.fc18
Comment 15 Fedora Update System 2012-09-07 15:38:25 EDT
Package PackageKit-0.8.3-2.fc18:
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing PackageKit-0.8.3-2.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-13559/PackageKit-0.8.3-2.fc18
then log in and leave karma (feedback).
Comment 16 Jaroslav Reznik 2012-09-10 04:40:56 EDT
Package installation works, pkcon, Apper tested. Updates works too.
Comment 17 Richard Hughes 2012-09-10 04:46:15 EDT
(In reply to comment #13)
> str(foo) is how things are output, foo.id is the API to get just the id.

Just FYI, the yum change was reversed, so there is no pressure to push this fix into other Fedora branches:

commit 602ae1d548a8165049b55cf30ff810806c795747
Author: James Antill <james@and.org>
Date:   Fri Sep 7 15:21:01 2012 -0400

    Have str(repo) mean repo.id again, as multiple callers have assumed it.
Comment 18 Kamil Páral 2012-09-10 05:37:23 EDT
PackageKit-0.8.3-2.fc18 works as root, not as an ordinary user (at least in GNOME) - bug 855784.
Comment 19 Kamil Páral 2012-09-10 13:06:57 EDT
# journalctl -a | grep polkit
Sep 10 16:56:24 localhost dbus-daemon[411]: dbus[411]: [system] Activating via systemd: service name='org.freedesktop.PolicyKit1' unit='polkit.service'
Sep 10 16:56:24 localhost dbus[411]: [system] Activating via systemd: service name='org.freedesktop.PolicyKit1' unit='polkit.service'
Sep 10 16:56:24 localhost polkitd[475]: Started polkitd version 0.107
Sep 10 16:56:24 localhost polkitd[475]: Loading rules from directory /etc/polkit-1/rules.d
Sep 10 16:56:24 localhost polkitd[475]: Loading rules from directory /usr/share/polkit-1/rules.d
Sep 10 16:56:24 localhost polkitd[475]: Finished loading, compiling and executing 2 rules
Sep 10 16:56:24 localhost polkitd[475]: Acquired the name org.freedesktop.PolicyKit1 on the system bus
Sep 10 16:56:40 localhost polkitd[475]: Registered Authentication Agent for unix-session:1 (system bus name :1.35 [gnome-shell --mode=gdm], object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale C)
Sep 10 16:57:18 localhost polkitd[475]: Unregistered Authentication Agent for unix-session:1 (system bus name :1.35, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale C) (disconnected from bus)
Sep 10 16:57:26 localhost polkitd[475]: Registered Authentication Agent for unix-session:2 (system bus name :1.72 [/usr/bin/gnome-shell], object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8)
Sep 10 16:57:57 localhost polkitd[475]: Operator of unix-session:2 FAILED to authenticate to gain authorization for action org.freedesktop.packagekit.package-install for system-bus-name::1.81 [<unknown>] (owned by unix-user:kparal)
Sep 10 16:58:08 localhost polkitd[475]: Operator of unix-session:2 FAILED to authenticate to gain authorization for action org.freedesktop.packagekit.package-install for system-bus-name::1.82 [<unknown>] (owned by unix-user:kparal)
Sep 10 16:58:34 localhost polkitd[475]: Operator of unix-session:2 FAILED to authenticate to gain authorization for action org.freedesktop.packagekit.package-install for system-bus-name::1.84 [<unknown>] (owned by unix-user:kparal)
Comment 20 Kamil Páral 2012-09-10 13:07:28 EDT
Damn, wrong bug. Sorry, the last comment shouldn't be here.
Comment 21 Kamil Páral 2012-09-11 08:54:29 EDT
This concrete issue is fixed in F18 Alpha RC2.
Comment 22 Fedora Update System 2012-09-12 09:53:41 EDT
yum-3.4.3-44.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/yum-3.4.3-44.fc18
Comment 23 Fedora Update System 2012-09-12 15:12:18 EDT
Package yum-3.4.3-44.fc18:
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing yum-3.4.3-44.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-13862/yum-3.4.3-44.fc18
then log in and leave karma (feedback).
Comment 24 Adam Williamson 2012-09-12 15:15:39 EDT
If we pulled the yum that changes this into F18 Alpha, would we have to revert the PackageKit change?
Comment 25 Fedora Update System 2012-09-12 16:36:03 EDT
PackageKit-0.8.3-2.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 26 Kevin Kofler 2012-09-12 19:09:11 EDT
> If we pulled the yum that changes this into F18 Alpha, would we have to revert
> the PackageKit change?

No.

* The PackageKit change fixes PackageKit to use repo.id instead of str(repo).
* The yum change makes str(repo) do the same thing as repo.id again.

Either of the changes should be sufficient to fix the bug, but having both together cannot hurt.
Comment 27 Fedora Update System 2012-09-20 16:38:17 EDT
yum-3.4.3-44.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 28 Elia Devito 2013-12-15 20:11:18 EST
on Fedora 20 Beta I have this issue when I try to install a rpm from apper
Comment 29 Jeffrey 2013-12-29 14:47:28 EST
I just installed Fedora 20 (new from scratch, not an updated install) and am getting the same issue with packages I am trying to install. E.g., Firefox, Chrome, etc. I did not get this error when Fedora automatically found the system updates just after the install. It started when I starting installing new apps. Dispite the error messages tho, both Firefox and Chrome did install and are running.
Comment 30 Kevin Kofler 2013-12-29 16:40:45 EST
You're probably seeing bug #995723.