% rpm2cpio < kdebase-1.1.2-33.src.rpm > kdebase-1.1.2-33.src.cpio cannot re-open payload: Success % ls -l ... -rw-r--r-- 1 jgotts users 0 May 25 19:18 kdebase-1.1.2-33.src.cpio
I don't believe this is a bug. For instance this will always fail: [root@king /]# rpm2cpio < kdebase-1.1.2-31.src.rpm > kdebase-1.1.2-31.src.rpm.cpio cannot re-open payload: Success [root@king /]# l kdebase* -rw-r--r-- 1 root root 6171478 May 29 15:08 kdebase-1.1.2-31.src.rpm -rw-r--r-- 1 root root 0 May 29 15:12 kdebase-1.1.2-31.src.rpm.cpio This always works: [root@king /]# rpm2cpio kdebase-1.1.2-31.src.rpm > kdebase-1.1.2-31.src.rpm.cpio [root@king /]# l kdebase* -rw-r--r-- 1 root root 6171478 May 29 15:08 kdebase-1.1.2-31.src.rpm -rw-r--r-- 1 root root 6230340 May 29 15:13 kdebase-1.1.2-31.src.rpm.cpio -Stan Bubrouski
Well, the currently [in Red Hat Linux 6.2] nonworking form had worked for well over a year, dating back at least to 5.x and including 6.0 and perhaps 6.1 as well. I wouldn't rule out the possibility that the feature was removed for some reason, though.
The manual page still shows the old reading-from-stdin form. So there must be a bug either in the program or in the manpage.
Clearly there is a bug. Right now I believe the fix will be to change the man page, but I'll take a look at fixing rpm2cpio. Meanwhile, either add the file name on the command line, or add the token '-' to indicate stdin.
This problem will be addressed after rpm-4.0 is released.
Here's the current man page: DESCRIPTION rpm2cpio converts the .rpm file specified as a single argument to a cpio archive on standard out. If a '-' argument is given, an rpm stream is read from standard in. rpm2cpio rpm-1.1-1.i386.rpm rpm2cpio - < glint-1.0-1.i386.rpm