rpm5 & ts.hdrFromFdno from .hdr file

Jeffrey Johnson n3npq at me.com
Mon May 20 19:32:40 CEST 2013


On May 20, 2013, at 4:54 AM, Elan Ruusamäe wrote:

> On 05/19/2013 01:53 AM, Jeffrey Johnson wrote:
>> So what is the exact issue you are trying to solve? AFAIK anaconda
>> tools cannot read a header using rpm-python from RPM5?
> rpm/python-rpm/yum/anaconda from pld can not read .hdr file that yum/anaconda writes (the code that writes was also posted in my earlier posts)
> 
> the same .hdr file is readable in fc18, fc18 creates the same identical .hdr file (the samples should be visible in my earlier posts). i tested with pld and fedora rpm's both ways.
> 

I have looked at your xxd diff. 

--- blockdev-2.22.2-4.i686.hdr.xxd      2013-05-18 13:34:14.478680653 +0300
+++ blockdev-2.22.2-4.i686.rpm.xxd      2013-05-18 13:34:14.482014000 +0300
...
@@ -471,4 +494,582 @@
  0000 0001 2890 2800 7dc7 3000 5250 4d35  ....(.(.}.0.RPM5
  6874 7470 3a2f 2f62 7567 732e 706c 642d  http://bugs.pld-
  6c69 6e75 782e 6f72 672f 0000 0000 3f00  linux.org/....?.
- 0000 07ff fffb e000 0000 10              ...........
+ 0000 07ff fffb e000 0000 105d 0000 8000  ...........]....
+ ffff ffff ffff ffff 0018 0ddd 0463 9c72  .............c.r
+ 1b76 a1c0 28f1 7658 30b2 3563 7c82 b8e3  .v..(.vX0.5c|...

This isn't too surprising since you are comparing a header to a package dump.

Meanwhile most (if not all) of the header is identical to the same portion in the package.

The start:end section in the package is an unloaded header.

Any differences in the exported hdr file are yum/anaconda changes through python-rpm
bindings or usage.

header load/unload operations are performed on every database access: there
is no reason whatsoever to suspect the rpm implementation.

> the read call i narrowed it down that is giving None in pld and an object in fc was rpm.readHeaderListFromFile
> 

Comparing a dump of the working fc18 with the non-working header file to ensure data is identical.

If the data is identical, then the next step is to look at readHeaderListFromFile. Note "list":
with a single header, you are not going to be able to test a list (and there are likely differences
in behavior there since concatenated headers in a single file haven't been used anywhere
I know of for nearly a decade.)

hth

73 de Jeff

> -- 
> glen
> 
> _______________________________________________
> pld-devel-en mailing list
> pld-devel-en at lists.pld-linux.org
> http://lists.pld-linux.org/mailman/listinfo/pld-devel-en



More information about the pld-devel-en mailing list