From patchwork Wed Oct 1 10:59:28 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Naumann X-Patchwork-Id: 4383 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Wed, 01 Oct 2025 13:00:05 +0200 X-Sieve: CMU Sieve 2.4 Received: from mail-lj1-f190.google.com (mail-lj1-f190.google.com [209.85.208.190]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 591B04qb000514 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 1 Oct 2025 13:00:04 +0200 Received: by mail-lj1-f190.google.com with SMTP id 38308e7fff4ca-3649d917a39sf35715071fa.0 for ; Wed, 01 Oct 2025 04:00:04 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1759316399; cv=pass; d=google.com; s=arc-20240605; b=ZcRqNNyDMoEpB6PvVdJ4Go1zZP9i1RQLj+A7U7DbBO9SFHyxuAKAzov/nyqfndluxD pTZMSuxVIVk7GEQ99WE+8GFsZHbCP4lZ0MIARjD18NT7dxNaemBis+89xiNWzjHPYUgD dH2Hs4HpXxzyplMwTdSXXMw2cHJc41jJMlPwxWSypRBqmjzpXK06E7apFFl9XLV98ZBT hgtflQFnoseakqi7wteT5H82QUWK2VgKdpfLLMDVTeqwHRAhLVyyzUYzxZPD0j9cgB03 vjQKn7pMUvIdxOTEHQ3h6XcLmObubzJFcZ6jdOKwOJXGyLjDvmR/qDmKOeWwabvXK8Zm vUkw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=CTA15WM6oGLItO6Iks6AIZOPos1EX2iuHLwuPJeuGaQ=; fh=F4JfdH5axgsmaFI5+NJ5KwAWSsopKyUPKj8en5qR8MU=; b=gKJObUp9w4WJW4I8BrJ088/DAWjamtRJMUAoUhce+NjnfyU0XBuxFR6D4aMmI9PueM RpMKWNGJ0RlYUU0Y1bDS94S1su5FR95an98N5tVRK2/vUPbiyAZDeGJ5aXdxacdmrcHN +uUP0CEvOSy+/lG0aawOOIXGr3r9yeM0+PcxhwqBCdQVj6glNEFeATyMtvdzYMXkMCzy TZqIaeIUxfP+RrLJJcefpI4uLaNyp9j89Isowuj4okbmw/T0o7MUX/rNPK2daQqI0svU RreeCg/VgbWohVKgSLAsAgK168vzY9aJrXGO7RGnuD+vIRBrvKfgbcQpwohPr5llshy2 0gRQ==; darn=isar-build.org ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@emlix.com header.s=20250930 header.b=lnwAGZJ2; dkim=pass header.i=@emlix.com header.s=20250930 header.b=lnwAGZJ2; spf=pass (google.com: domain of anaumann@emlix.com designates 178.63.209.131 as permitted sender) smtp.mailfrom=anaumann@emlix.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=emlix.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1759316399; x=1759921199; darn=isar-build.org; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from:from:to :cc:subject:date:message-id:reply-to; bh=CTA15WM6oGLItO6Iks6AIZOPos1EX2iuHLwuPJeuGaQ=; b=Qm36NWg5nMt7QgQvqxbqi+nbN/rZZh+7n5r5fNID1wxBPxQPn3k3twIJnCLTwFrB/L wVLhpZniF4AhqnmUeCe6gKaSjjXCiDTJmZZdHpisblrLJUqCYfTQcwb1DTar0OsDLUTX fTAfpokgc/jaAYx8huAFVYWuN5ZJKVmqsHarcbtEd1XlZaeO0smXkExEjlqcNktaKE8R Kz1qmflohvVGhu9SEaKvhAJG17o/t9CrMCK8FU4t2DjRdtXQX3DLHV6YZWCKPoy/gwla PI8WFEm4vyhjTaSTqpCy8RTLLetFelyf1E1PiexzflsfeWSiQNWtglC4kM3rZjJB20Dq eMNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1759316399; x=1759921199; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :x-beenthere:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=CTA15WM6oGLItO6Iks6AIZOPos1EX2iuHLwuPJeuGaQ=; b=MvMUr4spi/uN8taFEXxOr6XjdOgpg5vgQ9hcrXe+7CO6v/cfY4syfsrrG4qzQ/GJhz orSTCSiuS09VZp2E0n2vrOJW0U+yDmJKtBKqaj76DoebYfCx+VSk/6nKntERpbV4K7Do 1Ml6xiu2CkTmRNetnxvamdMChDT699XHN8soHgJNC/358pbXwH0MLhpbxOxprEVpStO5 5H0NuZVtAAtk2g4Zff2JQt22NCb7ffsXbETDkVPq7/o4mulLnjJi0dn32Z5l08Hf3uzs SzbC4ToB+RjVnzJhRYEvToHmqsp5nixzprsyOQdK2c+8Ysv3/YYklpHEU/U9f7huQuOr bbMQ== X-Forwarded-Encrypted: i=2; AJvYcCVknL+OCOZKjApy6deWB8jfu7VMc4mGMbEi0dElPwxS5Jla6xV90AILNbCW75tE56zmGIdg79U=@isar-build.org X-Gm-Message-State: AOJu0YwzT88y6oMB2ZordJRl5B+T6hpi/DerifyC7k3TNdgUV2q1w+Xa 0eF0J4rzFXUbUS2jMrt9YPc/tdOste/Ny8M4V7Hp9DZzAtLqxST4GCXw X-Google-Smtp-Source: AGHT+IGbqTtuTcbCu+iLqNGd6Jp4rwvooL44FFB2qISNWe68pjqcM2W+tEQ6aiL2IaGNHsRPuOT5yA== X-Received: by 2002:a05:651c:1548:b0:35f:246:a751 with SMTP id 38308e7fff4ca-373a710a6f9mr7800051fa.5.1759316398574; Wed, 01 Oct 2025 03:59:58 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com; h="ARHlJd5mNC2k79Ln1nqhTATpiNM1s5JNTqjHvoZ0hH9610i7Bw==" Received: by 2002:a05:651c:1403:b0:363:22ce:bcfc with SMTP id 38308e7fff4ca-36f8aec437fls11688131fa.2.-pod-prod-03-eu; Wed, 01 Oct 2025 03:59:55 -0700 (PDT) X-Received: by 2002:a2e:bc94:0:b0:356:7e6f:c66b with SMTP id 38308e7fff4ca-373a7463382mr7558691fa.38.1759316395676; Wed, 01 Oct 2025 03:59:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1759316395; cv=none; d=google.com; s=arc-20240605; b=KzROrfjIMvX8UE0lPWLscXuT2fpqqNQJrOEpwK7M8RdvGK5xn7Okt6TogctkD7wNtt +HVuavSbCKeunmB2CIfqE1leehXKS6g2G2uhS66xPwN6A4ESdHAF4KiOS3hJ6X5m3TdR tJYD6Y1oYTn6sAe/BV6OHpWwE3W06i8kCEoP8b27NwiweOKN4yoHcjMGmslA0xBM6VHm Y3WvqJL/J/4UM7mUSt9AcxiuoEj/1WoN6s6AmwXAYfB8cWAKZtJQ0EU83SNCUmByJd+S Myx2p1YVrEZhVh/yHdTzcZZ6pI/wiw1jSCD/xOwVXGqQwUZiNo4O2cooxbNf2Y3ZFlOf H4DA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature:dkim-signature; bh=RWzuebvhj4W0Tlaln/kxlulOVy/+oT6rMt/NbZaMOr0=; fh=h/3u+BnesbohrVPBf25WVa1dvt5UrhWAO6IFZkZXrvU=; b=aLkBH4y9zXIqBViJJrTaCcykqjmc+eR3YdDiqCEy1DrQMZzskcunerBQC7cS+ddMCv rxK7h1sR6S6Ub8uKaNO9HZDDJClQR2DwRPhgsq4iotjliqP83O/1DQ84ZeG4tCz1zi0c jJDUMeEGXVzzM5sLDlSAWhw54k6GZ37zd5u/BY6SskIj+uuL21Hym0jMu/a9MU47VIxP Jr8S2esEIzPmz5YjITBlzvreBTYjqp3IJg+BbZ0/SqMZK0sq8BEYvQVIYE66z3J7YrSy bZA/H5K251OXGoB3JG0nMFTcZc06XGPsmyquxmhKbYtDQr1k7jQbMIPwQl/lNlQGV4cD U36g==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@emlix.com header.s=20250930 header.b=lnwAGZJ2; dkim=pass header.i=@emlix.com header.s=20250930 header.b=lnwAGZJ2; spf=pass (google.com: domain of anaumann@emlix.com designates 178.63.209.131 as permitted sender) smtp.mailfrom=anaumann@emlix.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=emlix.com Received: from mx1.emlix.com (mx1.emlix.com. [178.63.209.131]) by gmr-mx.google.com with ESMTPS id 38308e7fff4ca-36fb615e768si3323481fa.5.2025.10.01.03.59.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Oct 2025 03:59:55 -0700 (PDT) Received-SPF: pass (google.com: domain of anaumann@emlix.com designates 178.63.209.131 as permitted sender) client-ip=178.63.209.131; Received: from mx1.emlix.com (localhost [127.0.0.1]) by mx1.emlix.com (Postfix) with ESMTP id 8D41A5FEDA for ; Wed, 1 Oct 2025 12:59:36 +0200 (CEST) Received: from mailer.emlix.com (p5098be52.dip0.t-ipconnect.de [80.152.190.82]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.emlix.com (Postfix) with ESMTPS id 7D1A05F84A for ; Wed, 1 Oct 2025 12:59:36 +0200 (CEST) X-Patchwork-Original-From: "'Andreas Naumann' via isar-users" From: Andreas Naumann To: isar-users@googlegroups.com Cc: Andreas Naumann Subject: [PATCH 4/5] multiarch: Prevent providing incompatible native packages Date: Wed, 1 Oct 2025 12:59:28 +0200 Message-ID: <20251001105929.3731537-5-anaumann@emlix.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251001105929.3731537-1-anaumann@emlix.com> References: <20251001105929.3731537-1-anaumann@emlix.com> MIME-Version: 1.0 X-Virus-Scanned: ClamAV using ClamSMTP X-Original-Sender: anaumann@emlix.com X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@emlix.com header.s=20250930 header.b=lnwAGZJ2; dkim=pass header.i=@emlix.com header.s=20250930 header.b=lnwAGZJ2; spf=pass (google.com: domain of anaumann@emlix.com designates 178.63.209.131 as permitted sender) smtp.mailfrom=anaumann@emlix.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=emlix.com X-Original-From: Andreas Naumann Reply-To: Andreas Naumann Precedence: list Mailing-list: list isar-users@googlegroups.com; contact isar-users+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: isar-users@googlegroups.com X-Google-Group-Id: 914930254986 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , X-Spam-Status: No, score=-4.9 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H2,RCVD_IN_RP_CERTIFIED, RCVD_IN_RP_RNBL,RCVD_IN_RP_SAFE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shymkent.ilbers.de X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= When extending/providing native packages, we must not do so with packages that are incompatible with the HOST_ARCH because otherwise, depending on the PV, they may override a sibling package which does support the HOST_ARCH but with a lower PV. To do this introduce a check for the packages DPKG_ARCH compatibility. - For cross-target configurations, just prevent providing the extended package. - For native-target configurations, skip the recipe altogether as the base variant will not be compatible as well. - Excempt the recipe skipping in case DPKG_ARCH is not set which may be the case for - a recipe that produces multiple debian packages with varying Architecture settings - a recipe is not suited to native/compat handling but inherits multiarch indirectly anyway. Signed-off-by: Andreas Naumann --- meta/classes/multiarch.bbclass | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/meta/classes/multiarch.bbclass b/meta/classes/multiarch.bbclass index 5b67d779..03c55bbe 100644 --- a/meta/classes/multiarch.bbclass +++ b/meta/classes/multiarch.bbclass @@ -8,6 +8,9 @@ python() { pn = d.getVar('PN') archDiffers = d.getVar('HOST_ARCH') != d.getVar('DISTRO_ARCH') archIsAll = d.getVar('DPKG_ARCH') == 'all' + archIsAny = d.getVar('DPKG_ARCH') == 'any' + archIsNative = d.getVar('DPKG_ARCH') == d.getVar('HOST_ARCH') + archIsKnown = d.getVar("DPKG_ARCH", True) def pn_multiarch_target(pn): return pn.endswith('-native') or pn.endswith('-compat') @@ -32,9 +35,15 @@ python() { # We must not short-circuit for DPKG_ARCH=all packages, as they might # have transitive dependencies which need to be built for -native. if archDiffers: - d.appendVar('BBCLASSEXTEND', ' native') + if archIsNative or archIsAll or archIsAny: + d.appendVar('BBCLASSEXTEND', ' native') + elif archIsKnown: + bb.debug(2, "Package %s is not compatible with the host architecture. Skipped extending as -native" % pn) else: - extend_provides(pn, 'native', d) + if archIsAll or archIsAny or archIsNative: + extend_provides(pn, 'native', d) + elif archIsKnown: + raise bb.parse.SkipRecipe("Incompatible with the target architecture %s" % d.getVar('DISTRO_ARCH')) # drop own -native build dependencies at recipe level if building natively # and not for the builder architecture