From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6740166480651878400 X-Received: by 2002:aa7:dad3:: with SMTP id x19mr2108846eds.59.1569324327538; Tue, 24 Sep 2019 04:25:27 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a17:907:4420:: with SMTP id om24ls341811ejb.2.gmail; Tue, 24 Sep 2019 04:25:27 -0700 (PDT) X-Google-Smtp-Source: APXvYqz87Kcsl3BMoWMXK+4yoKldEAOIlmDaOA8wMPvAXNPI32m3Fz0yCbEOy1fkro7+Emcx4kUN X-Received: by 2002:a17:906:8c8:: with SMTP id o8mr2008823eje.56.1569324327020; Tue, 24 Sep 2019 04:25:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569324327; cv=none; d=google.com; s=arc-20160816; b=Jo+B43m8bvG5S1Co0BWKLlj01YLJ11OglY/KRILG6P3RhUAQ19VUxTNmvS5LKMEU3h DPG1ZY62LmUk0Ob1eOvLkJ0DxrDdwfEOCjs9GtP5TelcWW2FLiZM4G7xemB5kvsz+gY3 C7y4+DeGeYSm7BC7VBNUTH5xcERe+eL7CviTvSo4Lf8Hq8L5HAXk4nxBcs/3YHnRhV7J r1z/W8oiyIhiuEhySYbEMpCycDbcgA5b0cSv+MiQp3jYsapzfMlNmLbNIDRKF0elN+cR N/LtyM1Rh4ajQkKhZCpHWYhxBIjkU1SOMzKcj8fXqtq4uOYPBTPDx8maEtBEiwNfQJnt fHQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:content-language:in-reply-to:mime-version :user-agent:date:message-id:from:references:to:subject; bh=c7K8IgpQkaxpctdfQA9RYxInhc15nMSl6ouf+6gOX1E=; b=OfUEmbrU8HueyNzzkr5VDKkSLatLoB/qmaS6ldD/etnvLp+PCHxSjtjt+zyChT6eWk 4Wstgm9V6SICjhX2AhgZIMh+jeo8PvLXdLes+Lop2lO0T26f0hG4oH2W9pBG30WcDVi0 +hZKLH737DgMmBWkwXA517H2R24/1yNiBhUlhmuTBDkPiQsA7i8cZQi7LhOas3niNV32 yVCSVfDXOZk8oG7t4OsSMW9/A3VHy13RGHpS4FP1q/uw/hNVVbZ8onrvkMQZ5uJgF3q6 OkQrVHn66PD4411XMzYyk1tpu0hgn5b89eTuOvgK5j+bXJi2E2CRRQJ7X+/pNDjuwpM9 T5/A== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of jan.kiszka@siemens.com designates 194.138.37.39 as permitted sender) smtp.mailfrom=jan.kiszka@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Return-Path: Received: from lizzard.sbs.de (lizzard.sbs.de. [194.138.37.39]) by gmr-mx.google.com with ESMTPS id y11si110843edq.1.2019.09.24.04.25.25 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Sep 2019 04:25:25 -0700 (PDT) Received-SPF: pass (google.com: domain of jan.kiszka@siemens.com designates 194.138.37.39 as permitted sender) client-ip=194.138.37.39; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of jan.kiszka@siemens.com designates 194.138.37.39 as permitted sender) smtp.mailfrom=jan.kiszka@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Received: from mail1.sbs.de (mail1.sbs.de [192.129.41.35]) by lizzard.sbs.de (8.15.2/8.15.2) with ESMTPS id x8OBPP5Y032393 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 24 Sep 2019 13:25:25 +0200 Received: from [139.25.68.37] (md1q0hnc.ad001.siemens.net [139.25.68.37] (may be forged)) by mail1.sbs.de (8.15.2/8.15.2) with ESMTP id x8OBPPIm017459; Tue, 24 Sep 2019 13:25:25 +0200 Subject: Re: [PATCH] dpkg-base: clean should not fail for recipes that were never built To: Cedric Hombourger , isar-users@googlegroups.com References: <1569317242-233-1-git-send-email-Cedric_Hombourger@mentor.com> From: Jan Kiszka Message-ID: <5cbceba2-bfd9-b7ec-eb19-a319b8953950@siemens.com> Date: Tue, 24 Sep 2019 13:25:21 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <1569317242-233-1-git-send-email-Cedric_Hombourger@mentor.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-TUID: NfQzp4WwM7J9 On 24.09.19 11:27, Cedric Hombourger wrote: > Running bitbake -c clean will fail on the find command and print > error messages to the console if the work directory does not exist (e.g. > if the recipe was never built). Silent errors from the find command > and ignore any failures (the list of .deb will be expanded to the empty > string and the clean command will then do nothing (as expected)). > > Signed-off-by: Cedric Hombourger > --- > meta/classes/dpkg-base.bbclass | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/meta/classes/dpkg-base.bbclass b/meta/classes/dpkg-base.bbclass > index b336cc6..019ae77 100644 > --- a/meta/classes/dpkg-base.bbclass > +++ b/meta/classes/dpkg-base.bbclass > @@ -100,7 +100,7 @@ do_build() { > CLEANFUNCS += "repo_clean" > > repo_clean() { > - DEBS=$( find ${S}/.. -maxdepth 1 -name "*.deb" ) > + DEBS=$( find ${S}/.. -maxdepth 1 -name "*.deb" 2>/dev/null || true ) > if [ -n "${DEBS}" ]; then > for d in ${DEBS}; do > p=$( dpkg-deb --show --showformat '${Package}' ${d} ) > That was basically v1 of my patch. We now have v2 queued [1]. BTW, test feedback on [2] is always appreciated! Jan [1] https://groups.google.com/d/msgid/isar-users/5820c57407b213762f4979a4b8070f9cb8eac681.1569176231.git.jan.kiszka%40siemens.com [2] https://groups.google.com/d/msgid/isar-users/706182d3-eda9-2bbc-f8d0-722c787efddb%40siemens.com -- Siemens AG, Corporate Technology, CT RDA IOT SES-DE Corporate Competence Center Embedded Linux