Bug 1328975 - if multiple packages are added to sack, hawkey sets location to None
Summary: if multiple packages are added to sack, hawkey sets location to None
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: hawkey
Version: 25
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: rpm-software-management
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-04-20 19:12 UTC by Daniel Mach
Modified: 2017-03-10 10:52 UTC (History)
5 users (show)

Fixed In Version: libdnf-0.7.1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-03-10 10:52:16 UTC
Type: Bug


Attachments (Terms of Use)

Description Daniel Mach 2016-04-20 19:12:52 UTC
If multiple packages are added to sack, hawkey sets location to None.


Reproducer:

d = dnf.base.Base(...)
d.fill_sack(load_system_repo=False, load_available_repos=False)

pkg = d.add_remote_rpm(<path>)
print pkg.location
> /path/to/rpm

pkg = d.add_remote_rpm(<path>)
print pkg.location
> None


Version:
python-hawkey-0.6.3-1.git.0.08f4354.fc23.x86_64
libsolv-0.6.20-1.fc23.x86_64
python2-dnf-1.1.8-1.git.0.3c4b0a3.fc23.noarch

Comment 1 Daniel Mach 2016-04-20 19:17:23 UTC
This also affects accessing pkg.header:

print pkg.header
Traceback (most recent call last):
...
  File "/usr/lib/python2.7/site-packages/dnf/package.py", line 78, in header
    return dnf.rpm.header(self.localPkg())
  File "/usr/lib/python2.7/site-packages/dnf/rpm/__init__.py", line 56, in header
    with open(path) as package:
TypeError: coercing to Unicode: need string or buffer, NoneType found

Comment 2 Honza Silhan 2016-04-25 11:37:09 UTC
we'll take a look

Comment 3 Michal Luscon 2016-05-03 17:36:07 UTC
Fixed in https://github.com/rpm-software-management/libhif/pull/115/commits

Comment 4 Fedora Admin XMLRPC Client 2016-07-08 09:24:24 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 5 Jan Kurik 2016-07-26 05:01:05 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 25 development cycle.
Changing version to '25'.

Comment 6 Jaroslav Mracek 2017-03-10 10:52:16 UTC
Fixed in libdnf-0.7.1-1 and released into rawhide


Note You need to log in before you can comment on or make changes to this bug.