From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6876351789037256704 X-Received: by 2002:aca:1006:: with SMTP id 6mr972785oiq.2.1601026403112; Fri, 25 Sep 2020 02:33:23 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a05:6830:85:: with SMTP id a5ls578591oto.10.gmail; Fri, 25 Sep 2020 02:33:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw0Qf8As55aOX66lub1qRiexWphdHh9Nq8LUCxhzJUWjCHf5KD9CXu8ABS+TNW9cHOJaFJv X-Received: by 2002:a9d:490a:: with SMTP id e10mr2318068otf.325.1601026402695; Fri, 25 Sep 2020 02:33:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601026402; cv=none; d=google.com; s=arc-20160816; b=YSdjtuMRcbEGS477Gdf00DaZqPOpqJHNNvIPFFcE/Odib+JBnK3nEQ/TsKwi/GrZxw KsYEqM87W+weT67SknhMcPv/2WvPZvCh175f7oCIqQW518lVgZiETCCcpPUkY3gLqSak 0vf+BEStCFEeyfyq67xHrvXbHi+rzad/fmVV7M2UBQQqO+vVgxVQH4mtNDvxPRvdbS0o aslv//d54p6e5BY4D1GqGzPNoIQgnbJ6TH7UvAP6E8KwIYdONyKS/kckNEetZAW0JVT/ aoEnyohNFN1eSMhKbAggZLyN2FsOe5S10xgixmKNfClLv/1GXffi7Lun0ovfK+8aou53 FtiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-language:content-transfer-encoding:in-reply-to:mime-version :user-agent:date:message-id:from:cc:references:to:subject :ironport-sdr:ironport-sdr; bh=tqACenuV497XakEDoe/VEiozw2bBRl+vSuhmefgtEos=; b=u9X0LqBdKCZY66hmpVtINJk0ymXlTC7wN80DtrForjifWlp+QKJ+noMM3i4b7aZGGM U7/0kIYA98AfnExm5OvuUM0uZn092DmpU+oeXJKp3JVFhWW98a51pfroMAXMiBZGAmQz y38QFKUysBnONS12wLLaEy4IO8zcBpOgv0UjB0R59s9pAesbCwlKLeixzDCdDpPvc/yA drMlzcc5m873x6mMFLZulrE3+nkn7DJc9c1qAnY7l86JiVvhgAnb+TgcvlhDvEp6ZEiD AKKxEdR9d3T6OnL3ocpav40IXSKAIxXh5niVzeS9/S5wydnNv6a9wq65KIenoFDNvhta QReA== 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 o22si234305otk.2.2020.09.25.02.33.22 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 25 Sep 2020 02:33:22 -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: h6NUf+68elqWnoa0o6eoSueRmwx6UdbLl+4vctRRSklFTI2F0bo+ZpFx3BIMhaPEJZ3pbPFYmK owWHc1IagWLBqWklvJoWrxjNXCJT5jUOKwEC28eUVHWE1j54EMYHyZyAUf4MdmOfP97mTrzipk xkIVUrIrDUYATEQONm+x/kJTb/xyd9HPfnLTA0ZESu45mxHkvNwEysNVsUM0yI/FOUDfoBGfUc ZGugfHkRNqF990wm3mMQgOK2u8XS2ADuy2+B71CwwT3wTl+/rF75MvZGt3GrzBgI0RTGVgVVtC liw= X-IronPort-AV: E=Sophos;i="5.77,301,1596528000"; d="scan'208";a="55505830" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa1.mentor.iphmx.com with ESMTP; 25 Sep 2020 01:33:21 -0800 IronPort-SDR: SxD+t5ZFVv51IFDUrT+FCjQS+c07aPMgNoQwKfr7Vp82Qin5OB3eivH4XmcSM5jg7bSh514xoC XIL5lF/H3w8pEy40hZ59OIAJHwJZZgUcrhHHta7MXNd+iJ8sY7ZxcJoOb2EUatm4lDUQXH+Gw6 vojViVsdyx16uj/RzNnD8xBAeUu5BGyvokOk9xZ9NLkqKWgN5AVsu9CvNUF87AxaUiCwWnrh6E hnfI6XF+MR2XM7g9wU3ElvR1iLNIzb7EGb6EB3oKHXT5ex1FdgUIaO+fzAuu3rnLu3jYbXBv9W gJ8= Subject: Re: [PATCH] buildchroot: do not mk-build-deps in ${S} To: Cedric Hombourger References: <20200925091632.43333-1-Cedric_Hombourger@mentor.com> CC: isar-users From: Cedric Hombourger Message-ID: Date: Fri, 25 Sep 2020 11:33:15 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.2.2 MIME-Version: 1.0 In-Reply-To: <20200925091632.43333-1-Cedric_Hombourger@mentor.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Return-Path: cedric_hombourger@mentor.com X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) To svr-ies-mbx-02.mgc.mentorg.com (139.181.222.2) X-TUID: CTo26BHW6nta just found that Jan already posted something rather similar https://groups.google.com/g/isar-users/c/FUC6QGcKD8Y/m/dr95lm2pAgAJ I should have re-checked the mailing list before submitting (I wanted to ci-build.sh this change before submitting) One difference though is the use of a temp directory and no relative paths (I did not want to make any assumptions about the file-system view we get when we enter the buildchroot) We definitely want either patches applied so we can get more people to start porting their projects to bullseye! If we go with Jan's, we should definitely address the comment from Henning (i.e. changing "cd .." to something more adequate) Cedric On 9/25/2020 11:16 AM, Cedric Hombourger wrote: > 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}