From mboxrd@z Thu Jan 1 00:00:00 1970 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-f189.google.com (mail-lj1-f189.google.com [209.85.208.189]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 591B04A0000512 (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-f189.google.com with SMTP id 38308e7fff4ca-369b2d355d0sf41244371fa.3 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=jdrzE7NwHllbCpblGhcbzyiBUymwCllA69zgzkr3e5ktStTY+MMHBpzt66fG90bfFv AANaW7Iil8yOvSffh2DIwkTx6byQ5zM22qfyK7fae3HMZVCj9/NfKf+3+A4e1+Mbmmm+ 3pJ1Q0z0DZKhZ+VjyaudHr2rT+WXc2IGbjHXMRR+adIPIjUJOwxMMzyjSi7S/kTrK/9j pCY8JHPRRgpon9g5F8GgetJDsht7cvX2Jpr0Vis9QvL6McNNJYfH6HZVuSSBYvTSFARq KZ8tBUBxh1+cnXiwZEQEJooq/HVd3+2OAgb+JhMOhN17xMGkBbhqxMGkARBgwxxUEcOn qB1w== 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=KW6Cv6pbXaJGUt9K/aoYM8u2VwqRw++xztwZH4ld624=; b=CxnB/lDS7A05N0kiBC03qOOC19g6N3hwKumOYHmAOMgBCk7yxDZ2zhLuZxqxfqGkA4 MAo8yq/hk9ehcNm1zjW9bm0PIki7VAHnpH4//MDcsV578gxu2xgEX5pXS8mjF17+WdtY sAg68G5LsyKoIWiUjABGOCxQM0xux/RTDzISLf3UQmIFKoZYWZS3LOr4k27qrM+gkj5P le6Hy7lyF5tRFzv1B7jEiI0hXo0655qSvYIiHHdaIlaXLziT0SwMm7N0rzU+4Q6bhkAe bphJq/WzJhBBagMCAGsd/iTM2liy8KBmgWi7/dgLAh28m+4DcuI3huQ4IpO9XXS1B9Ih 0eQQ==; darn=ilbers.de 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=ilbers.de; 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=ZsLTf8urln6KWiC9ZqvptQb/WoPRPHJPLPQi4eVrWzraqM38MvYQOPu96ajwMLPlXb xwRQt5yD1LH6uhbV+JHOHpv5ycFofIkmdAZI4j8fr9dTQVoAxMO6tAcCHbQqWVkubTKy LXls/Qux974DALAze5ctHC+7zZtBRBlwsTRdW7CFi+s3wBG0dHRzLJnmP45Ni4UTswWI TKfC7pxeJbdDKmr2rhP/wrRaF07uhoxQAAvSTlyvptJq0hELPYzfymfmCwZEID3k3qtn YS82C+IshT+ZBve0LbjuzTQlT1CEnDEt8v5fc60nA44ARk0W+7d82a4Z9ZuBb/hjwj2q eVMA== 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=FihUTzZ+ucJSjZec6xsDtZZL7ozopUTW2fp941CESCTJ+bGoR8o0dMHNhZ5cilcwZT hmmUYZHzTCmRP/GqVCBNMP8OlbmsFC1ILD4tXxXoOGSga8xTKqu1IX40QGRXBzt4LJJb H0URy9EEn5mEPqhGEtHm6TcX19Qsror6Zpt2ps5SWDAT/uSBt15a/mK3wGP+PRhAmryu JoMmEKNhz1Y3EbLpdTqLQJhwz3Tz/fgMyY57ZymiLK/stayWmfSUBTuGGE6RpFx4rAKH drf/Oblnazx/mZIENUSX8blhFoXiSa7l0MLcQXqdUNUoQ1tdLw94KLHeUaxOVhJz5TI4 Ap1w== X-Forwarded-Encrypted: i=2; AJvYcCUhN0Hama2LCLt9AfmeY1VhKChfrnzAPlzdRXUx6o0/mXL6iR85XICKtFF3INZtOpG96I3N@ilbers.de X-Gm-Message-State: AOJu0Yw39ZozCrtk1R/ri9yKjFAt/GllhyjGkJsDeJqpPhdjtx7DCz6U SrYW2Kj2eJRbQXg3ULQQqOvcBkedhhtWTiQj62G2X91c4clP2AazpNKS 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) From: "'Andreas Naumann' via isar-users" 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 Content-Type: text/plain; charset="UTF-8" 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-TUID: 5XsCqo08WO/n 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 -- 2.43.0 -- You received this message because you are subscribed to the Google Groups "isar-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/isar-users/20251001105929.3731537-5-anaumann%40emlix.com.