Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=frugalware-current.git;a=commitdiff;h=b031dffa63dfe01036deffcc5dce7500f8fd080c

commit b031dffa63dfe01036deffcc5dce7500f8fd080c
Author: Miklos Vajna <vmik...@frugalware.org>
Date:   Sat May 29 15:12:30 2010 +0200

util.sh: restore old default in __Fpatch

it was -p1 then commit bf2be8e8862dde0d92d2fce8b65dfc5bc1f8a252
unintentionally changed it to 0, now fix this bug.

diff --git a/source/include/util.sh b/source/include/util.sh
index c46a921..91fa692 100644
--- a/source/include/util.sh
+++ b/source/include/util.sh
@@ -604,20 +604,20 @@ Fcleandestdir() {
}

###
-# * __Fpatch(): Internal. Apply a patch with -p0 (or -p1 if -p0 fails).
+# * __Fpatch(): Internal. Apply a patch with -p1 (or -p0 if -p1 fails).
# Parameter: Patch to apply.
###
__Fpatch() {
-       local level="0"
-       if ! patch -Np0 --dry-run -i "$Fsrcdir/$1" >/dev/null; then
-               if ! patch -Np1 --dry-run -i "$Fsrcdir/$1"; then
+       local level="1"
+       if ! patch -Np1 --dry-run -i "$Fsrcdir/$1" >/dev/null; then
+               if ! patch -Np0 --dry-run -i "$Fsrcdir/$1"; then
return 1
fi
-               level="1"
+               level="0"
fi
-       # if we are here, the patch applied with -p1, so it's no good
+       # if we are here, the patch applied with -p0, so it's no good
# showing the output again
-       if [ "$level" = 1 ]; then
+       if [ "$level" = 0 ]; then
patch -Np$level --no-backup-if-mismatch -i "$Fsrcdir/$1" >/dev/null || Fdie
else
patch -Np$level --no-backup-if-mismatch -i "$Fsrcdir/$1" || Fdie
_______________________________________________
Frugalware-git mailing list
Frugalware-git@frugalware.org
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to