From patchwork Mon Nov 30 15:27:02 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Purdie X-Patchwork-Id: 106505 Received: from mail-wm1-f54.google.com (mail-wm1-f54.google.com [209.85.128.54]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.34563.1796052448776789268 for ; Mon, 30 Nov 2026 07:27:29 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@linuxfoundation.org header.s=google header.b=f2dJZydg; spf=pass (domain: linuxfoundation.org, ip: 209.85.128.54, mailfrom: richard.purdie@linuxfoundation.org) Received: by mail-wm1-f54.google.com with SMTP id 5b1f17b1804b1-4bb55cda775so64748165e9.0 for ; Mon, 30 Nov 2026 07:27:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; t=1796052447; x=1796657247; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to:content-type; bh=sKUVf/QSe9ROsZzOhR+r/b16zhCikq8MCbL03BvRdsc=; b=f2dJZydgjIi4xE/ceARlhaJriSH/iyJ9g92xBppDfwXSTzvr+QRPmuJYwHEcrP7umM PW95S1ndST+31oO6prT0CuaN2Povj1yj//0diPD3ZGY2FpddufW0EqL/t2nr6dLP5jfk IUAtTcOcQlxy6HfUIDOk4KQe23lrW2JHJV8Qg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796052447; x=1796657247; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to:content-type; bh=sKUVf/QSe9ROsZzOhR+r/b16zhCikq8MCbL03BvRdsc=; b=ot4jm73dNXFdQelicFMK9GcsuCmhQ8FGKkur+g/rxP29Ugy8gPtesWRYTOGzVg1ifd GvbjDwdanvRYPdRWc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To0d4naGLBg== X-Received: by 2002:a05:600c:3547:b0:4a1:c27d:e1a8 with SMTP id 5b1f17b1804b1-4bb8880b88fmr672676625e9.10.1796052446901; Mon, 30 Nov 2026 07:27:26 -0800 (PST) Return-Path: Received: from max.int.rpsys.net ([2001:8b0:aba:5f3c:2444:81bb:2aff:8d84]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4bb8538b09bsm1704014155e9.4.2026.11.30.07.27.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Nov 2026 07:27:25 -0800 (PST) From: Richard Purdie To: openembedded-core@lists.openembedded.org Subject: [PATCH 14/16] recipetool: Fix temporary fetch recipe location after layer.conf changes Date: Mon, 30 Nov 2026 15:27:02 +0000 Message-ID: <20261130152704.3471590-14-richard.purdie@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261130152704.3471590-1-richard.purdie@linuxfoundation.org> References: <20261130152704.3471590-1-richard.purdie@linuxfoundation.org> MIME-Version: 1.0 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by lin-tor-korg-lkml-alma10-1 with HTTPS for ; Mon, 30 Nov 2026 15:27:30 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/251623 _get_temp_recipe_dir() looked for BBFILES entries ending in .bb, but BBFILES is now /recipes* globs, so recipetool create (and devtool add/upgrade) failed to find anywhere to put the temporary fetch recipe. Use a new recipes-recipetool directory in a writeable layer from BBFILES, still preferring the workspace. Drop the BBFILES reference from the newappend warning. AI-Generated: Uses Claude Opus 5.5 Signed-off-by: Richard Purdie --- scripts/lib/recipetool/newappend.py | 2 +- scripts/lib/scriptutils.py | 24 ++++++++++++++---------- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/scripts/lib/recipetool/newappend.py b/scripts/lib/recipetool/newappend.py index 08e2474dc42..3d8d22b2be1 100644 --- a/scripts/lib/recipetool/newappend.py +++ b/scripts/lib/recipetool/newappend.py @@ -48,7 +48,7 @@ def newappend(args): return 1 if not path_ok: - logger.warning('Unable to determine correct subdirectory path for bbappend file - check that what %s adds to BBFILES also matches .bbappend files. Using %s for now, but until you fix this the bbappend will not be applied.', os.path.join(args.destlayer, 'conf', 'layer.conf'), os.path.dirname(append_path)) + logger.warning('Unable to determine correct subdirectory path for bbappend file. Using %s for now, but it may not be applied.', os.path.dirname(append_path)) layerdirs = [os.path.abspath(layerdir) for layerdir in rd.getVar('BBLAYERS').split()] if not os.path.abspath(args.destlayer) in layerdirs: diff --git a/scripts/lib/scriptutils.py b/scripts/lib/scriptutils.py index 860415789b1..dc3ef98f175 100644 --- a/scripts/lib/scriptutils.py +++ b/scripts/lib/scriptutils.py @@ -114,16 +114,20 @@ def _get_temp_recipe_dir(d): # This is a little bit hacky but we need to find a place where we can put # the recipe so that bitbake can find it. We're going to delete it at the # end so it doesn't really matter where we put it. - bbfiles = d.getVar('BBFILES').split() + # BBFILES has a /recipes* entry for each layer, we place in a + # recipes-recipetool directory under one, prefering workspace if present. + layerdata = d.getVar('layerdata', False) or {} + workspace = layerdata.get('workspace') + if workspace and os.access(workspace.path, os.W_OK): + # Prefer the workspace + return os.path.join(workspace.path, 'recipes-recipetool') + layerdirs = [os.path.dirname(pth) for pth in d.getVar('BBFILES').split() + if os.path.basename(pth) == 'recipes*'] fetchrecipedir = None - for pth in bbfiles: - if pth.endswith('.bb'): - pthdir = os.path.dirname(pth) - if os.access(os.path.dirname(os.path.dirname(pthdir)), os.W_OK): - fetchrecipedir = pthdir.replace('*', 'recipetool') - if pthdir.endswith('workspace/recipes/*'): - # Prefer the workspace - break + for layer in layerdirs: + layer = os.path.realpath(layer) + if os.access(layer, os.W_OK): + fetchrecipedir = os.path.join(layer, 'recipes-recipetool') return fetchrecipedir class FetchUrlFailure(Exception): @@ -155,7 +159,7 @@ def fetch_url(tinfoil, srcuri, srcrev, destdir, logger, preserve_tmp=False, mirr fetchrecipedir = _get_temp_recipe_dir(tinfoil.config_data) if not fetchrecipedir: - logger.error('Searched BBFILES but unable to find a writeable place to put temporary recipe') + logger.error('Unable to find a writeable layer containing recipes to put the temporary recipe in') sys.exit(1) fetchrecipe = None bb.utils.mkdirhier(fetchrecipedir)