Bug 1185432
| Summary: | Running rhn_reg fails with a TypeError exception | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Bernd Zeimetz <bzed> | ||||
| Component: | rhn-client-tools | Assignee: | Miroslav Suchý <msuchy> | ||||
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
| Severity: | unspecified | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | rawhide | CC: | msuchy, mzazrivec | ||||
| Target Milestone: | --- | ||||||
| Target Release: | --- | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2015-01-26 09:35:18 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: | |||||||
| Attachments: |
|
||||||
|
Description
Bernd Zeimetz
2015-01-23 17:42:38 UTC
After digging trough the code I found the installTime function in rhn-client-tools/src/up2date_client/debUtils.py:
def installTime(pkg_name):
path = '/var/lib/dpkg/info/%s.list' % pkg_name
if os.path.isfile(path):
return os.path.getmtime(path)
else:
return None
which returns None if there is no .list file for a given package name.
Problem here is the multiarch implementation, without testing I think correct would be this:
def installTime(pkg_name, arch=None):
paths = ['/var/lib/dpkg/info/%s.list' % (pkg_name,)]
if arch:
paths.append('/var/lib/dpkg/info/%s:%s.list' % (pkg_name, arch))
for path in paths:
if os.path.isfile(path):
return os.path.getmtime(path)
return None
getInstalledPackageList needs to call installTime(pkg.name, pkg.installed.architecture) then.
Created attachment 983659 [details]
patch from debian
Yes. This was fixed in db80b5977366f73243ed7014c808c70c97959650 on Wed Jul 17 15:40:47 2013 +0200 And fixed in rhn-client-tools-2.0.1-1 I believe Bend that I sent you private email with tar.gz link and ask about new release of rhn-client-tools in Debian. Here is recent tar.gz of new rhn-client-tools: https://fedorahosted.org/releases/s/p/spacewalk/rhn-client-tools-2.3.5.tar.gz which would require recent rhnlib: https://fedorahosted.org/releases/s/p/spacewalk/rhnlib-2.5.72.tar.gz Which I *hope* is enough. |