Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
DescriptionAlexander Todorov
2009-06-23 13:54:03 UTC
Description of problem:
Installing cobbler-1.6.2-1.fc11.noarch
/usr/lib64/python2.6/site-packages/Cheetah/CacheRegion.py:30: DeprecationWarning: the md5 module is deprecated; use hashlib instead
import md5
error: cannot open Packages index using db3 - No such file or directory (2)
error: cannot open Packages database in /var/lib/rpm
error: cannot open Packages database in /var/lib/rpm
invalid literal for float(): n
File "/usr/lib/python2.6/site-packages/cobbler/cobbler.py", line 83, in main
rc = BootCLI().run(sys.argv)
File "/usr/lib/python2.6/site-packages/cobbler/cobbler.py", line 45, in __init__
self.api = api.BootAPI(is_cobblerd=False)
File "/usr/lib/python2.6/site-packages/cobbler/api.py", line 101, in __init__
self.os_version = utils.os_release()
File "/usr/lib/python2.6/site-packages/cobbler/utils.py", line 776, in os_release
version = float(version[0])
Version-Release number of selected component (if applicable):
cobbler-1.6.2-1.fc11.noarch
How reproducible:
Steps to Reproduce:
1. @everything install
2.
3.
Actual results:
Expected results:
Additional info:
The DeprecationWarning is reported in bug #507614. It's no likely that they are duplicates.
Moving to releng. Do we have two cobbler packages in the tree???
Comment 3Dennis Gregorovic
2009-06-23 17:25:01 UTC
The %post script is trying to call "rpm -q --qf "%{NAME}-%{VERSION}-%{RELEASE} --whatprovides redhat-release". The call is failing somehow, leading to the traceback when it tries to parse the error message as an RPM version string. Querying rpm from a %post script is not guaranteed to work. I would say this is a cobbler bug.
I've never seen this happen in regular use with RPM or yum.
Any special Reproduction details?
AFAIK, this would be from condrestart in %post and that needing to check the package version, which has, so far, seemed to have worked. That being said we could remove the condrestart and change it to a /stop/, though leaving the current version running is not a good idea.
calling rpm in a scriptlet will sometimes work -- basically there's racing between the rpm running the transaction and the rpm run inside the scriptlet. Note that they may be completely different versions of rpm (e.g. in the build system).
Regardless, calling rpm from a scriptlet should be avoided if at all possible.
Is there no other way to check the package version? Run a cli tool with -V? Look in an installed file?
Description of problem: Installing cobbler-1.6.2-1.fc11.noarch /usr/lib64/python2.6/site-packages/Cheetah/CacheRegion.py:30: DeprecationWarning: the md5 module is deprecated; use hashlib instead import md5 error: cannot open Packages index using db3 - No such file or directory (2) error: cannot open Packages database in /var/lib/rpm error: cannot open Packages database in /var/lib/rpm invalid literal for float(): n File "/usr/lib/python2.6/site-packages/cobbler/cobbler.py", line 83, in main rc = BootCLI().run(sys.argv) File "/usr/lib/python2.6/site-packages/cobbler/cobbler.py", line 45, in __init__ self.api = api.BootAPI(is_cobblerd=False) File "/usr/lib/python2.6/site-packages/cobbler/api.py", line 101, in __init__ self.os_version = utils.os_release() File "/usr/lib/python2.6/site-packages/cobbler/utils.py", line 776, in os_release version = float(version[0]) Version-Release number of selected component (if applicable): cobbler-1.6.2-1.fc11.noarch How reproducible: Steps to Reproduce: 1. @everything install 2. 3. Actual results: Expected results: Additional info: The DeprecationWarning is reported in bug #507614. It's no likely that they are duplicates.