From patchwork Sun Aug 16 11:12:01 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Dubois-Briand X-Patchwork-Id: 95443 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 9BFF4C5DF66 for ; Sun, 16 Aug 2026 11:12:25 +0000 (UTC) Received: from smtpout-02.galae.net (smtpout-02.galae.net [185.246.84.56]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.8062.1786878738152537106 for ; Sun, 16 Aug 2026 04:12:19 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@bootlin.com header.s=dkim header.b=FVw9d9MQ; spf=pass (domain: bootlin.com, ip: 185.246.84.56, mailfrom: mathieu.dubois-briand@bootlin.com) Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-02.galae.net (Postfix) with ESMTPS id 86AA11A1699 for ; Sun, 16 Aug 2026 11:12:16 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 524B560352 for ; Sun, 16 Aug 2026 11:12:16 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id A6AC911C4F8EC; Sun, 16 Aug 2026 13:12:11 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1786878731; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=bZzc7mgrxhonpCumgecnEZY/bON/Eb4RCdIAY/tDS1k=; b=FVw9d9MQXbjM7SXz5t7xE/fr04d75UNk4vJ6ZR0vi/Aed7nwva77UECuoe1R0c2z1Q2o1E Z2Uu6Zsrd5G07nDQDxaemXdJ6fJRnP5+3sUwAAFy979w7SDIykR3+W5IYalVGdOAJKLdKY gIsmLE/ZH9SyfrTGKxIxaH7DVMbWKBu+5t2xxBl5zcXWEgssh/gzBzYgdEXZ/Aft0hJXol JGQoJKmN7WMTyY04c56Al8P4jNhH/1px0tEWkUAWOwUb+nYXoxPLg5Bpb3VJ+e21ljH3yB FHp3XTWzx7naKxSfpTfdAdDPleyBgWgX6fb4rZ11UhWiZ6ukOC9zz3PCOq/x+Q== From: Mathieu Dubois-Briand Date: Sun, 16 Aug 2026 13:12:01 +0200 Subject: [PATCH v2 1/4] scripts: scriptutils: Use LicenseRef-RecipetoolTransient LICENSE while fetching MIME-Version: 1.0 Message-Id: <20260816-mathieu-devtool-v2-1-13c943abf48e@bootlin.com> References: <20260816-mathieu-devtool-v2-0-13c943abf48e@bootlin.com> In-Reply-To: <20260816-mathieu-devtool-v2-0-13c943abf48e@bootlin.com> To: openembedded-core@lists.openembedded.org Cc: Thomas Petazzoni , Mathieu Dubois-Briand X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1786878726; l=1460; i=mathieu.dubois-briand@bootlin.com; s=20241219; h=from:subject:message-id; bh=j4d88wbc0W+yV4GGCYHHIjcggPx5wT1EbCDbZvOFXq8=; b=+oX8y2XIZ54o+O+QrHYJGlA3caKZ1EaLQDEa4yKuiuMA903rv/6cCJW0D0zkkyQ3sDRaRkETo 7PuHbKz2ZvLBp8EJzD5YO/ZgY3LQKeBehjfDKQQbNBwTzKLUp+7qhYd X-Developer-Key: i=mathieu.dubois-briand@bootlin.com; a=ed25519; pk=1PVTmzPXfKvDwcPUzG0aqdGoKZJA3b9s+3DqRlm0Lww= X-Last-TLS-Session-Version: TLSv1.3 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Sun, 16 Aug 2026 11:12:25 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/243517 Switching away of the "CLOSED" license, as devtool users would encounter deprecation warnings on "devtool add" command. Signed-off-by: Mathieu Dubois-Briand --- meta/files/common-licenses/RecipetoolTransient | 1 + scripts/lib/scriptutils.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/meta/files/common-licenses/RecipetoolTransient b/meta/files/common-licenses/RecipetoolTransient new file mode 100644 index 000000000000..3c59fbb8a580 --- /dev/null +++ b/meta/files/common-licenses/RecipetoolTransient @@ -0,0 +1 @@ +Recipetool transient license. diff --git a/scripts/lib/scriptutils.py b/scripts/lib/scriptutils.py index 32e749dbb1a2..33e197a22cc7 100644 --- a/scripts/lib/scriptutils.py +++ b/scripts/lib/scriptutils.py @@ -170,7 +170,7 @@ def fetch_url(tinfoil, srcuri, srcrev, destdir, logger, preserve_tmp=False, mirr logger.debug('Generating initial recipe %s for fetching' % fetchrecipe) with open(fetchrecipe, 'w') as f: # We don't want to have to specify LIC_FILES_CHKSUM - f.write('LICENSE = "CLOSED"\n') + f.write('LICENSE = "LicenseRef-RecipetoolTransient"\n') # We don't need the cross-compiler f.write('INHIBIT_DEFAULT_DEPS = "1"\n') # We don't have the checksums yet so we can't require them From patchwork Sun Aug 16 11:12:02 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Dubois-Briand X-Patchwork-Id: 95444 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 80781C5B572 for ; Sun, 16 Aug 2026 11:12:25 +0000 (UTC) Received: from smtpout-02.galae.net (smtpout-02.galae.net [185.246.84.56]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.8195.1786878742949343071 for ; Sun, 16 Aug 2026 04:12:23 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@bootlin.com header.s=dkim header.b=VRmPlJ3S; spf=pass (domain: bootlin.com, ip: 185.246.84.56, mailfrom: mathieu.dubois-briand@bootlin.com) Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-02.galae.net (Postfix) with ESMTPS id 25BDA1A1699 for ; Sun, 16 Aug 2026 11:12:21 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id E8B2760352 for ; Sun, 16 Aug 2026 11:12:20 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 4382111C4F8ED; Sun, 16 Aug 2026 13:12:16 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1786878736; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=qpTufYMXq9F0UJn0RTTZxXdz9sDlxmpuQ4RwHKD/ARs=; b=VRmPlJ3S0rigI4i3F50J5Wt0ci0eZ+NrsTtYS5gxM7kmb7xHIcUSrM33AX/wUH7Rqgt1Gt SL/IBJSKKJjl2M+lDxbXoS0fgG2zKIT3bvxcK90SFYnRk9rULPRzrDWixxl8mIaQiwEtX9 8ZxRNlUwpTYFn6yVcnnnc/HGIjYeDKU6TSS5o1Uo5K5S+pC+YraWpjcDcGGv8mSDOZGbSh XbFD6xpsJZHI5yNKZ2WNSRnFV30KNC1+cxpVOngCWktgMy3o6eMMn47ez3z5k5QHMdv/YB yDX/pbgdVy1aoykkri8veIv00xnVgZzag4QOlTW+clkCguoY+6iymMuvCKvDNw== From: Mathieu Dubois-Briand Date: Sun, 16 Aug 2026 13:12:02 +0200 Subject: [PATCH v2 2/4] devtool: standard: Fix file copy on finish --force MIME-Version: 1.0 Message-Id: <20260816-mathieu-devtool-v2-2-13c943abf48e@bootlin.com> References: <20260816-mathieu-devtool-v2-0-13c943abf48e@bootlin.com> In-Reply-To: <20260816-mathieu-devtool-v2-0-13c943abf48e@bootlin.com> To: openembedded-core@lists.openembedded.org Cc: Thomas Petazzoni , Mathieu Dubois-Briand X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1786878726; l=1714; i=mathieu.dubois-briand@bootlin.com; s=20241219; h=from:subject:message-id; bh=yUK/LgBcIWxIY4gjbgMQFd0CHmME/sZz4yW/gciCVl0=; b=sGleVxoj1oUM6d9Zzl4qkUngniwGBd25jsMWoY5/4o8aeu0X5UVnGCr3CDDftrtLhBHfkUiiZ ughgMaZvPRBCAsg0Bkjf2n41Luvf0zqozUbsVZbFBlI5duv73vOEdC4 X-Developer-Key: i=mathieu.dubois-briand@bootlin.com; a=ed25519; pk=1PVTmzPXfKvDwcPUzG0aqdGoKZJA3b9s+3DqRlm0Lww= X-Last-TLS-Session-Version: TLSv1.3 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Sun, 16 Aug 2026 11:12:25 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/243518 Fix "devtool finish --force" command, by allowing to copy folders that were not previously existing but also by preventing it from trying to remove non-existent files. Devtool was particularly confused when using the finish subcommand on a recipe that was just added. Fixes: ce8190c51905: devtool: Drop oe-local-files and simplify Signed-off-by: Mathieu Dubois-Briand --- scripts/lib/devtool/standard.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py index 9b2643604d1d..536411efef6a 100644 --- a/scripts/lib/devtool/standard.py +++ b/scripts/lib/devtool/standard.py @@ -1461,13 +1461,17 @@ def _export_local_files(srctree, rd, destdir, srctreebase): if os.path.exists(os.path.join(fullfile, ".git")): # submodules handled elsewhere continue - if f not in existing_files: + if f not in existing_files and os.path.exists(fullfile): added[f] = {} + parentdir = os.path.normpath(os.path.join(destdir, f, os.pardir)) + if not os.path.isdir(parentdir): + os.makedirs(parentdir) + if os.path.isdir(os.path.join(srctree, f)): shutil.copytree(fullfile, os.path.join(destdir, f)) else: shutil.copy2(fullfile, os.path.join(destdir, f)) - elif not os.path.exists(fullfile): + elif f in existing_files and not os.path.exists(fullfile): removed[f] = existing_files[f] elif f in existing_files: updated[f] = {'path' : existing_files[f]} From patchwork Sun Aug 16 11:12:03 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Dubois-Briand X-Patchwork-Id: 95445 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 A9DADC5B572 for ; Sun, 16 Aug 2026 11:12:35 +0000 (UTC) Received: from smtpout-02.galae.net (smtpout-02.galae.net [185.246.84.56]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.8197.1786878747274751308 for ; Sun, 16 Aug 2026 04:12:27 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@bootlin.com header.s=dkim header.b=iPfWMAFp; spf=pass (domain: bootlin.com, ip: 185.246.84.56, mailfrom: mathieu.dubois-briand@bootlin.com) Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-02.galae.net (Postfix) with ESMTPS id A48001A1699 for ; Sun, 16 Aug 2026 11:12:25 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 7394260352 for ; Sun, 16 Aug 2026 11:12:25 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id D346511C4F8F2; Sun, 16 Aug 2026 13:12:20 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1786878741; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=r6v1rfyuKdORjoYVOSB2s+b/swiH2xUB96JW5eKc0Wo=; b=iPfWMAFpLK8yWNECrvdphWNyuq8DtanKUIEg9VDE0OhL8PWklMVnUIietZwDHShzxTxKSN EX0QFWPqFTbhr/TFO7ntUuUnj3RzX9MCEO6BpQOKmY0jQSm3YBOewPgtdBhbDoKzAcjvI+ V2z2IQ1XR7ODis92hndco4rpBBoC3KK43/j1FCJah1W9iDP7CrXIaW9t89JBa/ovq1Fsen 4Y1UlWOA66AY9V75ZnupciGCkfDB+kuVbD+rcydMYYWjfgboxs1nk68dhC+Qh7zZWI7l1C Hhu4hDfOk4GsjIl89+u7SiyguEjKhOlySohELB/0roqza3UJNqEcGPYCybJmOQ== From: Mathieu Dubois-Briand Date: Sun, 16 Aug 2026 13:12:03 +0200 Subject: [PATCH v2 3/4] devtool: standard: Remove unused variable MIME-Version: 1.0 Message-Id: <20260816-mathieu-devtool-v2-3-13c943abf48e@bootlin.com> References: <20260816-mathieu-devtool-v2-0-13c943abf48e@bootlin.com> In-Reply-To: <20260816-mathieu-devtool-v2-0-13c943abf48e@bootlin.com> To: openembedded-core@lists.openembedded.org Cc: Thomas Petazzoni , Mathieu Dubois-Briand X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1786878726; l=650; i=mathieu.dubois-briand@bootlin.com; s=20241219; h=from:subject:message-id; bh=+Wju/4eH8CWan/wj0wFWT8fbc3XB3N604uwp6C95OAM=; b=ZAKjU+G6teauFSWfC9YvCXtaH5YQdu8aurxARb7eCSO/2AuOKA0qMPfYvZOd+b3ztSBbblO/u 6RXINhKnkt9BmfZt6JJKwkqkmbJtAYBme+UBQXruIb5EZ9Wm57kjIU4 X-Developer-Key: i=mathieu.dubois-briand@bootlin.com; a=ed25519; pk=1PVTmzPXfKvDwcPUzG0aqdGoKZJA3b9s+3DqRlm0Lww= X-Last-TLS-Session-Version: TLSv1.3 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Sun, 16 Aug 2026 11:12:35 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/243519 Signed-off-by: Mathieu Dubois-Briand --- scripts/lib/devtool/standard.py | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py index 536411efef6a..ac9e7cd61a58 100644 --- a/scripts/lib/devtool/standard.py +++ b/scripts/lib/devtool/standard.py @@ -1437,7 +1437,6 @@ def _export_local_files(srctree, rd, destdir, srctreebase): # recipe space). existing_files = oe.recipeutils.get_recipe_local_files(rd) - new_set = None updated = OrderedDict() added = OrderedDict() removed = OrderedDict() From patchwork Sun Aug 16 11:12:04 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Dubois-Briand X-Patchwork-Id: 95446 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 88ACDC5DF66 for ; Sun, 16 Aug 2026 11:12:35 +0000 (UTC) Received: from smtpout-02.galae.net (smtpout-02.galae.net [185.246.84.56]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.8198.1786878751971172520 for ; Sun, 16 Aug 2026 04:12:32 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@bootlin.com header.s=dkim header.b=vNh2hlz9; spf=pass (domain: bootlin.com, ip: 185.246.84.56, mailfrom: mathieu.dubois-briand@bootlin.com) Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-02.galae.net (Postfix) with ESMTPS id 582381A1699 for ; Sun, 16 Aug 2026 11:12:30 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 2E44A60352 for ; Sun, 16 Aug 2026 11:12:30 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 74DA911C4F8E9; Sun, 16 Aug 2026 13:12:25 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1786878745; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=11n2M6lvqNhIPKhw3goOivtA+FOHlPHgS3ZLSzieXmw=; b=vNh2hlz9al0SmuZLdqquQVYUYhO8BaEj8dPNxuSF2fLWhiZdXzXTWlxoMSLJ3Gs7VtaxgY FYZIFtuEJL+9CSycTF8E9cU6kjpuQxXDEE07egdAoOM/EkvGF7XtfPgDPBHGZk6f6u6FJN 7Y9cveI3zDwrf0PLSV80YLeJ4l9GoksnAVfwNbvaJX8UAuhVP01hn23cJzCuzjrc8Ij39Y 8VumnmQYySXoXOvAREUDBggwmCefVfnZ/x2EntuzTiMa17BhWH2ZCj7i6xCyOdxY0E9uZM q6ht9N0P3wtL9VFf3au7WIKvG/fsx85r3wc+59AmHexTCfYAPEv2gFoKoKKqqw== From: Mathieu Dubois-Briand Date: Sun, 16 Aug 2026 13:12:04 +0200 Subject: [PATCH v2 4/4] oe-selftest: devtool: Add test for add/finish workflow MIME-Version: 1.0 Message-Id: <20260816-mathieu-devtool-v2-4-13c943abf48e@bootlin.com> References: <20260816-mathieu-devtool-v2-0-13c943abf48e@bootlin.com> In-Reply-To: <20260816-mathieu-devtool-v2-0-13c943abf48e@bootlin.com> To: openembedded-core@lists.openembedded.org Cc: Thomas Petazzoni , Mathieu Dubois-Briand X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1786878726; l=4026; i=mathieu.dubois-briand@bootlin.com; s=20241219; h=from:subject:message-id; bh=dtGdvcypNB2YkFEn1oNCTykKc04Tk8Eg7PV2U4D0gng=; b=lqR6QFNQwZvWOmjxN5eEKWVJrSdH2DfOc8wpE7BJUL01s/wyyD+gLokUoel6VdTcGyW7LST9U EcM6IYHRHyIBQniCjuZKl+m6Oeu4Q6IwkZ8xX/Xb3kWM3lWAyCmNeG5 X-Developer-Key: i=mathieu.dubois-briand@bootlin.com; a=ed25519; pk=1PVTmzPXfKvDwcPUzG0aqdGoKZJA3b9s+3DqRlm0Lww= X-Last-TLS-Session-Version: TLSv1.3 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Sun, 16 Aug 2026 11:12:35 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/243520 Add test for devtool add/build/finish workflow, inclusing a test for finish --force. Signed-off-by: Mathieu Dubois-Briand --- meta/lib/oeqa/selftest/cases/devtool.py | 58 +++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/meta/lib/oeqa/selftest/cases/devtool.py b/meta/lib/oeqa/selftest/cases/devtool.py index d84a18e8b69b..d549be9f7965 100644 --- a/meta/lib/oeqa/selftest/cases/devtool.py +++ b/meta/lib/oeqa/selftest/cases/devtool.py @@ -713,6 +713,64 @@ class DevtoolAddTests(DevtoolBase): self.add_command_to_tearDown('bitbake-layers remove-layer */workspace') result = runCmd('devtool add %s %s -f %s' % (testrecipe, srcdir, url)) + def test_devtool_add_build_finish(self): + url = 'https://ftp.gnu.org/gnu/hello/hello-2.12.3.tar.gz' + pn = 'hello' + recipe = 'hello_2.12.3.bb' + # Test devtool add + self.track_for_cleanup(self.workspacedir) + self.add_command_to_tearDown('bitbake -c cleansstate %s' % pn) + self.add_command_to_tearDown('bitbake-layers remove-layer */workspace') + result = runCmd('devtool add %s' % (url, )) + self.assertExists(os.path.join(self.workspacedir, 'conf', 'layer.conf'), + 'Workspace directory not created') + # Test devtool build + result = runCmd('devtool build %s' % pn) + bb_vars = get_bb_vars(['D', 'bindir'], pn) + installdir = bb_vars['D'] + self.assertTrue(installdir, 'Could not query installdir variable') + # devtool finish + result = runCmd('devtool finish %s meta-selftest' % pn, + ignore_status=True) + self.assertNotEqual(result.status, 0, + 'devtool finish should have failed on a dirty directory. devtool output: %s' % + (result.output)) + # clean directory + sourcedir = os.path.join(self.workspacedir, 'sources', 'hello') + runCmd('git reset --hard; git clean -dxf', cwd=sourcedir) + # devtool finish (again) + self.assertExists(os.path.join(self.workspacedir, 'recipes', pn), + 'Recipe directory should exist before finish') + result = runCmd('devtool finish %s meta-selftest' % pn) + self.assertNotExists(os.path.join(self.workspacedir, 'recipes', pn), + 'Recipe directory should not exist after finish') + # Check recipe got created as expected + self.assertExists(os.path.join(get_test_layer(), f'recipes-{pn}', pn, recipe), + 'Recipe should exist in the layer after finish') + + def test_devtool_add_build_finish_force(self): + url = 'https://ftp.gnu.org/gnu/hello/hello-2.12.3.tar.gz' + pn = 'hello' + recipe = 'hello_2.12.3.bb' + # Test devtool add + self.track_for_cleanup(self.workspacedir) + self.add_command_to_tearDown('bitbake -c cleansstate %s' % pn) + self.add_command_to_tearDown('bitbake-layers remove-layer */workspace') + result = runCmd('devtool add %s' % (url, )) + self.assertExists(os.path.join(self.workspacedir, 'conf', 'layer.conf'), + 'Workspace directory not created') + # Test devtool build + result = runCmd('devtool build %s' % pn) + bb_vars = get_bb_vars(['D', 'bindir'], pn) + installdir = bb_vars['D'] + self.assertTrue(installdir, 'Could not query installdir variable') + # devtool finish + result = runCmd('devtool finish %s meta-selftest --force' % pn) + # Check recipe got created as expected + self.assertExists(os.path.join(get_test_layer(), f'recipes-{pn}', pn, recipe), + 'Recipe should exist in the layer after finish') + + class DevtoolModifyTests(DevtoolBase): def test_devtool_modify(self):