From patchwork Wed Feb 2 10:15:14 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Florian Amstutz X-Patchwork-Id: 3187 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id DC459C433EF for ; Wed, 2 Feb 2022 10:15:15 +0000 (UTC) Subject: [PATCH] devtool: deploy-target: Remove stripped binaries in pseudo context To: openembedded-core@lists.openembedded.org From: "Florian Amstutz" X-Originating-Location: Malters, Lucerne, CH (178.197.217.246) X-Originating-Platform: Windows Chrome 97 User-Agent: GROUPS.IO Web Poster MIME-Version: 1.0 Date: Wed, 02 Feb 2022 02:15:14 -0800 Message-ID: List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 02 Feb 2022 10:15:15 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/161188 deploy-target may fail the second time with "pseudo abort" because devtool-deploy-target-stripped is deleted outside of pseudo's fakeroot context. Signed-off-by: Florian Amstutz --- scripts/lib/devtool/deploy.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.25.1 diff --git a/scripts/lib/devtool/deploy.py b/scripts/lib/devtool/deploy.py index 833322571f..e14a587417 100644 --- a/scripts/lib/devtool/deploy.py +++ b/scripts/lib/devtool/deploy.py @@ -170,7 +170,7 @@ def deploy(args, config, basepath, workspace): srcdir = recipe_outdir recipe_outdir = os.path.join(rd.getVar('WORKDIR'), 'devtool-deploy-target-stripped') if os.path.isdir(recipe_outdir): -                bb.utils.remove(recipe_outdir, True) +                exec_fakeroot(rd, "rm -rf %s" % recipe_outdir, shell=True) exec_fakeroot(rd, "cp -af %s %s" % (os.path.join(srcdir, '.'), recipe_outdir), shell=True) os.environ['PATH'] = ':'.join([os.environ['PATH'], rd.getVar('PATH') or '']) oe.package.strip_execs(args.recipename, recipe_outdir, rd.getVar('STRIP'), rd.getVar('libdir'),