From patchwork Wed Jan 8 10:58:57 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Purdie X-Patchwork-Id: 55220 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 1E949C3DA4A for ; Wed, 8 Jan 2025 10:59:11 +0000 (UTC) Received: from mail-wr1-f43.google.com (mail-wr1-f43.google.com [209.85.221.43]) by mx.groups.io with SMTP id smtpd.web11.16734.1736333943626842819 for ; Wed, 08 Jan 2025 02:59:04 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@linuxfoundation.org header.s=google header.b=M/VHfcf9; spf=pass (domain: linuxfoundation.org, ip: 209.85.221.43, mailfrom: richard.purdie@linuxfoundation.org) Received: by mail-wr1-f43.google.com with SMTP id ffacd0b85a97d-385e0e224cbso8293981f8f.2 for ; Wed, 08 Jan 2025 02:59:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; t=1736333941; x=1736938741; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=8KjM5jybny2mAWo5UGZvaUqrmcHqr7EvtX3Bzpq0xOU=; b=M/VHfcf9D4vEaDXAaX17+/6BmbrrNofgCgi9QVdaNe/ypZd+h2Yc/UE/H+IwEFF6y+ 3vQvBdC1/jHURJ231WGmUlXGX/u0DSwKhicrk108s/f9pecDKWHcob24pH3ImcG50PZN BDtdK0xVzra1PCKobud3YBjZH7/quPoSyei9M= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736333941; x=1736938741; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=8KjM5jybny2mAWo5UGZvaUqrmcHqr7EvtX3Bzpq0xOU=; b=FfY4HyzWPFmPgCdu+n7PdtQexU7quZJ478stW6/mDZlNC1Hl5PQkxJ+OtZ7LhuE79T 0Xhr72nUNmoBr4leFWN60Yrf+pp7AhMVFdya/gDXCLiJoN2nQPs8RXne/HUk8LgnuDou zTjq0s27DON6LN0WKz6aLFK+QXA76cOYJrHupjacHP94cpbv+a30i1yeeUejGDal+4yx d8g0yDp4V/9r6DY6cs29hKb6ArXwQt7dVar8+8c8OT8RvBK1VbX+EwXy3P1hS0LFuBLO gTNovkQ71Sm8CzV9ZTGw7uoYdKuuJ/RTaHW1uGdkrZ3qmJp/IaLJPNJcb7TH+/E5gZdc usVg== X-Gm-Message-State: AOJu0Yziwu4rFlwU3SbW4cAX+YAHe8NeHDI0kVm3OEmB9qNQsjEhFz3k WF/c35KiQIdCXPsu3iqFmJ/lEEWatgKkvOUOYZF7cVESnwKI5i/mZu3IN4Yjd02ICIol5iV81qL v4ZY= X-Gm-Gg: ASbGncusXKfd3cgnYtKew+56rPy4EICWMC7N5NjgnEd/oswlmTDMb2UsufrtHYBhcK8 zflXST0BCP5I/6yr3XA/XlO7iGfRVC7rUZnUPrLgF4Hv+9p6mhXwSWEZKHl2GLkvm01Z1UMYi2z n81R9lsju8zCOoYfqeYW1CodwHPgjRZxWLbyoOkgDkyd98WRq22m2rho2LMky2YbgkIiPnRN4yr IrD9QV5rNoMec3ZiWtSSd4S7X4EVcJjHTJbRUkmrOiTZyV5l27S92hVGc12RAzkco2X/8l1g8Gw NkYnpry19A== X-Google-Smtp-Source: AGHT+IEayutX9CiAhHitjxwDaLukmGp+kYzeXRzkvNe6jDF4E7iBAqzy3DXFHbcjnkZL6u9TbHoY1A== X-Received: by 2002:a05:6000:401e:b0:386:366d:5d03 with SMTP id ffacd0b85a97d-38a872da868mr1842518f8f.16.1736333940853; Wed, 08 Jan 2025 02:59:00 -0800 (PST) Received: from max.int.rpsys.net ([2001:8b0:aba:5f3c:906a:f5af:b180:de5a]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38a1c8288b8sm52186033f8f.11.2025.01.08.02.58.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jan 2025 02:59:00 -0800 (PST) From: Richard Purdie To: openembedded-core@lists.openembedded.org Subject: [PATCH 1/3] native: Improve ${PN}-XXX package name handling Date: Wed, 8 Jan 2025 10:58:57 +0000 Message-ID: <20250108105859.3561400-1-richard.purdie@linuxfoundation.org> X-Mailer: git-send-email 2.45.2 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 ; Wed, 08 Jan 2025 10:59:11 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/209548 If a recipe has something like: RPROVIDES:${PN}-xxx = "yyy" then the current code will turn this into: RPROVIDES:${BPN}-native-xxx = "yyy-native" which can lead to errors. Add in some handling for this special case in the class extension code. The corresponding entry in PACKAGES is correctly remapped, the variables aren't remapped to match though. Note that merging this does trigger new dependencies to be exposed, some of which can't be met or are incorrect. These need to be fixed on a case by case basis. There was also a problem in the existing code when handling anonymous python in PACKAGES since it would pass bizarre package names like "d)}" to the remapping code. This patch changes it to ignore anonymous python since in the native case, this likely isn't wanted anyway. This also then avoids ${PN}-ptest in the native case which was a common dependency problem. Signed-off-by: Richard Purdie --- meta/classes-recipe/native.bbclass | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/meta/classes-recipe/native.bbclass b/meta/classes-recipe/native.bbclass index d9651a7f22d..1d9432138ef 100644 --- a/meta/classes-recipe/native.bbclass +++ b/meta/classes-recipe/native.bbclass @@ -119,6 +119,7 @@ SSTATE_SCAN_CMD ?= "${SSTATE_SCAN_CMD_NATIVE}" INHIBIT_SYSROOT_STRIP ?= "${@oe.utils.vartrue('DEBUG_BUILD', '1', '', d)}" python native_virtclass_handler () { + import re pn = e.data.getVar("PN") if not pn.endswith("-native"): return @@ -158,10 +159,20 @@ python native_virtclass_handler () { newdeps.append(dep.replace(pn, bpn) + "-native") else: newdeps.append(dep) - d.setVar(varname, " ".join(newdeps)) + output_varname = varname + # Handle ${PN}-xxx -> ${BPN}-xxx-native + if suffix != "${PN}" and "${PN}" in suffix: + output_varname = varname.replace("${PN}", "${BPN}") + "-native" + d.renameVar(varname, output_varname) + d.setVar(output_varname, " ".join(newdeps)) map_dependencies("DEPENDS", e.data, selfref=False) - for pkg in e.data.getVar("PACKAGES", False).split(): + # We need to handle things like ${@bb.utils.contains('PTEST_ENABLED', '1', '${PN}-ptest', '', d)} + # and not pass ${PN}-test since in the native case it would be ignored. This does mean we ignore + # anonymous python derived PACKAGES entries. + for pkg in re.split(r"\${@(?:{.*?}|.)+?}|\s", d.getVar("PACKAGES", False)): + if not pkg: + continue map_dependencies("RDEPENDS", e.data, pkg) map_dependencies("RRECOMMENDS", e.data, pkg) map_dependencies("RSUGGESTS", e.data, pkg) From patchwork Wed Jan 8 10:58:58 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Purdie X-Patchwork-Id: 55219 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 1C59BE77188 for ; Wed, 8 Jan 2025 10:59:11 +0000 (UTC) Received: from mail-wm1-f48.google.com (mail-wm1-f48.google.com [209.85.128.48]) by mx.groups.io with SMTP id smtpd.web10.16256.1736333944109512057 for ; Wed, 08 Jan 2025 02:59:04 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@linuxfoundation.org header.s=google header.b=Q7rWtTlm; spf=pass (domain: linuxfoundation.org, ip: 209.85.128.48, mailfrom: richard.purdie@linuxfoundation.org) Received: by mail-wm1-f48.google.com with SMTP id 5b1f17b1804b1-4361fe642ddso172457555e9.2 for ; Wed, 08 Jan 2025 02:59:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; t=1736333942; x=1736938742; 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; bh=XQ2jteIw1AdJ6ocokGrgyEQOjHURSXCXrLpMKbobQAU=; b=Q7rWtTlmdWqMnSkw3AFnGsYJ2t9gbj75gxtOrDvWkuhusZ9D5aN1E3tcz8FlZEJWdu ZZkyOdonK6ZYSqhbWxsfNp48p3fPIGF58aRzZeRGPO1EYItlgGiE50Zm1fDL4wNZRElt udfQMBhidLFDOm39sDdrJYMeGH8wCFIJ5ltn4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736333942; x=1736938742; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=XQ2jteIw1AdJ6ocokGrgyEQOjHURSXCXrLpMKbobQAU=; b=bN0ylTiC22rqSMucjEbipeFOJj+Tkg/uyXK28QVazOaPeipIIzTf9zAP9i3YU0yLVs iURRQhpqz9qU3HvX3blR6JGVQmbSU6P6PzM6+S6XUB5dKZKXUpdUM5dP8SDZ7uBR3QVL IKg28crrkKt5+jpyfkmQK6KBt9a+Axe6vy6iwZoNhpiXHSQH6/JodSrq44TJ0KjF8u4X Y14htuEzUdIavIZbbNXzk94guL1BaUB5cNtTo1LHQVtojLwa2GMxRdJ7VBVMSwN1H+A+ 6xUWzhfi7eTAqtkfAbkFXYyCy0QDAnssgJWVwpcFZZK+VaVKaHgoyYv7TcoORbxwH7hW 5gMw== X-Gm-Message-State: AOJu0YzN507WW/QWw2H3xSnqFbaMnXY9ILkMgX0jniMkqhpKGcwZI7Fc M7Ph7uwSpGNQnVKvsO/jVBT/wvRI17cwr5QEJvutpOnIRE0u6tgyCDhgS6w8zOvpnqDkpZGLJ93 FuXs= X-Gm-Gg: ASbGnctqaO/BPtMUAww1bXyK31m442LEQVB3D+grciJfVTyTfh8bc8J9IYzx1skWG7i xDnyci0Q16WNXJVFsBMVoREKzH/GfG6pZfGk/eC7fxAwNNuhuVjnRD/m2D/xCdsGtQapeR1GZuM OV9IlJ8BF8bG5P2qoAm1LUFinUT/8j0eZDlM93MdDmKNxYov74aRWVNB1ob2a1Yo8DZx1dLTRun zVvaubzGYTB1+KmUzbfprhcQ/57RhR/SWMiRDMhYdhwjFPJmdCi2lzAunLPi+q31bY3B7z1oMy2 SCrBILeurg== X-Google-Smtp-Source: AGHT+IGgj3Pcj/wLTPitP/h8I3mJefkcyfEGrl1kuYfdGYMYdz8H9rTVwpvBx8a8Ndj/sBEZL1ZPTg== X-Received: by 2002:a5d:6d01:0:b0:385:faaa:9d1d with SMTP id ffacd0b85a97d-38a8731508amr1653239f8f.35.1736333942080; Wed, 08 Jan 2025 02:59:02 -0800 (PST) Received: from max.int.rpsys.net ([2001:8b0:aba:5f3c:906a:f5af:b180:de5a]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38a1c8288b8sm52186033f8f.11.2025.01.08.02.59.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jan 2025 02:59:01 -0800 (PST) From: Richard Purdie To: openembedded-core@lists.openembedded.org Subject: [PATCH 2/3] sstate: Ensure errors cause task failure Date: Wed, 8 Jan 2025 10:58:58 +0000 Message-ID: <20250108105859.3561400-2-richard.purdie@linuxfoundation.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20250108105859.3561400-1-richard.purdie@linuxfoundation.org> References: <20250108105859.3561400-1-richard.purdie@linuxfoundation.org> 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 ; Wed, 08 Jan 2025 10:59:11 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/209549 Signed-off-by: Richard Purdie --- meta/classes-global/sstate.bbclass | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/meta/classes-global/sstate.bbclass b/meta/classes-global/sstate.bbclass index decfb5adefd..2c259a66579 100644 --- a/meta/classes-global/sstate.bbclass +++ b/meta/classes-global/sstate.bbclass @@ -646,6 +646,7 @@ def sstate_package(ss, d): d.setVar("SSTATE_CURRTASK", ss['task']) bb.utils.remove(sstatebuild, recurse=True) bb.utils.mkdirhier(sstatebuild) + exit = False for state in ss['dirs']: if not os.path.exists(state[1]): continue @@ -664,8 +665,11 @@ def sstate_package(ss, d): if not link.startswith(tmpdir): continue bb.error("sstate found an absolute path symlink %s pointing at %s. Please replace this with a relative link." % (srcpath, link)) + exit = True bb.debug(2, "Preparing tree %s for packaging at %s" % (state[1], sstatebuild + state[0])) bb.utils.rename(state[1], sstatebuild + state[0]) + if exit: + bb.fatal("Failing task due to absolute path symlinks") workdir = d.getVar('WORKDIR') sharedworkdir = os.path.join(d.getVar('TMPDIR'), "work-shared") From patchwork Wed Jan 8 10:58:59 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Purdie X-Patchwork-Id: 55221 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 1C5C8E77199 for ; Wed, 8 Jan 2025 10:59:11 +0000 (UTC) Received: from mail-wr1-f47.google.com (mail-wr1-f47.google.com [209.85.221.47]) by mx.groups.io with SMTP id smtpd.web11.16735.1736333945250712470 for ; Wed, 08 Jan 2025 02:59:05 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@linuxfoundation.org header.s=google header.b=frNov0yA; spf=pass (domain: linuxfoundation.org, ip: 209.85.221.47, mailfrom: richard.purdie@linuxfoundation.org) Received: by mail-wr1-f47.google.com with SMTP id ffacd0b85a97d-386329da1d9so7796591f8f.1 for ; Wed, 08 Jan 2025 02:59:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; t=1736333943; x=1736938743; 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; bh=Z0gGtCyAypqg3glP8fCKex5UG0j1T9X4A7eh3dK1djg=; b=frNov0yAzQ/l9Z/v//129SZgKGB8Awde78P/mcWEDtQnUqrJo1hPjVyDhBF49TwE8z LaYcn+ylCVfI1fzK+XXfQ3bDr1bHmOqnJDiEHSIEZx92mTsXMxRrIxAhE68wM1kjyIOj Qwljxnx7c0QYkpP79rKpWUm0jkV9Dnqdu6BDg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736333943; x=1736938743; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Z0gGtCyAypqg3glP8fCKex5UG0j1T9X4A7eh3dK1djg=; b=SFkBBVmOAmEHu0ypSRsYB9qjDRWQnNvc6upsP7+4DbyoAdf2B6QEGIVysSQguzIfvX bvGeBJj7eS5/31ko95mxEkgusvMuAM/Lq05ETRFw1QES/kKkBywTJpbfHDOr9gu5fkEH 9dRjdxl1Fy/ADzQwwVXjeFTTT7Uv9P3iwkAeChldGu48wXNb1ilhdxyi3u57e5jr2Tfb VsptgK7K2WceX+jaFMJCwWn8fLXWCJTR9zpU9z30dyqaW0Bmh85IbexNdPULPx7NUvf7 IIsN43k8KrgQ2AoLtvgAkvZW9D2VMznW2T1OBlX9/Ns5lg1bPBN955sKHvqDh/FDWFs1 PCug== X-Gm-Message-State: AOJu0YzSZXFG4B0odv/30/mx3jWg6L1zNEvcSFJfEUp53nO7wWw64iY3 KTybi5BQxqOorLkBHF8AnQMjvw4Q+FAxFuWlCtLAJhetyzuXSIRhEjoTLvGEbmAForGA5DyDmWZ yFE0= X-Gm-Gg: ASbGnctmhwJg+lB+UhNv4koaAZkERakKdWsZ85GaXigtDCYKfUw2z4+B+w72KTiSSVx skJguHKsTdrawwc4i5ZmdHTObH620dpA6f6QP+uYb9CVXwIFqyrLVYh3qkecKb4eRUMw4l+vN6S WPFhSG9HPRWMOqlkw5WT2PdcHHb58+MXgeuBz+wH0sSIKIK/SEoFkZP6geE7XaG87NybWuLt6At rZq4535925sm5HAlu4TZQz43PVawXDI/Be4SMNcQX6qscmDAXyTANcYKxDTHAuqsLl/4E+Futfl oencUJ0STw== X-Google-Smtp-Source: AGHT+IEIbMjH3p1eJly77zmEDshAZLN0u4gHQyeL+P/oqe1EW9K32vmsWIDJeZ4XU9mNhpcBDgt2bg== X-Received: by 2002:adf:b1dc:0:b0:38a:88bc:ace1 with SMTP id ffacd0b85a97d-38a88bcadc9mr922765f8f.34.1736333943244; Wed, 08 Jan 2025 02:59:03 -0800 (PST) Received: from max.int.rpsys.net ([2001:8b0:aba:5f3c:906a:f5af:b180:de5a]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38a1c8288b8sm52186033f8f.11.2025.01.08.02.59.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jan 2025 02:59:02 -0800 (PST) From: Richard Purdie To: openembedded-core@lists.openembedded.org Subject: [PATCH 3/3] bitbake.conf: Add libstdc++-native to ASSUME_PROVIDED Date: Wed, 8 Jan 2025 10:58:59 +0000 Message-ID: <20250108105859.3561400-3-richard.purdie@linuxfoundation.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20250108105859.3561400-1-richard.purdie@linuxfoundation.org> References: <20250108105859.3561400-1-richard.purdie@linuxfoundation.org> 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 ; Wed, 08 Jan 2025 10:59:11 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/209550 Fixing native class extension code highlighted this was missing, we do assume the system has a working libstdc++ compiler/runtime. Signed-off-by: Richard Purdie --- meta/conf/bitbake.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf index e3cf8a09582..6123bcd123d 100644 --- a/meta/conf/bitbake.conf +++ b/meta/conf/bitbake.conf @@ -217,6 +217,7 @@ ASSUME_PROVIDED = "\ hostperl-runtime-native \ hostpython-runtime-native \ libgcc-native \ + libstdc++-native \ patch-native \ sed-native \ tar-native \