From patchwork Mon Nov 18 16:26:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Kanavin X-Patchwork-Id: 52608 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 48FE1D49207 for ; Mon, 18 Nov 2024 16:26:29 +0000 (UTC) Received: from mail-wm1-f54.google.com (mail-wm1-f54.google.com [209.85.128.54]) by mx.groups.io with SMTP id smtpd.web11.46125.1731947185460930183 for ; Mon, 18 Nov 2024 08:26:25 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=evcuugzT; spf=pass (domain: gmail.com, ip: 209.85.128.54, mailfrom: alex.kanavin@gmail.com) Received: by mail-wm1-f54.google.com with SMTP id 5b1f17b1804b1-431688d5127so36148335e9.0 for ; Mon, 18 Nov 2024 08:26:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1731947184; x=1732551984; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=IKQ7TEFxdmLZIfm7dYxy7iOCt3zrTkqc/jTwHHn0iKg=; b=evcuugzTQvaaZK8PD5OV4r/d0KX+hhei6Sqp6uG0cQRuNyTOjXjpOW99dCHvOmd9rq NTtclPlIfQakWHrafb/R4APhcEkQetk0FLDd+d6oXx33AyLxZSDIfNZlFNWJeETH3FzK bDl80bSSb/RE0c8fX9yMTxU01ApLsFvBrrKePSuPCqFtLowlQUyIq0FY3Azlf25aYLts SZqK0afXa7UuFozFUSlJBR1wv5puEq4qkpegXu7ngDWKirlR/Xzhbi4mhCHy1TnuDqbh OlG4u19GWxVLI/KkcnpqYntI1ATAArNXjjX/pItYC39Xb3x+HnHrzyN5JJ1a+fWpc+SB pcKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731947184; x=1732551984; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=IKQ7TEFxdmLZIfm7dYxy7iOCt3zrTkqc/jTwHHn0iKg=; b=k7QNyK+jCfrmvOhDSkieabhOrVTYGZiTGMy9NGAvwgPfeyaoIi/9au4vMe1A3ultjW LsTts9oIrEGG+lTqeWS3aWRuycqC7oo2ddiXzjOFWECklb6jhZjiTIm9HD/QdGe7+KTj xGxFVCrvCbIcQzDpHKVQSr6OAP68AhYs4X1oAB780zz7WvqnbkkbwZ0C3nbDGevsvczK KGXbVNrRNKIqZohDy9OmYwOvxalgKfdZ2hpJcOGlknWoPwKGGdfmoWGMIHLkfMmxJd9R K1Cki1AZ55EGeoiZFKTXOW57tW7l+FCls14QOWV2Ruu0knpPegs+jRLCItmS6PDvkdVZ ydYQ== X-Gm-Message-State: AOJu0YzUuX1TKJ+au/F0j1aeWBQocS2JhpmMuIO+cY2Of5Fm1HoBg7Or nLzkPvyNpG4p/lCU8G4B497D0ejZUwN6s/tV8+PmoCdimsZxV530z28QHA== X-Google-Smtp-Source: AGHT+IE6qRFWhGClKMEXdN5FsE7ONrMBsaMvf7dkTaFZXCQyepGEin93DQAESPirZyHfxOjHCTTCTg== X-Received: by 2002:a05:600c:4e8b:b0:431:4f29:4a98 with SMTP id 5b1f17b1804b1-432df77c605mr104060635e9.20.1731947183682; Mon, 18 Nov 2024 08:26:23 -0800 (PST) Received: from Zen2.lab.linutronix.de. (drugstore.linutronix.de. [80.153.143.164]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-432d48c731dsm109341455e9.2.2024.11.18.08.26.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Nov 2024 08:26:23 -0800 (PST) From: Alexander Kanavin To: bitbake-devel@lists.openembedded.org Cc: Alexander Kanavin Subject: [PATCH v3 1/4] bitbake-layers: ensure tinfoil.shutdown() gets executed when tinfoil.prepare() fails Date: Mon, 18 Nov 2024 17:26:07 +0100 Message-Id: <20241118162610.1423384-1-alex.kanavin@gmail.com> X-Mailer: git-send-email 2.39.5 MIME-Version: 1.0 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 ; Mon, 18 Nov 2024 16:26:29 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/bitbake-devel/message/16807 From: Alexander Kanavin https://git.yoctoproject.org/poky/commit/bitbake/bin/bitbake-layers?id=f6de2b033d32c0f92f19f5a4a8c4c8874a00a8f7 erroneously moved tinfoil.prepare() out of try..finally block, where 'finally' contains a tinfoil.shutdown() call. Without the shutdown, if there is an error in tinfoil.prepare() (such as parsing errors), the tool locks up, as seen here: https://valkyrie.yoctoproject.org/#/builders/71/builds/431 Signed-off-by: Alexander Kanavin --- bin/bitbake-layers | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/bin/bitbake-layers b/bin/bitbake-layers index aebb5100c2c..613e675cb0d 100755 --- a/bin/bitbake-layers +++ b/bin/bitbake-layers @@ -59,13 +59,13 @@ def main(): plugins = [] tinfoil = bb.tinfoil.Tinfoil(tracking=True) tinfoil.logger.setLevel(logger.getEffectiveLevel()) - if global_args.force > 1: - bbpaths = [] - else: - tinfoil.prepare(True) - bbpaths = tinfoil.config_data.getVar('BBPATH').split(':') - - try: + try: + if global_args.force > 1: + bbpaths = [] + else: + tinfoil.prepare(True) + bbpaths = tinfoil.config_data.getVar('BBPATH').split(':') + for path in ([topdir] + bbpaths): pluginpath = os.path.join(path, 'lib', 'bblayers') bb.utils.load_plugins(logger, plugins, pluginpath) From patchwork Mon Nov 18 16:26:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Kanavin X-Patchwork-Id: 52609 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 57E37D68BFA for ; Mon, 18 Nov 2024 16:26:29 +0000 (UTC) Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.42]) by mx.groups.io with SMTP id smtpd.web11.46127.1731947186167408446 for ; Mon, 18 Nov 2024 08:26:26 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=XtC2Wso9; spf=pass (domain: gmail.com, ip: 209.85.128.42, mailfrom: alex.kanavin@gmail.com) Received: by mail-wm1-f42.google.com with SMTP id 5b1f17b1804b1-43158625112so20234705e9.3 for ; Mon, 18 Nov 2024 08:26:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1731947184; x=1732551984; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=rK9y802Yall2lViE6YKaILaNPI/JW8MHA4E8hGsJbcw=; b=XtC2Wso93zPHePn7s8coq4WrwGbyu6PJAnuYdetC8AviGWiXjSdKPkeDSdzRUXxGJF 1s/uA87SEZETe6VRrSbgpV83JEwxNC7mL9m/lwUTLwj3F6Y/EnheKFyJ24g2TUizkODF UAtJCXCOfsjiu5cLnkcvCqurSCsoTFQUtT+UrtUjdqJJvbrhC1VoTYo2VwAgV5Mgo9Nx lBghLUNDl/e1ixNkusFP1aWnZO5FqeL/lSHI9eBmf3tNU6DFGfqtcHivRT6TyOWrwCe3 1fJNBAfmNeNTwU0BbDvqrfstuejXBnTZTMANHwNS1W5z46b9a+UNWfQ0X/24Y51R+h7M wh1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731947184; x=1732551984; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=rK9y802Yall2lViE6YKaILaNPI/JW8MHA4E8hGsJbcw=; b=KGxgmu7FjmrbFNAbIjMA0JcqNhIbKOBuCKAiEanFv+eRSPKJLGrj388qwqagQZ+48z zg2YE6HT302srtEuydL++oy0W+mvyuFSpo7Ckd/whhcs2c6FQwX4Odxuc66xLsJxyLAz VkO2QGFNick//IzqSos4UXGu4NRtvSQAp6gyHg9i8VYtLhc9VANfragIOGKLuco6fdUj Bol0F+vBykysgRXSY2ri1CmJuM2jd0Uw8lXmYtF16NFvs2izrO72UxX36bTA29uDTIIt anr3hS9QOqKB4Issf0g8/wKfr/0+FslHXowMukzYVcQQ3HYSvV3TtJMORBSv6uIT3D/N NvNA== X-Gm-Message-State: AOJu0YzVwl5RH/VcFShXDpgZnE/zd3wfpyo/ojcCrqUYC73i9Y37SmGs YpMHZrdLXxcRnZouM16aiaQzf1rnO/6t7ZVc6vDn7emXJPumZyN4CC/dlA== X-Google-Smtp-Source: AGHT+IHeyVsShXgP6J5WSjkl5HAli71yDd8Q161aAZUkmxF4vY+SxYGjT+FuhqqIzrq/qCBoYxVlGA== X-Received: by 2002:a05:600c:5129:b0:431:54f3:11af with SMTP id 5b1f17b1804b1-432df78fd98mr116121485e9.31.1731947184388; Mon, 18 Nov 2024 08:26:24 -0800 (PST) Received: from Zen2.lab.linutronix.de. (drugstore.linutronix.de. [80.153.143.164]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-432d48c731dsm109341455e9.2.2024.11.18.08.26.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Nov 2024 08:26:24 -0800 (PST) From: Alexander Kanavin To: bitbake-devel@lists.openembedded.org Cc: Alexander Kanavin Subject: [PATCH v3 2/4] parse/ConfHandler: allow / in variable flags Date: Mon, 18 Nov 2024 17:26:08 +0100 Message-Id: <20241118162610.1423384-2-alex.kanavin@gmail.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241118162610.1423384-1-alex.kanavin@gmail.com> References: <20241118162610.1423384-1-alex.kanavin@gmail.com> MIME-Version: 1.0 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 ; Mon, 18 Nov 2024 16:26:29 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/bitbake-devel/message/16808 From: Alexander Kanavin This is beneficial for config fragments, as their names are specified via flags, and those names can include slashes: BB_CONF_FRAGMENT_SUMMARY[init/systemd] = "This fragment enables systemd as an init manager" Signed-off-by: Alexander Kanavin --- lib/bb/parse/parse_py/ConfHandler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/bb/parse/parse_py/ConfHandler.py b/lib/bb/parse/parse_py/ConfHandler.py index 7826dee7d3d..27665443dd4 100644 --- a/lib/bb/parse/parse_py/ConfHandler.py +++ b/lib/bb/parse/parse_py/ConfHandler.py @@ -21,7 +21,7 @@ __config_regexp__ = re.compile( r""" ^ (?Pexport\s+)? (?P[a-zA-Z0-9\-_+.${}/~:]+?) - (\[(?P[a-zA-Z0-9\-_+.][a-zA-Z0-9\-_+.@]*)\])? + (\[(?P[a-zA-Z0-9\-_+.][a-zA-Z0-9\-_+.@/]*)\])? \s* ( (?P:=) | From patchwork Mon Nov 18 16:26:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Kanavin X-Patchwork-Id: 52611 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 4C015D4401B for ; Mon, 18 Nov 2024 16:26:29 +0000 (UTC) Received: from mail-wm1-f54.google.com (mail-wm1-f54.google.com [209.85.128.54]) by mx.groups.io with SMTP id smtpd.web10.45613.1731947186696836835 for ; Mon, 18 Nov 2024 08:26:27 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=PM/saYoZ; spf=pass (domain: gmail.com, ip: 209.85.128.54, mailfrom: alex.kanavin@gmail.com) Received: by mail-wm1-f54.google.com with SMTP id 5b1f17b1804b1-431695fa98bso36013695e9.3 for ; Mon, 18 Nov 2024 08:26:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1731947185; x=1732551985; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=+OVuCVG4xK7dpZ/PcqRLC8L4F/r18OBZets4vCysDzA=; b=PM/saYoZ30vbj5DUrBssUk7yf/5EIWrBRVUMbaBPM7xOVX8tV496jzMgP8TrDFlWb3 rfFQ+6XSRmV6SbIucMPe6NEixI+p5E3mqxn2JokEMtrB51EM4QxacrMbLiJ+oVjINqOd y7eI6vnNHtzam7W3gNJi0P0HIOqmQVZhP6JFwxq/BCC+mkGwcYk8IyDQvqslAGbvS1Xz SYcqUoBArFxjdKsFpvT0Hp0QMb8fjVmARWFAYlkZqcMRoT3FkQ7uM8KwTikE+N3ZpJsj UBu7JGKZAyZ+YbgwgFzjSXeRwvmr1NCivXlP+ndDJzZg24z1aJa2S/wsEbgxT+deCz8n G3pw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731947185; x=1732551985; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=+OVuCVG4xK7dpZ/PcqRLC8L4F/r18OBZets4vCysDzA=; b=tvBUB8bRDuM+EE100fqEegPGCLhqnjBXsRMt/7sM6xo37KxPWxyR48FMMQkF03X2AD c2VhuWg3EN32OuTtYxm/+iCsOu4jI4SWJ9B2u77gnahOWgcdZTpOGU36JKykiiU+RVCs zdIPLUAkunoflP8c6F0b0Q/0j8+AfgCwz2h2JORtIjUqdpYh9kqDosEHjYYNdS2dvWHV bKasGB4rgpFFdv9f9bMcb6XUa85Wu8bbMEBhreD1J0pIHsK5g1vsy2fNa+j55NFmuIPW p1bf9U1tDDYmhNUeeCVwbfzd1jcWMCUbW0cmL9G0LE6CGnIVQ3kgbPqcSXIP4mKddtKc pH6g== X-Gm-Message-State: AOJu0YxKE6PlHZ6C54VRufA4MLgB5G//SWYXtNnzER7YCwraCPJbM1qT JEAS9Vzw5YubSxsl2H59KfayjtqjrOoJYFwidw63npErmn7t7MH5ATmAhg== X-Google-Smtp-Source: AGHT+IEiVtmKlCzgGUDRgiua9iJA5onJf4eBv9uJEbJQSRfXXO/0QJU96Wl/OLLe1BD6lcWLHt/MAg== X-Received: by 2002:a05:6000:154b:b0:382:346b:3654 with SMTP id ffacd0b85a97d-382346b47d5mr7201951f8f.56.1731947185050; Mon, 18 Nov 2024 08:26:25 -0800 (PST) Received: from Zen2.lab.linutronix.de. (drugstore.linutronix.de. [80.153.143.164]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-432d48c731dsm109341455e9.2.2024.11.18.08.26.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Nov 2024 08:26:24 -0800 (PST) From: Alexander Kanavin To: bitbake-devel@lists.openembedded.org Cc: Alexander Kanavin Subject: [PATCH v3 3/4] parse: add support for 'addfragments' directive Date: Mon, 18 Nov 2024 17:26:09 +0100 Message-Id: <20241118162610.1423384-3-alex.kanavin@gmail.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241118162610.1423384-1-alex.kanavin@gmail.com> References: <20241118162610.1423384-1-alex.kanavin@gmail.com> MIME-Version: 1.0 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 ; Mon, 18 Nov 2024 16:26:29 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/bitbake-devel/message/16809 From: Alexander Kanavin It takes two parameters: - location prefix for fragments - name of variable that holds the list of enabled fragments, each of them prefixed by layer id Implementation of this directive essentially expands the fragment list obtained from the variable into absolute fragment paths and hands them to the implementation of 'require'. Signed-off-by: Alexander Kanavin --- lib/bb/parse/ast.py | 33 ++++++++++++++++++++++++++++ lib/bb/parse/parse_py/ConfHandler.py | 6 +++++ 2 files changed, 39 insertions(+) diff --git a/lib/bb/parse/ast.py b/lib/bb/parse/ast.py index 001ba8d289a..d3b7fef9895 100644 --- a/lib/bb/parse/ast.py +++ b/lib/bb/parse/ast.py @@ -326,6 +326,34 @@ class InheritDeferredNode(AstNode): inherits.append(self.inherit) data.setVar('__BBDEFINHERITS', inherits) +class AddFragmentsNode(AstNode): + def __init__(self, filename, lineno, fragments_path_prefix, fragments_variable): + AstNode.__init__(self, filename, lineno) + self.path = fragments_path_prefix + self.variable = fragments_variable + + def eval(self, data): + def find_fragment(layers, layerid, full_fragment_name): + for layerpath in layers.split(): + candidate_fragment_path = os.path.join(layerpath, full_fragment_name) + if os.path.exists(candidate_fragment_path) and bb.utils.get_file_layer(candidate_fragment_path, data) == layerid: + return candidate_fragment_path + return None + + fragments = data.getVar(self.variable) + layers = data.getVar('BBLAYERS') + + if not fragments: + return + for f in fragments.split(): + layerid, fragment_name = f.split('/', 1) + full_fragment_name = data.expand("{}/{}.conf".format(self.path, fragment_name)) + fragment_path = find_fragment(layers, layerid, full_fragment_name) + if fragment_path: + bb.parse.ConfHandler.include(self.filename, fragment_path, self.lineno, data, "include fragment") + else: + bb.error("Could not find fragment {} in enabled layers: {}".format(f, layers)) + def handleInclude(statements, filename, lineno, m, force): statements.append(IncludeNode(filename, lineno, m.group(1), force)) @@ -370,6 +398,11 @@ def handleInheritDeferred(statements, filename, lineno, m): classes = m.group(1) statements.append(InheritDeferredNode(filename, lineno, classes)) +def handleAddFragments(statements, filename, lineno, m): + fragments_path_prefix = m.group(1) + fragments_variable = m.group(2) + statements.append(AddFragmentsNode(filename, lineno, fragments_path_prefix, fragments_variable)) + def runAnonFuncs(d): code = [] for funcname in d.getVar("__BBANONFUNCS", False) or []: diff --git a/lib/bb/parse/parse_py/ConfHandler.py b/lib/bb/parse/parse_py/ConfHandler.py index 27665443dd4..35321dacfe1 100644 --- a/lib/bb/parse/parse_py/ConfHandler.py +++ b/lib/bb/parse/parse_py/ConfHandler.py @@ -47,6 +47,7 @@ __export_regexp__ = re.compile( r"export\s+([a-zA-Z0-9\-_+.${}/~]+)$" ) __unset_regexp__ = re.compile( r"unset\s+([a-zA-Z0-9\-_+.${}/~]+)$" ) __unset_flag_regexp__ = re.compile( r"unset\s+([a-zA-Z0-9\-_+.${}/~]+)\[([a-zA-Z0-9\-_+.][a-zA-Z0-9\-_+.@]+)\]$" ) __addpylib_regexp__ = re.compile(r"addpylib\s+(.+)\s+(.+)" ) +__addfragments_regexp__ = re.compile(r"addfragments\s+(.+)\s+(.+)" ) def init(data): return @@ -197,6 +198,11 @@ def feeder(lineno, s, fn, statements, baseconfig=False, conffile=True): ast.handlePyLib(statements, fn, lineno, m) return + m = __addfragments_regexp__.match(s) + if m: + ast.handleAddFragments(statements, fn, lineno, m) + return + raise ParseError("unparsed line: '%s'" % s, fn, lineno); # Add us to the handlers list From patchwork Mon Nov 18 16:26:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Kanavin X-Patchwork-Id: 52610 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 4A569D44018 for ; Mon, 18 Nov 2024 16:26:29 +0000 (UTC) Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) by mx.groups.io with SMTP id smtpd.web11.46129.1731947187362171890 for ; Mon, 18 Nov 2024 08:26:27 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Cu6JJtdo; spf=pass (domain: gmail.com, ip: 209.85.128.43, mailfrom: alex.kanavin@gmail.com) Received: by mail-wm1-f43.google.com with SMTP id 5b1f17b1804b1-431688d5127so36148605e9.0 for ; Mon, 18 Nov 2024 08:26:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1731947186; x=1732551986; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=aO44fy+Ln/19pWtRnJ16qyrYZU4LFPNQ8vDOWAYE42Y=; b=Cu6JJtdoA53fL80GCGREXqdvzzZsy8v0TbRkX+h06Sv9gVaCOhXUKnSpAiIx6ZXiJp WQcTsQzP8budlDJBcjFkCDwsPhLuT96ys8VWMOYp2KDwzYKdBcNXjsrxTHSJhqWIpLnG vQZefVcivIcxDFk8NP9HR+6PZYJWFXET6BcK0TRfbmPZh0FfI/INCMaOaH/UqZyZbpZ8 q104BgT742j0twCThTwKMP/yftXs2yVvx5DF2BJyAFN9ZA/VhD2UjAWNmEIVAlLceo5Y lfqf0cEYDfXUqK9cRhJ1Gs5zge0k+djHiXA3qBuoxm+0ZEp6asX0HgbjbEXt/vsgt0RZ eXxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731947186; x=1732551986; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=aO44fy+Ln/19pWtRnJ16qyrYZU4LFPNQ8vDOWAYE42Y=; b=wVVx4EjFJLY8OBmtsA3pBGwvbETbGo1Esua/90V/hKvlV14YOQxNiFVL95pXXZu2xk uSF9/q7PIbZyuIuVRffvX3i1CAo4/180/T1kq2uL+ZQdqt8eWK4lB0vypBj9S5ZGetlc 1WUb8btLzkevoAdfrAlzu2ib1EFWWonh3x4f9KyoZWFyTLg4D4H5cDxhwdMayR3G38zy iIe/Tgly1VVGnscsqJQC4xeIvYAD9P9OqfHHInjysvuBkDpa8cmcffGPbbeSVWl2dX/k RxsvT1gJtGjocGXE5y5160u2miqDoqD4BMxnD/tiXJZnQEJcIk4IE4JmT5XTykoL2rKE Y2jw== X-Gm-Message-State: AOJu0YzcZN2fjsFUIKJvdeStxeW3x6McKWpRFquWfbOrm1lCfSozRTxv 8JpPVhjXwItZieLaITuhP1YQ9a1Zups40nmbElcl/Nrufh95Q4kvskLc2w== X-Google-Smtp-Source: AGHT+IFGquoNzjZRdY65PUVxZF9bixvMaUfYlQZmsVrb5IlpNF5DdDtA5PRo9PVcbBoZdOVL9JQQvw== X-Received: by 2002:a05:600c:35d0:b0:431:547e:81d0 with SMTP id 5b1f17b1804b1-432df72aafdmr110842255e9.11.1731947185713; Mon, 18 Nov 2024 08:26:25 -0800 (PST) Received: from Zen2.lab.linutronix.de. (drugstore.linutronix.de. [80.153.143.164]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-432d48c731dsm109341455e9.2.2024.11.18.08.26.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Nov 2024 08:26:25 -0800 (PST) From: Alexander Kanavin To: bitbake-devel@lists.openembedded.org Cc: Alexander Kanavin Subject: [PATCH v3 4/4] bitbake-config-build: add an alias to bitbake-layers intended for managing specific local configs Date: Mon, 18 Nov 2024 17:26:10 +0100 Message-Id: <20241118162610.1423384-4-alex.kanavin@gmail.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241118162610.1423384-1-alex.kanavin@gmail.com> References: <20241118162610.1423384-1-alex.kanavin@gmail.com> MIME-Version: 1.0 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 ; Mon, 18 Nov 2024 16:26:29 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/bitbake-devel/message/16810 From: Alexander Kanavin This was prompted by adding support for config fragments (in a separate commit to oe-core); after some deliberation I concluded there should be a separate tool, as bitbake-layers is already somewhat over-stuffed, and this will give space for more build/conf/* operations in the future that anyone can come up with (such as tweaking site-specific items in site.conf etc.) The alias completely reuses existing code via symlink and the difference is in where it looks for plugins. Signed-off-by: Alexander Kanavin --- bin/bitbake-config-build | 1 + bin/bitbake-layers | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) create mode 120000 bitbake/bin/bitbake-config-build diff --git a/bin/bitbake-config-build b/bin/bitbake-config-build new file mode 120000 index 00000000000..11e6df80c4b --- /dev/null +++ b/bin/bitbake-config-build @@ -0,0 +1 @@ +bitbake-layers \ No newline at end of file diff --git a/bin/bitbake-layers b/bin/bitbake-layers index 613e675cb0d..f93d913a1da 100755 --- a/bin/bitbake-layers +++ b/bin/bitbake-layers @@ -18,13 +18,14 @@ import warnings warnings.simplefilter("default") bindir = os.path.dirname(__file__) +toolname = os.path.basename(__file__).split(".")[0] topdir = os.path.dirname(bindir) sys.path[0:0] = [os.path.join(topdir, 'lib')] import bb.tinfoil import bb.msg -logger = bb.msg.logger_create('bitbake-layers', sys.stdout) +logger = bb.msg.logger_create(toolname, sys.stdout) def main(): parser = argparse.ArgumentParser( @@ -67,7 +68,8 @@ def main(): bbpaths = tinfoil.config_data.getVar('BBPATH').split(':') for path in ([topdir] + bbpaths): - pluginpath = os.path.join(path, 'lib', 'bblayers') + pluginbasepath = {"bitbake-layers":'bblayers', 'bitbake-config-build':'bbconfigbuild'}[toolname] + pluginpath = os.path.join(path, 'lib', pluginbasepath) bb.utils.load_plugins(logger, plugins, pluginpath) registered = False