Bug 1021087

Summary: traceback during download after a transaction with obsoletes
Product: [Fedora] Fedora Reporter: Michal Schmidt <mschmidt>
Component: dnfAssignee: Ales Kozumplik <akozumpl>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 20CC: akozumpl, jzeleny, menzinoah, nicolas.mailhot, pnemade, rholy
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: dnf-0.4.5-1.fc20 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-11-10 07:54:28 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Michal Schmidt 2013-10-19 08:54:34 UTC
Description of problem:
"dnf update" gets confused by Obsoletes in some packages and attempts to replace a package by itself. Eventually it hits a traceback due to an attempt to install a package from a repo called "@System".

Version-Release number of selected component (if applicable):
dnf-0.4.4-1.fc20.noarch
hawkey-0.4.3-1.fc20.x86_64
librepo-1.2.1-3.bc2c8a5.fc20.x86_64
rpm-4.11.1-7.fc20.x86_64

How reproducible:
always

Steps to Reproduce:
1. Start with having the following packages installed:
     iasl-20120913-7.fc19.x86_64
     acpica-tools-20130823-2.fc20.x86_64

   Note that this build of acpica-tools has "Obsoletes: iasl < 20120913-7",
   which is not high enough to obsolete the currently installed iasl.

   Also note that a new build of acpica-tools is available in the repositories:
   acpica-tools-20130823-5.fc20. This one has bumped the obsoletes to
   "Obsoletes: iasl < 20120913-8", which should get rid of my currently
   installed iasl.
2. dnf update

Actual results:
Resolving dependencies
--> Starting dependency resolution
---> Package iasl.x86_64 20120913-7.fc19 will be obsoleted
---> Package acpica-tools.x86_64 20130823-2.fc20 will be upgraded
---> Package acpica-tools.x86_64 20130823-2.fc20 will be an upgrade
--> Finished dependency resolution


Dependencies resolved.

===============================================================================
 Package       Arch            Version                  Repository        Size
===============================================================================
Upgrading:
 iasl          x86_64          20120913-7.fc19          @System          1.3 M
     replacing  iasl.x86_64 20120913-7.fc19

Transaction Summary
===============================================================================
Upgrade  1 Package

Total download size: 1.3 M
Is this ok [y/N]: y
Downloading Packages:
Traceback (most recent call last):
  File "/bin/dnf", line 35, in <module>
    main.user_main(sys.argv[1:], exit_code=True)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 272, in user_main
    errcode = main(args)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 64, in main
    return _main(base, args)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 187, in _main
    return_code, resultmsgs = base.do_transaction()
  File "/usr/lib/python2.7/site-packages/dnf/cli/cli.py", line 185, in do_transaction
    self.download_callback_total_cb)
  File "/usr/lib/python2.7/site-packages/dnf/yum/base.py", line 1024, in download_packages
    remote_pkgs = filter(lambda po: not (po.from_cmdline or po.repo.local), pkglist)
  File "/usr/lib/python2.7/site-packages/dnf/yum/base.py", line 1024, in <lambda>
    remote_pkgs = filter(lambda po: not (po.from_cmdline or po.repo.local), pkglist)
  File "/usr/lib/python2.7/site-packages/dnf/package.py", line 109, in repo
    return self.yumbase.repos[self.reponame]
KeyError: '@System'


Expected results:
"yum update" gives more sensible results:

Resolving Dependencies
--> Running transaction check
---> Package acpica-tools.x86_64 0:20130823-2.fc20 will be updated
---> Package acpica-tools.x86_64 0:20130823-5.fc20 will be obsoleting
---> Package iasl.x86_64 0:20120913-7.fc19 will be obsoleted
--> Finished Dependency Resolution
--> Finding unneeded leftover dependencies
Found and removing 0 unneeded dependencies

Dependencies Resolved

===============================================================================
 Package           Arch        Version              Repository            Size
===============================================================================
Installing:
 acpica-tools      x86_64      20130823-5.fc20      updates-testing      683 k
     replacing  iasl.x86_64 20120913-7.fc19

(and yum would go on to update successfully)

Comment 1 Ales Kozumplik 2013-10-20 05:52:51 UTC
*** Bug 1021100 has been marked as a duplicate of this bug. ***

Comment 2 Ales Kozumplik 2013-10-20 05:53:36 UTC
*** Bug 1021158 has been marked as a duplicate of this bug. ***

Comment 3 Ales Kozumplik 2013-10-20 06:15:20 UTC
Thanks for the report and a great reproducer Michael. This seems to have been broken by (the rather large) initial py3 support patch, f475a20eb2a0dbefffee863af1bd6645cc2a7354.

Looking to fix this now.

Comment 4 Ales Kozumplik 2013-10-20 06:57:11 UTC
Fixed by e589b84, will try to do the build ASAP.

Comment 5 Fedora Update System 2013-10-20 12:12:29 UTC
dnf-0.4.5-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/dnf-0.4.5-1.fc20

Comment 6 Fedora Update System 2013-10-20 17:45:26 UTC
Package dnf-0.4.5-1.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing dnf-0.4.5-1.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-19539/dnf-0.4.5-1.fc20
then log in and leave karma (feedback).

Comment 7 Fedora Update System 2013-11-10 07:54:28 UTC
dnf-0.4.5-1.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.