From 1f373112f4f957e70f8346e152d321dba76bdc2b Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Fri, 9 Jul 2010 13:13:43 -0700 Subject: 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. Signed-off-by: Khem Raj --- 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 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 index 0000000000..6c8415acad --- /dev/null +++ b/recipes/quilt/quilt-0.48/no_rm_symlinks.patch @@ -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 ++ diff --git a/recipes/quilt/quilt-native.inc b/recipes/quilt/quilt-native.inc index 5c5a0153cc..282345422c 100644 --- a/recipes/quilt/quilt-native.inc +++ b/recipes/quilt/quilt-native.inc @@ -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 diff --git a/recipes/quilt/quilt-native_0.48.bb b/recipes/quilt/quilt-native_0.48.bb index 45b4b3c51b..c36d79ef82 100644 --- a/recipes/quilt/quilt-native_0.48.bb +++ b/recipes/quilt/quilt-native_0.48.bb @@ -1,4 +1,6 @@ require quilt-native.inc +PR="r1" + SRC_URI[md5sum] = "f77adda60039ffa753f3c584a286f12b" SRC_URI[sha256sum] = "73fd760d3b5cbf06417576591dc37d67380d189392db9000c21b7cbebee49ffc" diff --git a/recipes/quilt/quilt.inc b/recipes/quilt/quilt.inc index fd0d40dc57..a9ed163bf6 100644 --- a/recipes/quilt/quilt.inc +++ b/recipes/quilt/quilt.inc @@ -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}" diff --git a/recipes/quilt/quilt_0.48.bb b/recipes/quilt/quilt_0.48.bb index aac3861872..0a066dfcc0 100644 --- a/recipes/quilt/quilt_0.48.bb +++ b/recipes/quilt/quilt_0.48.bb @@ -1,4 +1,6 @@ require quilt-package.inc +PR="r1" + SRC_URI[md5sum] = "f77adda60039ffa753f3c584a286f12b" SRC_URI[sha256sum] = "73fd760d3b5cbf06417576591dc37d67380d189392db9000c21b7cbebee49ffc" -- cgit 1.2.3-korg