Red Hat Bugzilla – Bug 47902
rhn_register (console app) cannot find redhat-release in RPM database
Last modified: 2015-01-07 18:47:26 EST
Description of Problem:
I could not use rhn_register-1.3.1 due to another bug that you've already
fixed, so I upgraded to rhn_register-1.3.6-1. I then ran rhn_register as
root inside an xterm. It crashed, but it pointed me to the problem and I
used my mad Python skills (I don't know Python) to fix it (not the best
fix, probably, so don't expect a patch).
In /usr/share/rhn/register/rhnreg.py from 1.3.6-1, there is a call
index = db.findbyprovides("redhat-release")
that fails. I changed it to 'findbyname' and it succeeded. (You don't
check the result, so the next line's call to db[index] crashed.)
Every time with my RPM database, which is originally RH 6.2 with many
packages, e.g. rpm, upgraded.
Steps to Reproduce:
1. Go to my apartment, ... ;->
And trying it again. The error you report is indicative of
a rpm db problem caused on some upgrades. The "rpm --rebuilddb"
will fix it.