From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6876351789037256704 X-Received: by 2002:a25:d4c:: with SMTP id 73mr4133270ybn.60.1601025413546; Fri, 25 Sep 2020 02:16:53 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a25:9005:: with SMTP id s5ls925199ybl.4.gmail; Fri, 25 Sep 2020 02:16:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzKoKAUe20I9Cq8ZTPC9ZQVj/amRpaqsvsvoKHA/qD7lZtoWEOHL3naZIBsJ/WedAaT2SqD X-Received: by 2002:a25:b40a:: with SMTP id n10mr4267065ybj.497.1601025412984; Fri, 25 Sep 2020 02:16:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601025412; cv=none; d=google.com; s=arc-20160816; b=M63dl3AAGnpykaxP1Uu/y4z5KWG0lMTriRloq/UWzRJMlJT03rKaEisfZLC+YPmKyX l1HmuIdyiB7QibiJ3mmD/bNQqErnRQnHLc8eLSlUNC6/k+DS8se4PVAm+LOGdCi1nNUm FpXdH7KSzsEnYZCWh0KaPHZp80gHE6CPU+1nIbV9UN1lgOrUEg70S84zl76yMgMhf0sa yiML2O4YhxlNET5vyDe45DFGTahFc0pyha1LpSqzxoIHi+DVfCWzh5oDYqdNQc90HX3F iZW2jOQmtfHEJzbXNXTGfubGxNLNnBMZxt6Bv1NuHHv6C+sXtnuJSrm1MPFofAIDKx+Q 4xbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:ironport-sdr:ironport-sdr; bh=6vdys7TYUdgQ4KyGwocED3yoEB6feqM9q4wkpn2QnUw=; b=VGl9PCQ8Uun7lw4MP953m1Lnuo/N8Br/wA4B5D591BrWSfKc2ZNJiNQtEcbNZwD4ZS eZ6uo8CYXAw880up+ARP4zYWcRIv67qgh95AvvzVsifdX2m00nE9ZTVHjoYJ6g5o+iOz pGvGx/7OdObGgEz6gpQvw4HjC5WwmgQv77ZdXJlgzSfeLmLEgmh4d8TFc62y+/t/i8b9 oYyW7e3+jsyhNkObOeY+q4UGT28umF4IRYJv426brulxofY5n8rTwrp4K6GGLxMjkSqT H0UUic7UHkETgg9XzRWJWLOSs2+/0XXPRJlJWHQbnawVz+nFawqDTb2mfcJsbpQcI9bY sg+A== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of cedric_hombourger@mentor.com designates 68.232.129.153 as permitted sender) smtp.mailfrom=Cedric_Hombourger@mentor.com Return-Path: Received: from esa1.mentor.iphmx.com (esa1.mentor.iphmx.com. [68.232.129.153]) by gmr-mx.google.com with ESMTPS id s7si203186ybk.3.2020.09.25.02.16.52 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 25 Sep 2020 02:16:52 -0700 (PDT) Received-SPF: pass (google.com: domain of cedric_hombourger@mentor.com designates 68.232.129.153 as permitted sender) client-ip=68.232.129.153; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of cedric_hombourger@mentor.com designates 68.232.129.153 as permitted sender) smtp.mailfrom=Cedric_Hombourger@mentor.com IronPort-SDR: FnqT1xJ0fS+F7v/yZvOJynrzDbENpCJ6if51d2v/6Q3q0NXxCs3VoPi679zeJ1b1dW1s+Vs4Cx sbTfeDy3wLv6Ko3WVuW6In8ufaarNj9X2BCF7R3wuryFp7WNyHx/R1ZuWO3cS8JKA8xIgn0Bmg VYImDgjdMKBL1G4TbYrdSht5KeGjo0+Ln7lo5Uyiqh2XtwWUBpQC0CSI4fUd4rFfhZ5XIAUkyD GTltf5adGE8Xe6gYfQQQEH/xxq8L5mT9JJJNKPGIzXIl4b1/Ct0mc/1A1aC55M7+03SkxOmnqJ L7E= X-IronPort-AV: E=Sophos;i="5.77,301,1596528000"; d="scan'208";a="55505475" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa1.mentor.iphmx.com with ESMTP; 25 Sep 2020 01:16:51 -0800 IronPort-SDR: Np4W0oKrELOV/t3nAxkQDoztCk+cwz6M+nGowdWRCYJJ61PmRP2VihVOWD2gDRcvTykco445EW fhrc5AXJPdrz+Yg7UDSfh0ZDzVFyav959plUcHFu1cu6u9qt0LvYEVvtXH8TlhH1ehn4rSswuE oohWEIhYUjs4vM2Pk/9yCn3ssBOUFG1q5PDvx10cZgn3I5GadoMPKU90wAM6ckK6H/ZUFVHO0L meL8r5ljlUjzoaJBvTmi6Sslz9UcYh41ObepxEcPnVBJg+kmptCv2pxedjXbAN11t1Cxwe2Ef7 tQs= From: Cedric Hombourger To: CC: Cedric Hombourger Subject: [PATCH] buildchroot: do not mk-build-deps in ${S} Date: Fri, 25 Sep 2020 14:46:32 +0530 Message-ID: <20200925091632.43333-1-Cedric_Hombourger@mentor.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain Return-Path: Cedric_Hombourger@mentor.com X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: SVR-IES-MBX-07.mgc.mentorg.com (139.181.222.7) To svr-ies-mbx-02.mgc.mentorg.com (139.181.222.2) X-TUID: mLmPA4sZHz1o mk-build-deps may leave .changes and/or .buildinfo files behind despite use of the -r option (which seems to only remove the generated .deb file). Having new files in the source tree causes dh_clean to complain (at least when the package uses quilt to manage patches). This problem was observed while re-building some upstream bullseye packages. Since there are no requirements to execute the mk-build-deps tool from the source tree, create a temporary directory and run it from there. Signed-off-by: Cedric Hombourger --- meta/recipes-devtools/buildchroot/files/deps.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/meta/recipes-devtools/buildchroot/files/deps.sh b/meta/recipes-devtools/buildchroot/files/deps.sh index 93bc9cf..40d4a1c 100644 --- a/meta/recipes-devtools/buildchroot/files/deps.sh +++ b/meta/recipes-devtools/buildchroot/files/deps.sh @@ -34,17 +34,22 @@ if ! grep "^Architecture:" debian/control | grep -qv "all"; then fi # Install all build deps +srcdir=$(pwd) +tmpdir=$(mktemp -d) +cd ${tmpdir} if [ "$3" = "--download-only" ]; then # this will not return 0 even when it worked - mk-build-deps $set_arch -t "${install_cmd}" -i -r debian/control &> \ + mk-build-deps $set_arch -t "${install_cmd}" -i -r ${srcdir}/debian/control &> \ mk-build-deps.output || true cat mk-build-deps.output # we assume success when we find this grep "mk-build-deps: Unable to install all build-dep packages" mk-build-deps.output rm -f mk-build-deps.output else - mk-build-deps $set_arch -t "${install_cmd}" -i -r debian/control + mk-build-deps $set_arch -t "${install_cmd}" -i -r ${srcdir}/debian/control # Upgrade any already installed packages in case we are partially rebuilding apt-get upgrade -y --allow-downgrades fi +cd ${srcdir} +rm -rf ${tmpdir} -- 2.28.0