summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-arch/rpm2targz/files/rpm2targz-9.0-portability.patch')
-rw-r--r--app-arch/rpm2targz/files/rpm2targz-9.0-portability.patch29
1 files changed, 29 insertions, 0 deletions
diff --git a/app-arch/rpm2targz/files/rpm2targz-9.0-portability.patch b/app-arch/rpm2targz/files/rpm2targz-9.0-portability.patch
new file mode 100644
index 000000000000..9ab75e63685d
--- /dev/null
+++ b/app-arch/rpm2targz/files/rpm2targz-9.0-portability.patch
@@ -0,0 +1,29 @@
+--- rpm2targz 2006-04-24 14:55:23.000000000 +0200
++++ rpm2targz 2006-04-24 15:02:02.000000000 +0200
+@@ -58,7 +58,7 @@
+
+ # Determine if this is a source or binary RPM.
+ # If we have getrpmtype, use that. Otherwise, try "file".
+- if which getrpmtype 1> /dev/null 2> /dev/null; then
++ if command -v getrpmtype 1> /dev/null 2> /dev/null; then
+ if getrpmtype -n $i | grep source 1> /dev/null 2> /dev/null ; then
+ isSource=1
+ else
+@@ -73,7 +73,7 @@
+ fi
+
+ ofn=${WORKDIR}/`basename $i .rpm`.cpio
+- if $USERPM2CPIO && which rpm2cpio 1> /dev/null 2> /dev/null ; then
++ if $USERPM2CPIO && command -v rpm2cpio 1> /dev/null 2> /dev/null ; then
+ rpm2cpio $i > $ofn 2> /dev/null
+ if [ ! $? = 0 ]; then
+ echo "... rpm2cpio failed. (maybe $i is not an RPM?)"
+@@ -113,7 +113,7 @@
+ #fi
+ mkdir -p $DEST
+ ( cd $DEST
+- cpio --extract --preserve-modification-time --make-directories < $ofn 1> /dev/null 2> /dev/null
++ cpio -i -m -d < $ofn 1> /dev/null 2> /dev/null
+ rm -f $ofn
+ find . -type d -perm 700 -exec chmod 755 {} \; )
+ ( cd ${WORKDIR} ; tar cf - . ) > `basename $i .rpm`.tar