Skip to contentSkip to conversation

quilt: Add option QUILT_NO_RM_SYMLINKS so follow symlinks with quilt refresh

PATCH In review Khem Raj 2 participants 3 messages Jul 9, 2010 – Aug 28, 2010

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/1 quilt: Add option QUILT_NO_RM_SYMLINKS so follow symlinks with quilt refresh

* 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.

---
 recipes/quilt/quilt-0.48/no_rm_symlinks.patch |   34 +++++++++++++++++++++++++
 recipes/quilt/quilt-native.inc                |    6 ++--
 recipes/quilt/quilt-native_0.48.bb            |    2 +
 recipes/quilt/quilt.inc                       |    4 ++-
 recipes/quilt/quilt_0.48.bb                   |    2 +
 5 files changed, 44 insertions(+), 4 deletions(-)
 create mode 100644 recipes/quilt/quilt-0.48/no_rm_symlinks.patch
recipes/quilt/quilt-0.48/no_rm_symlinks.patch new file +34 -0
new file mode 100644
index 0000000..6c8415a
@@ -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
++
recipes/quilt/quilt-native.inc +3 -3
index 5c5a015..2823454 100644
@@ -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
recipes/quilt/quilt-native_0.48.bb +2 -0
index 45b4b3c..c36d79e 100644
@@ -1,4 +1,6 @@
 require quilt-native.inc
 
+PR="r1"
+
 SRC_URI[md5sum] = "f77adda60039ffa753f3c584a286f12b"
 SRC_URI[sha256sum] = "73fd760d3b5cbf06417576591dc37d67380d189392db9000c21b7cbebee49ffc"
recipes/quilt/quilt.inc +3 -1
index fd0d40d..a9ed163 100644
@@ -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}"
recipes/quilt/quilt_0.48.bb +2 -0
index aac3861..0a066df 100644
@@ -1,4 +1,6 @@
 require quilt-package.inc
 
+PR="r1"
+
 SRC_URI[md5sum] = "f77adda60039ffa753f3c584a286f12b"
 SRC_URI[sha256sum] = "73fd760d3b5cbf06417576591dc37d67380d189392db9000c21b7cbebee49ffc"
Signature · 1 line
1.7.1
#1 lore raw
Quoted 2 lines · Khem Raj

++ if [ "$QUILT_NO_RM_SYMLINKS" != "yes" ]

I'd suggest:

          if [ -L "$filename" -a "$QUILT_NO_RM_SYMLINKS" != "yes" ]
Signature · 5 lines
Christopher Larson
clarson at kergoth dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics
author
#2 lore raw
Quoted 8 lines · Chris Larson
Quoted 2 lines · Khem Raj

++          if [ "$QUILT_NO_RM_SYMLINKS" != "yes" ]

I'd suggest:
         if [ -L "$filename" -a "$QUILT_NO_RM_SYMLINKS" != "yes" ]

yes seems nice. I will prepare a patch unless you beat me.

Quoted 11 lines

--
Christopher Larson
clarson at kergoth dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel