> It appears that the listings produced by RPM are unreliable. The code that
> you recently uncommented (I hope that you had tested it):
> 
> rpm -qlvp "$1" | sed -e 's/^\(..........\)[-t]* /\1 1 /'
> 
> doesn't work with rpm-4.0.2 because it already prints "1" (link count)
> after the premission. Adding another "1" makes the listing unparseable.

RPM is such a piece of badly maintained code (even worse than mc, that
is;-)

Yes, I did test it.  It works perfectly on RH 6.1 and RH 7.2 with rpm
3.0.5, I guess 4.0.2 decided to break things *again* (not to mention
that rpm keeps breaking source, binary and database compatiblity on
pretty much every release).

> I can't think of any reliable way to deal with both listing types without
> risking to have another breakage in the future. I think it would be better
> to use rpm2cpio, since the output of cpio is more standartized:
> 
> rpm2cpio "$1" | cpio -tv --quiet
> 
> I'm checking it in since the fix appears to be correct. I'm also checking
> in a fix that make it possible to access CONTENTS.cpio - it was placed
> after "*" and thus had no chance to match.

Thanks, that sounds like the right thing to do Pavel.

Miguel

Reply via email to