From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6740166480651878400 X-Received: by 2002:a67:73c2:: with SMTP id o185mr956997vsc.184.1569317300920; Tue, 24 Sep 2019 02:28:20 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:ab0:5e93:: with SMTP id y19ls73671uag.16.gmail; Tue, 24 Sep 2019 02:28:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqzUW3FVcLfk8s5/Pxt+pumZ9RzaPA0uisgwcYqo8rVoxZbK3i+k8mSbPKCFjqQHzRnT7rhe X-Received: by 2002:ab0:30ca:: with SMTP id c10mr319624uam.139.1569317300497; Tue, 24 Sep 2019 02:28:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569317300; cv=none; d=google.com; s=arc-20160816; b=Ueh1YBvE9MShXxu6X7rq2qBQb/SPCOHJ5pJR+kNylvOxR7p8J6MUC/LxTLSfH7ZYeR H9VvKzJ/MIJm7trTAIyYHBwDgp6jK0vmfgdAOfI0UASXSINpIpaIobCaxtHuJwmNzmfv 7g93BkYTfg9+FJdAr6BA2WMlEesxit5+PT5rLarLb8SMSOTrn69S4hJPzPc9YQriXulM D4/3jdeFwA78OUMia8rPyY3/aeXImRwQSPsZIHmp6yYVwEgWaCuRGoEvJ/0CHyw+RklI 06bdbGtQkyciOoa70L2IyHMrYHdCeU1haO8Ai202ow100WSsLf+e/4r6JL8rMR4rypwu AghQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:message-id:date:subject:cc:to:from:ironport-sdr :ironport-sdr; bh=bT1WuosN/wlx7XGWz/mrNgPZlHib54VGCVFoq25pD7w=; b=g0kHmq5PSfMTAGdQsTjstWay9T35O4iuV3C2b8ChnCkaMxfbbviZbauXB5zOLuJ9HJ dnA5Jv3EG7mml4VwS2XM6s1r9SLbbxk88LzYlEdmbXa7SrZ4TAg/AIXXle29O1fzahYA J337eKxI5IAcH7vSkN64GAHfel5UduqEPvUXitQKnfLpWMwxAMQl3i3pqSjMWV+JILX+ yCJaZVzSWM5SejghCfttnrHPsDBWSklT1GEqlPkK5XNrxIMsr1EqBswRMbsV+E6C+PNy podKcc0ySkk0f20jmC6yHGPEbzs74u8TSwlJJDubTmXCYDJyyoTtGhsZQDOgTeHOJzYq zjkg== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of cedric_hombourger@mentor.com designates 68.232.141.98 as permitted sender) smtp.mailfrom=Cedric_Hombourger@mentor.com Return-Path: Received: from esa2.mentor.iphmx.com (esa2.mentor.iphmx.com. [68.232.141.98]) by gmr-mx.google.com with ESMTPS id u65si94227vsb.0.2019.09.24.02.28.20 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Sep 2019 02:28:20 -0700 (PDT) Received-SPF: pass (google.com: domain of cedric_hombourger@mentor.com designates 68.232.141.98 as permitted sender) client-ip=68.232.141.98; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of cedric_hombourger@mentor.com designates 68.232.141.98 as permitted sender) smtp.mailfrom=Cedric_Hombourger@mentor.com IronPort-SDR: UYyHW7t/Naku/DKA2o1T7OEcZk0Gh7hqh/i79Kk9Qieh0LQg6mplvaNjuUAFHtCIUdFRArgEvU 5rbwoFnvQq97Ej6xJszJj4HMRz9kHjQNSUM3smPTdpQ9bSwoyIkmLGEQ2BT5OvIW/bCCRslfEB OpLocPQgCyY9JE2CM/rJH3pG2dHBdH/AIGEEZIv9eULlmFulQVcw+YeXW6xnP9SH1XFPqap+zz RP12xHiJWJ/4Z9AOihSeyE4BRQLmBNarZrTLFiOMjdDW0ayIWJpUhe9s9jJkJ0q/ilSlX8iFY6 E6U= X-IronPort-AV: E=Sophos;i="5.64,543,1559548800"; d="scan'208";a="41579287" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa2.mentor.iphmx.com with ESMTP; 24 Sep 2019 01:27:56 -0800 IronPort-SDR: SODbbPkt7b7yaxK7euoQIcGz5ybCec6Tkpks2c+sdHNJ60xUhGp3PNUgDaGC6nhjl223Zxto/3 RTlP+ApzmkIEt3Aek1KuiLGkiQiU0Xq0CsuZRSht9vLn+67zrswXS7xrB1mn50aSF+ps8hjKuD tUkN4EHWZ6B/W5K1/vEnXFWxFh028GaCJxodsA+WvSirnoDOv0146di9pmUH8/gij+aHP2wGbP 3tO2JHP9InBRxSXPnZAx4io2LEeOViUBoEe68uvRaTUgiBhJUX0gKLAfb2Qeyv/0nOQZMPvB+V fQ4= From: Cedric Hombourger To: CC: Cedric Hombourger Subject: [PATCH] dpkg-base: clean should not fail for recipes that were never built Date: Tue, 24 Sep 2019 11:27:22 +0200 Message-ID: <1569317242-233-1-git-send-email-Cedric_Hombourger@mentor.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 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: zNXUCJm+MYjZ 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} ) -- 2.11.0