From patchwork Mon Oct 9 14:39:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pavel Zhukov X-Patchwork-Id: 31868 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 99900E95A91 for ; Mon, 9 Oct 2023 14:40:20 +0000 (UTC) Received: from wout4-smtp.messagingengine.com (wout4-smtp.messagingengine.com [64.147.123.20]) by mx.groups.io with SMTP id smtpd.web11.63276.1696862419571352817 for ; Mon, 09 Oct 2023 07:40:19 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@zhukoff.net header.s=fm2 header.b=YazqBcZ9; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=hKNCXn3E; spf=pass (domain: zhukoff.net, ip: 64.147.123.20, mailfrom: pavel@zhukoff.net) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id BE3813200A91; Mon, 9 Oct 2023 10:40:18 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Mon, 09 Oct 2023 10:40:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zhukoff.net; h= cc:cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:message-id:mime-version:reply-to:sender:subject :subject:to:to; s=fm2; t=1696862418; x=1696948818; bh=6D4vlpoDbn RmHfcVFKrt1RkNc5QdhUR/KO2huCnKAq4=; b=YazqBcZ9zHmau2OJ4KulWS9Zl/ CRvHBMykW4m55h5oGCCkoyaaExSm5rkP5maKFCQVsrOXaDWuToMGQFRVYJkgvidQ oNavgQARR4j5riXK7T8cOeZd2oDekRirydDXyVoO4KYLV6SC9hh3G9QV5ivwM5ze io2nCgCxnFSjc+EKiFHMrQoq9m0qarTowG3sP0ZtSri+zj47k6cnJLrkuiNNdAGu C8TbC+orhRtCmTW3moLIlgzH64oO/rxCH2YBlewcGt2y8cF2/+Yg+fb4kzS08JIu GCbwsu4Bbm13pvk1QrzeXv80evHXhKPnnPkeQ8X+4cnxGJtv6nGmyYjZ+5KA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:message-id:mime-version:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; t=1696862418; x=1696948818; bh=6D4vlpoDbnRmH fcVFKrt1RkNc5QdhUR/KO2huCnKAq4=; b=hKNCXn3EFG+x3lgkCagtqUWIEzxYB f3jjWeH0kIA+niYy8ey0p0UfhMXBNCxNGCvJpBMaA8SQTGWUwiWGD4tDUeBZghRR GlNv8RsY+ekpdDE5NQxaxm6K/I8HAC1Of4NH7Zyy9e33Or6eu1n8jsnzF2MGwiY3 zhnCwq1lQ8RXakHvCXJGFhzxafosimh15Dpar7tnRk7h20qh797E6LAqBptHczTx puwOTRpgVytqqm+ZmkBXUON71McvsEtS12X61T6b1m5RvIi11ZXul9SdqDU0uBTA r6tFQmV3yqn3FqmubCSUKiuNQAP35NIwYo6JpZejJC+dTx2h+b/jjmERA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrheefgdektdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhephffvvefufffkofgggfestdekredtre dttdenucfhrhhomheprfgrvhgvlhcukghhuhhkohhvuceophgrvhgvlhesiihhuhhkohhf fhdrnhgvtheqnecuggftrfgrthhtvghrnhepveefjeekjedugeeltdekjefhtedtfeejue ffheeikedvudfgtdffffelvddvfefhnecuvehluhhsthgvrhfuihiivgeptdenucfrrghr rghmpehmrghilhhfrhhomhepphgrvhgvlhesiihhuhhkohhffhdrnhgvth X-ME-Proxy: Feedback-ID: ib94946c9:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 9 Oct 2023 10:40:17 -0400 (EDT) From: Pavel Zhukov To: openembedded-core@lists.openembedded.org Cc: Pavel Zhukov Subject: [PATCH v3 1/4] dummy-sdk-package.inc: Filter packages which are marked for installation Date: Mon, 9 Oct 2023 16:39:58 +0200 Message-ID: <20231009144001.21150-1-pavel@zhukoff.net> X-Mailer: git-send-email 2.41.0 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, 09 Oct 2023 14:40:20 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/188837 if packages is provided by dummysdk and in the same time marked for installation with IMAGE_INSTALL it causes conflict in apt because virtual providers are not taken into account if package is asked to be installed explicitly. Filter such packages from provides/conflicts to workaround this problem. This workaround brakes RPM usecase because of file conlicts with DUMMYPROVIDES, use DUMMYPROVIDES_PACKAGES_MULTILIB instead (which doesn't include file based conflicts). While this is needed for the case of package_deb only adding it for all package managers to not complicate the code. Fixes: [Yocto #13338] [Yocto #14066] Fixes: The following information may help to resolve the situation: The following packages have unmet dependencies: target-sdk-provides-dummy : Conflicts: bash E: Unable to correct problems, you have held broken packages. Signed-off-by: Pavel Zhukov --- meta/recipes-core/meta/dummy-sdk-package.inc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/meta/recipes-core/meta/dummy-sdk-package.inc b/meta/recipes-core/meta/dummy-sdk-package.inc index bd26e39ad3..99863b86f1 100644 --- a/meta/recipes-core/meta/dummy-sdk-package.inc +++ b/meta/recipes-core/meta/dummy-sdk-package.inc @@ -19,13 +19,14 @@ PR[vardeps] += "DUMMYPROVIDES" PR[vardeps] += "DUMMYPROVIDES_PACKAGES" DUMMYPROVIDES_PACKAGES ??= "" -DUMMYPROVIDES_PACKAGES_MULTILIB = "${@' '.join([multilib_pkg_extend(d, pkg) for pkg in d.getVar('DUMMYPROVIDES_PACKAGES').split()])}" +DUMMYPROVIDES_PACKAGES_FILTERED = "${@' '.join([pkg for pkg in d.getVar('DUMMYPROVIDES_PACKAGES').split() if d.getVar('IMAGE_INSTALL') is None or pkg not in d.getVar('IMAGE_INSTALL').split()])}" +DUMMYPROVIDES_PACKAGES_MULTILIB = "${@' '.join([multilib_pkg_extend(d, pkg) for pkg in d.getVar('DUMMYPROVIDES_PACKAGES_FILTERED').split()])}" DUMMYPROVIDES += "${DUMMYPROVIDES_PACKAGES_MULTILIB}" python populate_packages:prepend() { p = d.getVar("PN") d.appendVar("RPROVIDES:%s" % p, "${DUMMYPROVIDES}") - d.appendVar("RCONFLICTS:%s" % p, "${DUMMYPROVIDES}") + d.appendVar("RCONFLICTS:%s" % p, "${DUMMYPROVIDES_PACKAGES_MULTILIB}") d.appendVar("RREPLACES:%s" % p, "${DUMMYPROVIDES_PACKAGES_MULTILIB}") } From patchwork Mon Oct 9 14:39:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pavel Zhukov X-Patchwork-Id: 31869 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 796C2E95A8E for ; Mon, 9 Oct 2023 14:40:30 +0000 (UTC) Received: from wout4-smtp.messagingengine.com (wout4-smtp.messagingengine.com [64.147.123.20]) by mx.groups.io with SMTP id smtpd.web11.63281.1696862421441987254 for ; Mon, 09 Oct 2023 07:40:21 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@zhukoff.net header.s=fm2 header.b=ayoHnFW9; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=HkIvZ9e1; spf=pass (domain: zhukoff.net, ip: 64.147.123.20, mailfrom: pavel@zhukoff.net) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id C569B32001E9; Mon, 9 Oct 2023 10:40:20 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Mon, 09 Oct 2023 10:40:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zhukoff.net; h= cc:cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm2; t=1696862420; x= 1696948820; bh=42WpsqBIuw6YdLaOHdAKyVVtJT1anSyRGQwJ3uZjeBU=; b=a yoHnFW9rO5quOi1bVypXASmzpShrXYdE2sQ846T6/xl89ohG8iSEBUGfL0pomRv0 GVQecNSXL1wUY/zuuxR5Y3tqhVqAV2Hu5y++Fo8PPkt6LmJ+xhVbkDsBKB2yxQLO S64ht6ygp9Gewvs0uwNYenCi/RwFrn3i7HxqH+uETLUdyBWTUL2Y0rWSlM5u9YXF 5Z3fI2fOixOv+b3IXmN8a/sJr/4moDN2vx9INmF9MLzquF6aIEpiIRN+lnjkwEiW YCfALOjWlbJDqxXXkVl2rlNXdPdAbEzLnF7cshxy4zG+tId81veVT89elWA4/PA8 tONARav0DVP6Izyw46LCw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1696862420; x= 1696948820; bh=42WpsqBIuw6YdLaOHdAKyVVtJT1anSyRGQwJ3uZjeBU=; b=H kIvZ9e18oiJMCqOQD7qosddGBj0J+C9f+8dYwdAUoV0PZoDeapPIvhm1Z1Fv+rnu Y/CvC5GG03OpZTqt/Fcj7kLCcROF7cYixpN1U7VR1GXTcTHOChKrymyQKYsRlNEL bPAH7obJ6P8HgXZKwjTjuDVILXeIHUbfO9u7u9fGpSqhJrIWw3unF5KNu7blT5fv tuCEHnu+wR0E2rwkmd9zx0MmWRKCTbkl8qPVCgLqFmEZLBDqVGudrBrXinTRZIzP UWXMAP43PlFLDgAeyHnWCJzaXE7JCbuUekFirVSwgqUWNHxspFEwS5I+L1FW50Ln JV4e8rrwHCcyr9KnBv6/w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrheefgdektdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhephffvvefufffkofgjfhgggfestdekre dtredttdenucfhrhhomheprfgrvhgvlhcukghhuhhkohhvuceophgrvhgvlhesiihhuhhk ohhffhdrnhgvtheqnecuggftrfgrthhtvghrnhepvdetffekteefkeduleefueevveduvd ekudffgfdtvdfhuedtudffudeulefhgfeunecuffhomhgrihhnpeguvggsihgrnhdrohhr ghenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehprg hvvghlseiihhhukhhofhhfrdhnvght X-ME-Proxy: Feedback-ID: ib94946c9:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 9 Oct 2023 10:40:19 -0400 (EDT) From: Pavel Zhukov To: openembedded-core@lists.openembedded.org Cc: Pavel Zhukov Subject: [PATCH v3 2/4] package_deb: Revert versioned providers workaround Date: Mon, 9 Oct 2023 16:39:59 +0200 Message-ID: <20231009144001.21150-2-pavel@zhukoff.net> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231009144001.21150-1-pavel@zhukoff.net> References: <20231009144001.21150-1-pavel@zhukoff.net> 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, 09 Oct 2023 14:40:30 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/188838 dpkg and apt seem to handle versioned provides correctly now [1] so this workaround is not needed anymore. This fixes [Yocto #14995] for package_deb. [1] https://www.debian.org/doc/debian-policy/ch-relationships.html#virtual-packages-provides Signed-off-by: Pavel Zhukov --- meta/classes-global/package_deb.bbclass | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/meta/classes-global/package_deb.bbclass b/meta/classes-global/package_deb.bbclass index 5aba3837bd..d7bbfae3fb 100644 --- a/meta/classes-global/package_deb.bbclass +++ b/meta/classes-global/package_deb.bbclass @@ -184,8 +184,6 @@ def deb_write_pkg(pkg, d): # '<' = less or equal # '>' = greater or equal # adjust these to the '<<' and '>>' equivalents - # Also, "=" specifiers only work if they have the PR in, so 1.2.3 != 1.2.3-r0 - # so to avoid issues, map this to ">= 1.2.3 << 1.2.3.0" for dep in list(var.keys()): if '(' in dep or '/' in dep: newdep = re.sub(r'[(:)/]', '__', dep) @@ -200,10 +198,6 @@ def deb_write_pkg(pkg, d): var[dep][i] = var[dep][i].replace("< ", "<< ") elif (v or "").startswith("> "): var[dep][i] = var[dep][i].replace("> ", ">> ") - elif (v or "").startswith("= ") and "-r" not in v: - ver = var[dep][i].replace("= ", "") - var[dep][i] = var[dep][i].replace("= ", ">= ") - var[dep].append("<< " + ver + ".0") rdepends = bb.utils.explode_dep_versions2(localdata.getVar("RDEPENDS") or "") debian_cmp_remap(rdepends) @@ -220,8 +214,7 @@ def deb_write_pkg(pkg, d): del rrecommends[dep] rsuggests = bb.utils.explode_dep_versions2(localdata.getVar("RSUGGESTS") or "") debian_cmp_remap(rsuggests) - # Deliberately drop version information here, not wanted/supported by deb - rprovides = dict.fromkeys(bb.utils.explode_dep_versions2(localdata.getVar("RPROVIDES") or ""), []) + rprovides = bb.utils.explode_dep_versions2(localdata.getVar("RPROVIDES") or "") # Remove file paths if any from rprovides, debian does not support custom providers for key in list(rprovides.keys()): if key.startswith('/'): From patchwork Mon Oct 9 14:40:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pavel Zhukov X-Patchwork-Id: 31870 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 8CC77E95A96 for ; Mon, 9 Oct 2023 14:40:30 +0000 (UTC) Received: from wout4-smtp.messagingengine.com (wout4-smtp.messagingengine.com [64.147.123.20]) by mx.groups.io with SMTP id smtpd.web10.63906.1696862423471799649 for ; Mon, 09 Oct 2023 07:40:23 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@zhukoff.net header.s=fm2 header.b=1lwbZDC8; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=RK6ODhS1; spf=pass (domain: zhukoff.net, ip: 64.147.123.20, mailfrom: pavel@zhukoff.net) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id CEEB632001E9; Mon, 9 Oct 2023 10:40:22 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Mon, 09 Oct 2023 10:40:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zhukoff.net; h= cc:cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm2; t=1696862422; x= 1696948822; bh=xe6HLWVk4lQlvXH6aF0wyCsRQ+3At8zDDdK/u2bJIXI=; b=1 lwbZDC816qpkGpkAgC1zHViLQF+t+0bNXDDbpud1JC5HipWFonl5QJI0u4aEkxC4 om/yFLVF+m4S5oBwsgS10HMu82zH4GZDopnFAl85jkMl/t1dNgEPvnd/TmeWGEb/ AWxoskSNYm9Tx+k6JdVfYBlb8E8dgiGpUTeHiM1pxkZB1RB00LxI2ttLd+Yf2S1s dOiT69ISz9aJjVzhqjFzufAhOkEtnQX7DCcPTEbw0Hj3JLgh9nE9e5hc8A6j5dw7 7EQpmoaw877hbHBK04qzXTo5MAhffrqJFLK6HrzkuQflg9L+OghmX9RhxhwnM9XG DMsCExEmZrce4UHLgaeVw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1696862422; x= 1696948822; bh=xe6HLWVk4lQlvXH6aF0wyCsRQ+3At8zDDdK/u2bJIXI=; b=R K6ODhS1pQ7vVC+XdzamKs3WiMk/qxY9KKlR5ZMRmCwEG03Rp9F/rFe9K2w24VauB Mb+zOfMqbKqnssJWBntncWSRagGN5hnPwXVCLmKzMSdcV+zW+2wTuDBt6YfJSnFT jsDMKFYabaf7EP50GsW7HA57tz/9bSwPDTmjFI6ABjre02CYTRKqxQZgVaK7Xdtt pR0v4wLXq+BIRTrm7JbUOei1tKe9EB/5YxMyXv3KdpBGtwuLJUFAg2GedHqe8ZG4 oGf2HFcMCWRzZ5Qrf76CuDTlkNurfuVd3QohOpnl2eMhlYVRq9srrzVlXiYfWJk0 U4qUyENNccxMnTthEsTlg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrheefgdejlecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhephffvvefufffkofgjfhgggfestdekre dtredttdenucfhrhhomheprfgrvhgvlhcukghhuhhkohhvuceophgrvhgvlhesiihhuhhk ohhffhdrnhgvtheqnecuggftrfgrthhtvghrnhepgeeivedvieeikeehkeefiefgtdeuje ffueeguddtuedtteffvdfgteeltdelkeevnecuvehluhhsthgvrhfuihiivgeptdenucfr rghrrghmpehmrghilhhfrhhomhepphgrvhgvlhesiihhuhhkohhffhdrnhgvth X-ME-Proxy: Feedback-ID: ib94946c9:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 9 Oct 2023 10:40:21 -0400 (EDT) From: Pavel Zhukov To: openembedded-core@lists.openembedded.org Cc: Pavel Zhukov Subject: [PATCH v3 3/4] dummy-sdk-package.inc: Specify providers version Date: Mon, 9 Oct 2023 16:40:00 +0200 Message-ID: <20231009144001.21150-3-pavel@zhukoff.net> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231009144001.21150-1-pavel@zhukoff.net> References: <20231009144001.21150-1-pavel@zhukoff.net> 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, 09 Oct 2023 14:40:30 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/188839 Some of the packages require versioned providers (DEPENDS: perl (>= 5.38) is an example and for such packages do_populate_sdk fails because dummy packages provided unversioned packages (PROVIDES: perl) which doesn't meet the version requirement. Specify 999.9-r9 version for such provides to work this around Fixes [Yocto #14995] Signed-off-by: Pavel Zhukov --- meta/recipes-core/meta/dummy-sdk-package.inc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/meta/recipes-core/meta/dummy-sdk-package.inc b/meta/recipes-core/meta/dummy-sdk-package.inc index 99863b86f1..b1571a2cc5 100644 --- a/meta/recipes-core/meta/dummy-sdk-package.inc +++ b/meta/recipes-core/meta/dummy-sdk-package.inc @@ -18,14 +18,17 @@ ALLOW_EMPTY:${PN} = "1" PR[vardeps] += "DUMMYPROVIDES" PR[vardeps] += "DUMMYPROVIDES_PACKAGES" +DUMMYMAXVER ??= "999.9-r9" DUMMYPROVIDES_PACKAGES ??= "" DUMMYPROVIDES_PACKAGES_FILTERED = "${@' '.join([pkg for pkg in d.getVar('DUMMYPROVIDES_PACKAGES').split() if d.getVar('IMAGE_INSTALL') is None or pkg not in d.getVar('IMAGE_INSTALL').split()])}" DUMMYPROVIDES_PACKAGES_MULTILIB = "${@' '.join([multilib_pkg_extend(d, pkg) for pkg in d.getVar('DUMMYPROVIDES_PACKAGES_FILTERED').split()])}" +DUMMYPROVIDES_MAXVER = "${@' '.join(['{} (= {})'.format(pkg, d.getVar('DUMMYMAXVER')) for pkg in d.getVar('DUMMYPROVIDES_PACKAGES_MULTILIB').split()]) + d.getVar('DUMMYPROVIDES')}" + DUMMYPROVIDES += "${DUMMYPROVIDES_PACKAGES_MULTILIB}" python populate_packages:prepend() { p = d.getVar("PN") - d.appendVar("RPROVIDES:%s" % p, "${DUMMYPROVIDES}") + d.appendVar("RPROVIDES:%s" % p, "${DUMMYPROVIDES_MAXVER}") d.appendVar("RCONFLICTS:%s" % p, "${DUMMYPROVIDES_PACKAGES_MULTILIB}") d.appendVar("RREPLACES:%s" % p, "${DUMMYPROVIDES_PACKAGES_MULTILIB}") } From patchwork Mon Oct 9 14:40:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pavel Zhukov X-Patchwork-Id: 31871 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 7CB7CE95A95 for ; Mon, 9 Oct 2023 14:40:30 +0000 (UTC) Received: from wout4-smtp.messagingengine.com (wout4-smtp.messagingengine.com [64.147.123.20]) by mx.groups.io with SMTP id smtpd.web11.63285.1696862425289974668 for ; Mon, 09 Oct 2023 07:40:25 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@zhukoff.net header.s=fm2 header.b=zS7TQjMs; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=TFLIPcvI; spf=pass (domain: zhukoff.net, ip: 64.147.123.20, mailfrom: pavel@zhukoff.net) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id A465C32001E9; Mon, 9 Oct 2023 10:40:24 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Mon, 09 Oct 2023 10:40:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zhukoff.net; h= cc:cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm2; t=1696862424; x= 1696948824; bh=U5h2qX5fS5zk+HoQyUJ+Ks9HKqplbPZBa+79YH2Wh+Q=; b=z S7TQjMsTp1xTFLKIucM3IiDgUGw+rjWu0Ex37RhW9ECdO2DbR8YDNIMZ5Vas4wVT 51eqQCymQFc5VtCm0tLAm869uMBhwVkM5jiio5uOUK0HUF4GDZpKygqQ4VOFadh5 tV2swUp2KEnRm2dN1ssfWx/l3v8L1Qn5zzDePqjd4fdaBR5TLQIYgEoKIqQmydsy AjtMxV2st3/H+Ha537hTd5liMheLocfNvkrztid4gYVvyjcEW3jdaLksQsKQVwWL eQisYhtgWHDQWn0VuzeBBcDIpZkRSYs2BP4ZgQjkK1AyIQpEvB9eoW9VtjZzaQgj qHihoRU6ZmHO/Ejr0Z3WQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1696862424; x= 1696948824; bh=U5h2qX5fS5zk+HoQyUJ+Ks9HKqplbPZBa+79YH2Wh+Q=; b=T FLIPcvIwsHgwDRcAA1lQ02TlXsJj/sMI9zE6FfA7LAUmwoXItpJRB9a9XIQYI4Mf H3UVgnibS5+KolhrgdAaGWaj1r/i5PP+DIDd0XxuR/5LaO6+HWDvWvvt8tJGZA5o xtDyU2QAM7H+eMSJot7mNbxdAn1CRMtb+Nvem0wzJUbuRnmNGR9S3amD1U3R6oa/ 8/+G67zYkgDR6GWcwlkQ2H9Su6DQ9pKuwIaYIaDNeZobvdKcigI7f1JnkKfFUTQq G/clQWwayEgsdyrV2Vu9EDJQYRGUn6q816U/kEm6y7KDuJb3GqipBpOVszylS1gv hM65nEE3i25fJkuUE0ykA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrheefgdejlecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhephffvvefufffkofgjfhgggfestdekre dtredttdenucfhrhhomheprfgrvhgvlhcukghhuhhkohhvuceophgrvhgvlhesiihhuhhk ohhffhdrnhgvtheqnecuggftrfgrthhtvghrnhepteeigfejueekfeetjeefueeggfeihe egueehveeiieekgfegffevgefgjeeuudetnecuffhomhgrihhnpehsvghlfhhtvghsthdr tggrshgvpdhlohhgghgvrhdrihhnfhhonecuvehluhhsthgvrhfuihiivgeptdenucfrrg hrrghmpehmrghilhhfrhhomhepphgrvhgvlhesiihhuhhkohhffhdrnhgvth X-ME-Proxy: Feedback-ID: ib94946c9:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 9 Oct 2023 10:40:23 -0400 (EDT) From: Pavel Zhukov To: openembedded-core@lists.openembedded.org Cc: Pavel Zhukov Subject: [PATCH v3 4/4] selftest: Add tests for populate_sdk task Date: Mon, 9 Oct 2023 16:40:01 +0200 Message-ID: <20231009144001.21150-4-pavel@zhukoff.net> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231009144001.21150-1-pavel@zhukoff.net> References: <20231009144001.21150-1-pavel@zhukoff.net> 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, 09 Oct 2023 14:40:30 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/188840 Two tests to cover both installing package with IMAGE_INSTALL as well as installing versioned dependencies of the package (using perl (>= 5.XX). Related: [Yocto #13338] [Yocto #14995] [Yocto #14066] Signed-off-by: Pavel Zhukov --- .../testsdk-perldepends.bb | 16 ++++ meta/lib/oeqa/selftest/cases/sdk.py | 79 +++++++++++++++++++ 2 files changed, 95 insertions(+) create mode 100644 meta-selftest/recipes-test/testsdk-perldepends/testsdk-perldepends.bb create mode 100644 meta/lib/oeqa/selftest/cases/sdk.py diff --git a/meta-selftest/recipes-test/testsdk-perldepends/testsdk-perldepends.bb b/meta-selftest/recipes-test/testsdk-perldepends/testsdk-perldepends.bb new file mode 100644 index 0000000000..428e1f52e2 --- /dev/null +++ b/meta-selftest/recipes-test/testsdk-perldepends/testsdk-perldepends.bb @@ -0,0 +1,16 @@ +SUMMARY = "Test recipe for sdk populate test case" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" + +INHIBIT_DEFAULT_DEPS = "1" + +RDEPENDS:${PN}="perl (>= 5.12)" + +do_install(){ + mkdir -p ${D}/var/lib/ + touch ${D}/var/lib/testname + echo "${PN}" > ${D}/var/lib/testname +} + + + diff --git a/meta/lib/oeqa/selftest/cases/sdk.py b/meta/lib/oeqa/selftest/cases/sdk.py new file mode 100644 index 0000000000..35734d8a7a --- /dev/null +++ b/meta/lib/oeqa/selftest/cases/sdk.py @@ -0,0 +1,79 @@ +# +# Copyright OpenEmbedded Contributors +# +# SPDX-License-Identifier: MIT +# + +import os + +from oeqa.selftest.case import OESelftestTestCase +from oeqa.utils.commands import get_bb_var, bitbake + +class PopulateSDK(OESelftestTestCase): + '''Tests for populate SDK task(s)''' + + @classmethod + def setUpClass(self): + + super(PopulateSDK, self).setUpClass() + self.buildtarget = 'core-image-minimal' + self.classname = 'PopulateSDK' + + def sdk_build(self): + """ + Test if package added via IMAGE_INSTALL + conflicts with dummy SDK providers + """ + SDKTASK = '-c populate_sdk' + bbargs = "{} {}".format(SDKTASK, self.buildtarget) + self.logger.info("{}: doing bitbake {} ".format(self.classname, bbargs)) + return bitbake(bbargs).status + + def set_config(self, image_install, package_classes): + config = 'IMAGE_INSTALL:append = " {}"\n'.format(image_install) + config += 'PACKAGE_CLASSES = " package_{}"\n'.format(package_classes) + return config + + def do_test_build(self, image_install, package_manager): + self.write_config(self.set_config(image_install, package_manager)) + res = self.sdk_build() + self.assertEqual(0, res, "Failed to populate SDK with {} in IMAGE_INSTALL and {} package manager"\ + .format(image_install, package_manager)) + + def test_image_install_ipk(self): + """ + Regression test for [Yocto #13338] + """ + self.do_test_build("bash", "ipk") + + def test_image_install_rpm(self): + """ + Regression test for [Yocto #13338] + """ + self.do_test_build("bash", "rpm") + + def test_image_install_deb(self): + """ + Regression test for [Yocto #13338] + """ + self.do_test_build("bash", "deb") + + + def test_image_install_confictdeps_ipk(self): + """ + Regression test for [Yocto #14995] + """ + self.skipTest("Disabled until [Yocto #14995] is fixed") + self.do_test_build("testsdk-perldepends", "ipk") + + def test_image_install_confictdeps_rpm(self): + """ + Regression test for [Yocto #14995] + """ + self.do_test_build("testsdk-perldepends", "rpm") + + def test_image_install_confictdeps_deb(self): + """ + Regression test for [Yocto #14995] + """ + self.do_test_build("testsdk-perldepends", "deb")