quilt: Add option QUILT_NO_RM_SYMLINKS so follow symlinks with quilt refresh
authorKhem Raj <raj.khem@gmail.com>
Fri, 9 Jul 2010 20:13:43 +0000 (13:13 -0700)
committerKhem Raj <raj.khem@gmail.com>
Sat, 10 Jul 2010 19:20:56 +0000 (12:20 -0700)
* OE now creates symlinks into metadata. This patch allows quilt to
  follow the symlinks so when a patch is refreshed then the result
  happens in the metadata location.

* Creating a new patch will still happen in local patches directory
  unless one uses path into metadata.

Signed-off-by: Khem Raj <raj.khem@gmail.com>
recipes/quilt/quilt-0.48/no_rm_symlinks.patch [new file with mode: 0644]
recipes/quilt/quilt-native.inc
recipes/quilt/quilt-native_0.48.bb
recipes/quilt/quilt.inc
recipes/quilt/quilt_0.48.bb

diff --git a/recipes/quilt/quilt-0.48/no_rm_symlinks.patch b/recipes/quilt/quilt-0.48/no_rm_symlinks.patch
new file mode 100644 (file)
index 0000000..6c8415a
--- /dev/null
@@ -0,0 +1,34 @@
+#If you're so lucky as to be using a Windriver Linux product, and your
+#patch files are actually symlinks, this option set to yes will allow
+#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
+ # Use a specific editor for quilt (defaults to the value of $EDITOR before
+ # sourcing this configuration file, or vi if $EDITOR wasn't set).
+ #EDITOR=nedit
++
++#If patch files are actually symlinks, this option set to yes will allow
++#the symlink to be preserved (resulting in the file the link is pointing to
++#to be refreshed).
++QUILT_NO_RM_SYMLINKS=yes
++
index 5c5a015..2823454 100644 (file)
@@ -1,15 +1,15 @@
 require quilt.inc
 
 SRC_URI_append_build-darwin = "?   file://non-gnu.patch "
-RDEPENDS_${PN} = "diffstat-native patch-native bzip2-native util-linux-native"
-FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/quilt-${PV}"
+RDEPENDS_${PN} = "libtimedate-perl-native diffstat-native patch-native bzip2-native util-linux-native"
 
+FILESPATHPKG =. quilt-${PV}
 INHIBIT_AUTOTOOLS_DEPS = "1"
 
 inherit autotools native
 
 PATCHTOOL = "patch"
-EXTRA_OECONF = "--disable-nls --without-date"
+EXTRA_OECONF = "--disable-nls"
 
 do_configure () {
        oe_runconf
index 45b4b3c..c36d79e 100644 (file)
@@ -1,4 +1,6 @@
 require quilt-native.inc
 
+PR="r1"
+
 SRC_URI[md5sum] = "f77adda60039ffa753f3c584a286f12b"
 SRC_URI[sha256sum] = "73fd760d3b5cbf06417576591dc37d67380d189392db9000c21b7cbebee49ffc"
index fd0d40d..a9ed163 100644 (file)
@@ -4,6 +4,8 @@ SECTION = "devel"
 LICENSE = "GPL"
 
 SRC_URI = "http://download.savannah.gnu.org/releases/quilt/quilt-${PV}.tar.gz \
-           file://install.patch"
+           file://install.patch \
+          file://no_rm_symlinks.patch \
+          "
 
 S = "${WORKDIR}/quilt-${PV}"
index aac3861..0a066df 100644 (file)
@@ -1,4 +1,6 @@
 require quilt-package.inc
 
+PR="r1"
+
 SRC_URI[md5sum] = "f77adda60039ffa753f3c584a286f12b"
 SRC_URI[sha256sum] = "73fd760d3b5cbf06417576591dc37d67380d189392db9000c21b7cbebee49ffc"