quilt-0.48: Check if file is a symlink before deleting.
authorKhem Raj <raj.khem@gmail.com>
Sat, 25 Sep 2010 06:34:18 +0000 (23:34 -0700)
committerKhem Raj <raj.khem@gmail.com>
Sat, 25 Sep 2010 17:33:52 +0000 (10:33 -0700)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
recipes/quilt/quilt-0.48/no_rm_symlinks.patch
recipes/quilt/quilt.inc

index 6c8415a..7b36d28 100644 (file)
@@ -3,23 +3,6 @@
 #the symlink to be preserved (resulting in the file the link is pointing to
 #to be refreshed).
 
---- quilt-0.48.orig/quilt/scripts/patchfns.in.org      2010-07-09 11:35:07.992300000 -0700
-+++ quilt-0.48/quilt/scripts/patchfns.in       2010-07-09 11:41:01.312300001 -0700
-@@ -783,7 +783,13 @@ cat_to_new_file()
- {
-       local filename="$1"
--      [ -e "$filename" ] && rm -f "$filename"
-+      if [ -e "$filename" ]
-+      then
-+          if [ "$QUILT_NO_RM_SYMLINKS" != "yes" ]
-+          then
-+              rm -f "$filename"
-+          fi
-+      fi
-       case "$filename" in
-       *.gz)
 --- quilt-0.48.orig/quilt.quiltrc.org  2010-07-09 11:45:07.582300001 -0700
 +++ quilt-0.48/quilt.quiltrc   2010-07-09 11:46:35.222300001 -0700
 @@ -29,3 +29,9 @@ QUILT_PATCHES_PREFIX=yes
 +#to be refreshed).
 +QUILT_NO_RM_SYMLINKS=yes
 +
+--- quilt-0.48/quilt/scripts/patchfns.in.org   2010-09-24 23:18:14.055834001 -0700
++++ quilt-0.48/quilt/scripts/patchfns.in       2010-09-24 23:20:07.365834001 -0700
+@@ -783,7 +783,10 @@ cat_to_new_file()
+ {
+       local filename="$1"
+-      [ -e "$filename" ] && rm -f "$filename"
++      if [ -L "$filename" -a "$QUILT_NO_RM_SYMLINKS" != "yes" ]
++      then
++         rm -f "$filename"
++        fi
+       case "$filename" in
+       *.gz)
index ac657fb..f214f79 100644 (file)
@@ -2,7 +2,7 @@ DESCRIPTION = "Tool to work with series of patches."
 HOMEPAGE = "http://savannah.nongnu.org/projects/quilt/"
 SECTION = "devel"
 LICENSE = "GPL"
-INC_PR = "r5"
+INC_PR = "r6"
 
 SRC_URI = "http://download.savannah.gnu.org/releases/quilt/quilt-${PV}.tar.gz \
            file://install.patch \