summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2005-08-22 23:02:18 +0000
committerMike Frysinger <vapier@gentoo.org>2005-08-22 23:02:18 +0000
commit202be9f9a57c84baed58ff1768a43c3c379ab0e4 (patch)
tree87e8d583294f091c9bac7ba8eee8c437728f0a40 /app-arch/rpm2targz/files/rpm2targz-9.0-rpm2tar.patch
parentm68k/sh love (diff)
downloadgentoo-2-202be9f9a57c84baed58ff1768a43c3c379ab0e4.tar.gz
gentoo-2-202be9f9a57c84baed58ff1768a43c3c379ab0e4.tar.bz2
gentoo-2-202be9f9a57c84baed58ff1768a43c3c379ab0e4.zip
Add support for dumping rpms to a tar file and skipping the slow gzip stage.
(Portage version: 2.0.51.22-r2)
Diffstat (limited to 'app-arch/rpm2targz/files/rpm2targz-9.0-rpm2tar.patch')
-rw-r--r--app-arch/rpm2targz/files/rpm2targz-9.0-rpm2tar.patch41
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