diff options
Diffstat (limited to 'app-arch/rpm2targz/files/rpm2targz-9.0-rpm2tar.patch')
-rw-r--r-- | app-arch/rpm2targz/files/rpm2targz-9.0-rpm2tar.patch | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/app-arch/rpm2targz/files/rpm2targz-9.0-rpm2tar.patch b/app-arch/rpm2targz/files/rpm2targz-9.0-rpm2tar.patch new file mode 100644 index 000000000000..2dee633816f6 --- /dev/null +++ b/app-arch/rpm2targz/files/rpm2targz-9.0-rpm2tar.patch @@ -0,0 +1,41 @@ +Add support for turning rpm's into tar's and skipping the gzip stage ... +Much faster on slower boxes and useful when you just want to rip apart +a rpm and look at the insides. + +--- rpm2targz ++++ rpm2targz +@@ -35,6 +35,7 @@ + exit 1 + fi + ++BASENAME="`basename $0`" + if [ "$1" = "" ]; then + echo "$0: Converts RPM format to standard GNU tar + GNU zip format." + if [ -e /etc/slackware-version ]; then +@@ -44,8 +45,10 @@ + fi + echo + echo "Usage: $0 <file.rpm>" +- if [ "`basename $0`" = "rpm2tgz" ]; then ++ if [ "$BASENAME" = "rpm2tgz" ]; then + echo " (Outputs \"file.tgz\")" ++ elif [ "$BASENAME" = "rpm2tar" ]; then ++ echo " (Outputs \"file.tar\")" + else + echo " (Outputs \"file.tar.gz\")" + fi +@@ -118,9 +121,11 @@ + rm -f $ofn + find . -type d -perm 700 -exec chmod 755 {} \; ) + ( cd ${WORKDIR} ; tar cf - . ) > `basename $i .rpm`.tar +- gzip -9 `basename $i .rpm`.tar +- if [ "`basename $0`" = "rpm2tgz" ]; then +- mv `basename $i .rpm`.tar.gz `basename $i .rpm`.tgz ++ if [ "$BASENAME" != "rpm2tar" ]; then ++ gzip -9 `basename $i .rpm`.tar ++ if [ "$BASENAME" = "rpm2tgz" ]; then ++ mv `basename $i .rpm`.tar.gz `basename $i .rpm`.tgz ++ fi + fi + ( rm -rf "${WORKDIR}/*" ) + echo |