Bug 1226329
Summary: | Debian "Packages.gz" generation error. File not parseable with Debian 8 | ||||||
---|---|---|---|---|---|---|---|
Product: | [Community] Spacewalk | Reporter: | Robert Paschedag <robert.paschedag> | ||||
Component: | Server | Assignee: | Michael Mráka <mmraka> | ||||
Status: | CLOSED EOL | QA Contact: | Red Hat Satellite QA List <satqe-list> | ||||
Severity: | high | Docs Contact: | |||||
Priority: | unspecified | ||||||
Version: | 2.2 | CC: | cperry, goetz.dirk, hlawatschek, tony | ||||
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: | 2019-10-21 12:11:10 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
Robert Paschedag
2015-05-29 13:06:15 UTC
Note: it looks the package capabilities are parsed incorrectly. I suppose, the operator should not be a part of the version entry: # select * from rhnPackageCapability where version like '>%'; id | name | version | created | modified ---------+---------+---------+-------------------------------+------------------------------- 5961575 | libc6_0 | >=2.7 | 2015-06-01 10:38:42.641241+02 | 2015-06-01 10:38:42.641241+02 Then there should either be another field within the DB to hold the operator or - meybe easier, the operator and version be separated with a " " When I read the code right, then the "deb822.py" file in /usr/lib/python2.6/site-packages/debian writes the version string correct. ... def str(rels): """Format to string structured inter-package relationships Perform the inverse operation of parse_relations, returning a string suitable to be written in a package stanza. """ def pp_arch(arch_spec): (excl, arch) = arch_spec if excl: return arch else: return '!' + arch def pp_atomic_dep(dep): s = dep['name'] if dep.get('version') is not None: s += ' (%s %s)' % dep['version'] if dep.get('arch') is not None: s += ' [%s]' % ' '.join(map(pp_arch, dep['arch'])) return s pp_or_dep = lambda deps: ' | '.join(map(pp_atomic_dep, deps)) return ', '.join(map(pp_or_dep, rels)) So the "space" character seems to be stripped away somewhere else. Regards, Robert (In reply to Robert Paschedag from comment #2) > Then there should either be another field within the DB to hold the operator There is. See: schema/spacewalk/common/tables/rhnPackageBreaks.sql schema/spacewalk/common/tables/rhnPackageConflicts.sql schema/spacewalk/common/tables/rhnPackageEnhances.sql schema/spacewalk/common/tables/rhnPackageObsoletes.sql schema/spacewalk/common/tables/rhnPackagePredepends.sql schema/spacewalk/common/tables/rhnPackageProvides.sql schema/spacewalk/common/tables/rhnPackageRecommends.sql schema/spacewalk/common/tables/rhnPackageRequires.sql schema/spacewalk/common/tables/rhnPackageSuggests.sql schema/spacewalk/common/tables/rhnPackageSupplements.sql it's the 'sense' column. That's why I suppose, the debian package capabilities get incorrectly parsed. (It's possible, they're written incorrectly as well, but the primary issue I see here is the parsing.) Made a pull request to introduce a workaround (not a real fix) that just puts a space character between the operator and the version number if an operator is found within a "version" string. Only when generating the Packages.gz file. https://github.com/spacewalkproject/spacewalk/pull/266 Regards, Robert I can confirm this workaround works and would like to see this merged until a proper fix is found. Regards, Dirk Another attempt to fix this bug: https://github.com/spacewalkproject/spacewalk/pull/399 Spacewalk 2.8 (and older) has already reached it's End Of Life. Thank you for reporting this issue and we are sorry that we were not able to fix it before end of life. If you would still like to see this bug fixed and are able to reproduce it against current version of Spacewalk 2.9, you are encouraged change the 'version' and re-open it. |