]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
net-tools: Ensure quilt only operates on local patches
authorAlex Kiernan <alex.kiernan@gmail.com>
Thu, 2 Aug 2018 14:42:29 +0000 (14:42 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 7 Aug 2018 11:12:55 +0000 (12:12 +0100)
When net-tools is built and the local patches haven't been applied, then
`quilt pop -a` will climb parent directories attempting to find a
{patches/.pc} directory; if this succeeds then we end up popping off
some completely unrelated patches from a parent directory.

Ensure that we do have a local patches directory and then turn off the
directory climbing so that we avoid this problem.

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-extended/net-tools/net-tools_1.60-26.bb

index 5657fd8c5ba888a2ac780c18f5a5ddc96530b4c5..a4e3285cdb6cb074c503cef4dbbc2410e3da6bda 100644 (file)
@@ -48,7 +48,16 @@ PARALLEL_MAKE = ""
 # up all previously applied patches in the start
 nettools_do_patch() {
        cd ${S}
-       quilt pop -a || true
+       # it's important that we only pop the existing patches when they've
+       # been applied, otherwise quilt will climb the directory tree
+       # and reverse out some completely different set of patches
+       if [ -d ${S}/patches ]; then
+               # whilst this is the default directory, doing it like this
+               # defeats the directory climbing that quilt will otherwise
+               # do; note the directory must exist to defeat this, hence
+               # the test inside which we operate
+               QUILT_PATCHES=${S}/patches quilt pop -a
+       fi
        if [ -d ${S}/.pc-nettools ]; then
                rm -rf ${S}/.pc
                mv ${S}/.pc-nettools ${S}/.pc