screwed up rpm - how do I recover
Michal Jaegermann
michal at harddata.com
Sun Aug 22 17:27:07 UTC 2004
On Sun, Aug 22, 2004 at 12:53:04PM -0400, sean darcy wrote:
>
> rpm2cpio doesn't work, so I can't install using cpio.
Hm ...
> Is the a tool to extract rpm files that doesn't depend on rpm being
> installed?
An rpm archive is really a header followed by an attached cpio
archive compressed with bzip2 or gzip. So a simple way to extract
it is to search to a "magic" of a compressed blob and pipe bytes
from that moment on through an uncompressor and cpio. A slightly
primitive, as a "magic signature" could be in theory found
accidentally earlier in a header, but in practice really effective.
Some years ago I wrote myself such extractor in literally few lines
of perl. I am afraid that I do not know now where I stuck it if it
is still around. I have seen also something like that done in bash.
Not very difficult.
Michal
More information about the fedora-test-list
mailing list