From 61522645a1ccc8342706960efe90896001e94a8b Mon Sep 17 00:00:00 2001 From: Alex Kiernan Date: Thu, 2 Aug 2018 14:42:29 +0000 Subject: net-tools: Ensure quilt only operates on local patches 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 Signed-off-by: Richard Purdie --- meta/recipes-extended/net-tools/net-tools_1.60-26.bb | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/meta/recipes-extended/net-tools/net-tools_1.60-26.bb b/meta/recipes-extended/net-tools/net-tools_1.60-26.bb index 5657fd8c5b..a4e3285cdb 100644 --- a/meta/recipes-extended/net-tools/net-tools_1.60-26.bb +++ b/meta/recipes-extended/net-tools/net-tools_1.60-26.bb @@ -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 -- cgit v1.2.3