rpm5 & ts.hdrFromFdno from .hdr file

Elan Ruusamäe glen at pld-linux.org
Sat May 18 12:54:03 CEST 2013

seems the .hdr files that yum/anaconda creates are not parseable by rpm5 
on the same system:

# python hdr.py blockdev-2.22.2-4.i686.hdr
['hdr.py', 'blockdev-2.22.2-4.i686.hdr']
Traceback (most recent call last):
   File "hdr.py", line 50, in <module>
     h = returnHeaderFromPackage(sys.argv[1])
   File "hdr.py", line 11, in returnHeaderFromPackage
     hdr = hdrFromPackage(ts, rpmfile)
   File "hdr.py", line 29, in hdrFromPackage
     raise rpmUtils.RpmUtilsError, "RPM Error opening Package: [%s]" %e
rpmUtils.RpmUtilsError: RPM Error opening Package: [error reading 
package header]

# python hdr.py blockdev-2.22.2-4.i686.rpm
['hdr.py', 'blockdev-2.22.2-4.i686.rpm']
<rpm.hdr object at 0xb73ff0f0>

xxd.diff contains diff of hex dump of both packages without offsets

# tar cf rpm5-hdr.tar hdr.py blockdev-2.22.2-4.i686.hdr 
blockdev-2.22.2-4.i686.rpm xxd.diff

above tar is available from here to debug:


More information about the pld-devel-en mailing list