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; Fri, 12 Sep 2025 17:51:09 +0200 X-Sieve: CMU Sieve 2.4 Received: from mail-wm1-f60.google.com (mail-wm1-f60.google.com [209.85.128.60]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 58CFp4Am027399 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 12 Sep 2025 17:51:05 +0200 Received: by mail-wm1-f60.google.com with SMTP id 5b1f17b1804b1-45dd62a0dd2sf9849605e9.1 for ; Fri, 12 Sep 2025 08:51:05 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1757692259; cv=pass; d=google.com; s=arc-20240605; b=MkFKbavzotcZzhh0kLsGtCa8/ZEeGZjV27pnq8bDItVIkWaY3hqetaCjjpqATPhlOw hDRJd2aI4CwsSRP1d8uUJ151IOO0griZfb+J1CwbjO1baNGIegZbBfqFe3cJLXa9RgFl +UhD8kh0yEWQwTACakDfWUhoOy4Lqfd0uZFb91hILOXRJadscRm6cFJgieAWQC1EM9Bg z9qrWbaXMSkL1bNT+5YMXNcLz5oXHGqao6xOtIiqrX9EYiIZWSnUOVFVcEb3yPMAkc9A gaiiYQ/hPgzsNxnbTdHHNY1na+uTv/w6rzByInDsMRA9hnUWtIWDc4ZUEZTXsObIBer2 xpLQ== 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:content-transfer-encoding :in-reply-to:from:content-language:references:cc:to:subject :user-agent:mime-version:date:message-id:sender:dkim-signature; bh=ym0355fM/L+58lIsyLzKbu0mKIcgya1dJXsm2hPTs/4=; fh=lbNy82SDz5XzDiXxRfEYxj/PwaJ+JMHG4XQY3ACrT4I=; b=Xe/b44UvbE0azDm7bhSSsUaODF9/Ji/crJeC4zjd5KNzkOyZ0C/8sCKpt65qLymlqy 273puc/livOY48EqG+MkN6o8edADQxJ0+n0q/7AR146YuwiTnZWvxB87XwoJP4OMK5A/ dNPWW4IKFV6cTqCRwHGLrJ2rRMB612CSEzy2CTDNvLNH4J0H0zRUsXEMJpX+zM+dmqah SPzRrXHlVlUHI0wchlSe6ZhxHIvGR/tWol0+WVd85EkU8fcqEsZXlWu4HWtlNOAgZpY+ AMkrlmJWX3ergNrg3IxRTAhb4+PKO7Q+cSpdi0yx/FpnoRGwKNBc7NckqLro4q6HMMBU eVgQ==; darn=ilbers.de ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of anaumann@emlix.com designates 178.63.209.131 as permitted sender) smtp.mailfrom=anaumann@emlix.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1757692259; x=1758297059; darn=ilbers.de; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:x-original-authentication-results :x-original-sender:content-transfer-encoding:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:sender:from:to:cc:subject:date:message-id:reply-to; bh=ym0355fM/L+58lIsyLzKbu0mKIcgya1dJXsm2hPTs/4=; b=ny5Iq7SBZJvOEUcyK1esQIVNH+4kyvZpip45N8/C37EbQDEVjsI6Z3OCRroDqo9Sr2 1oDytdXDQWb1JPCUipchHWwmYcJzw8zaPJHbxm3qgHRAQbHnzA/veXngA5L09uUnlwTs E65e7t3KZFTQbxlKkPKW4Focx2mSontq17dtNIWqEXvUG09pawHWETcfArdEIiOsqnac MH9HXlUGY2zODJEUQw7Du2Nl3yDgyt4sN9tiE98R1zrhNTIsiqpt1LmEne02xhy3QsQO CWyQci7qQBXM7oe98ahgAlmluc8CyJrUs2xUFxxk4D7QMrs2hr9ay3F5ub6PXiEHFjrE gBPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1757692259; x=1758297059; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender :content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-beenthere:x-gm-message-state:sender:from:to:cc:subject:date :message-id:reply-to; bh=ym0355fM/L+58lIsyLzKbu0mKIcgya1dJXsm2hPTs/4=; b=wxuFX/aed1YNHFYAzFpgYzR2B+UcQ3Z0pWev9a2nMR4TVqf6qD6ZRdcNeXvkju662V PhkNOKb81HaHct02NqhJ8ScUgQpnee/96y4yxtFAUW4VASYgBBgONoNuu5pAON6qpstY yTTGreVfhIwU4n89AUgPqSVhrTx8Ml4ICcySnfa1kn+NJsSbqdrm1AQw8RjFO91GXYRN 7bAhKMHkuNVBnD5Gc0Kw6grAHp8c/UD6OUQNkiyUH9dzm4PcAOBpZyZAtCzXW1FkjbM7 P9wvONh0q3UYZDTERSM8xjdiwvFbk6FiwDqWhOwkoEbYaFu9xdwcV0oJi2Z+ZdNUucZJ t05g== Sender: isar-users@googlegroups.com X-Forwarded-Encrypted: i=2; AJvYcCVeDTrZtHdAkoCukEmMii49U/9L9famz2EICkd1UdwGowkae0A57MroiPHXz4KTOOQW5Dk5@ilbers.de X-Gm-Message-State: AOJu0Ywc+V1oE+rbYTskrfp7NI6r96ei/mO55UHvdeqeu+kIWtkh59iU wVRuZ4YDM0xbNi99H5TIuB7lWxqQwJCiTQcFvMIPa/VUZGpmn3yrETi4 X-Google-Smtp-Source: AGHT+IFnUhqkrTaqlmRF/+sNKYsvpITHE4ILMFKZYwvb6aup+5hmjxHW+DxNJCR9LCuUGSrbz+ayJQ== X-Received: by 2002:a05:600c:3e1a:b0:45d:e4d6:a7db with SMTP id 5b1f17b1804b1-45dfe9c6a1fmr70368205e9.5.1757692259125; Fri, 12 Sep 2025 08:50:59 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com; h=ARHlJd6IVc0fbfF9Bdb2FWiwgCO50wsnVYKa/r/xF95ebz4bpw== Received: by 2002:adf:b307:0:b0:3e7:6775:6a98 with SMTP id ffacd0b85a97d-3e767756bf4ls135379f8f.2.-pod-prod-00-eu-canary; Fri, 12 Sep 2025 08:50:55 -0700 (PDT) X-Received: by 2002:a05:6000:186a:b0:3c6:c737:d39f with SMTP id ffacd0b85a97d-3e765792e71mr3617408f8f.3.1757692255435; Fri, 12 Sep 2025 08:50:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1757692255; cv=none; d=google.com; s=arc-20240605; b=L0afiVdTqxp5TiMepPrN/KnzfBt+DxZePsdHIMkEbe/7CFCRd/jSIo/CeaTy9ODDnl oSzNsgQhIe74el90ZrsjlcMqGPbAeDww4w08W3PfA6SnpVbiazdf/LIZAmrVToZv8H9W C22E2ABkw9BQYSuQaVtZDT7V/LVxg4ZGC14yB12q8QMVTCEJQ8Tnqf2aBf4OsmjLSdC+ 1tvOSzoFdk6wEQjR69Cmxm40Go4h5us0etiVho/NI4EydgycRCszZCaHFsVNjJDywm38 n+iieDLYQ4s79NgjqlEr0oxU0iB7E9gjP/z48EAQmV7Qk74u7sjzeyN4jI3pteYf40cm kknQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id; bh=dzEdqjhV+skDZpqAHnzpaBcovq2eEP+HetIk6ryfnlg=; fh=kI09+RXBJB5wDrPpsFOsWQQ5e5gU5NwpMps6eyRDXqE=; b=XQaBxC15+OwKqp7jgGXs7vH4+RM5DfYSbK4GpnYUs3BfdP1KxRP7KigZgZ58n0C/rJ E5AskXrzIxm1HuHYCcfXnewb9MNfz0C2HzeHj+fMKZPsqn1eR2kdg/7INGyYyl66c7Ot AiRbJIbdtSCrrwB5NFnteb+UtHEfF7dwgxN+DhAnfrpPZdX0AlQgdwbYdkWSruiqwhaH y3vqvzHN4GkEf11a8B6+4P9VQnrCqZaPiUyJCSLxb7H21pYipuSAOYjrflwmUjlZ4SS8 a9qktQpuaTn2iFh3mVCqWKrLpb24rxFIp1d8DwEe1XWaCJbdXSuv7pE9h0WTBW4N2KFc dp2w==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of anaumann@emlix.com designates 178.63.209.131 as permitted sender) smtp.mailfrom=anaumann@emlix.com Received: from mx1.emlix.com (mx1.emlix.com. [178.63.209.131]) by gmr-mx.google.com with ESMTPS id ffacd0b85a97d-3e7607e2f34si113423f8f.4.2025.09.12.08.50.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Sep 2025 08:50: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 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 18D505F98A; Fri, 12 Sep 2025 17:50:55 +0200 (CEST) Message-ID: Date: Fri, 12 Sep 2025 17:50:53 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 2/2] handle DPKG_ARCH=all case for transitive deps To: "MOESSBAUER, Felix" , "Schmidt, Adriaan" Cc: "isar-users@googlegroups.com" References: <20250820124140.281190-1-felix.moessbauer@siemens.com> <20250820124140.281190-3-felix.moessbauer@siemens.com> <24e7baaa-c347-4327-b06d-25c9a074a494@emlix.com> Content-Language: en-US From: Andreas Naumann In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: quoted-printable X-Original-Sender: anaumann@emlix.com X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of anaumann@emlix.com designates 178.63.209.131 as permitted sender) smtp.mailfrom=anaumann@emlix.com 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.6 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, 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: wdAK6WLGPAsv Am 11.09.25 um 12:20 schrieb MOESSBAUER, Felix: > On Wed, 2025-09-10 at 13:00 +0200, Andreas Naumann wrote: >> Hi Felix, all, >> >> Am 20.08.25 um 14:41 schrieb 'Felix Moessbauer' via isar-users: >>> Arch=3Dall packages might build depend on other arch=3Dall packages, he= nce we >>> need to correctly model the dependency chain. Otherwise the transitive >>> dependencies are built for the distro arch instead of the native arch. >>> >>> We implement this by dispatching the non-native variant of DPKG_ARCH=3D= all >>> packages to the -native variant by adding a dependency. We further >>> replace the non-native do_deploy_dep task with a noop to preserve the >>> dependency chain. >>> >>> Co-developed-by: Adriaan Schmidt >>> Signed-off-by: Felix Moessbauer >>> --- >>> meta/classes/multiarch.bbclass | 18 +++++++++++++++++- >>> 1 file changed, 17 insertions(+), 1 deletion(-) >>> >>> diff --git a/meta/classes/multiarch.bbclass b/meta/classes/multiarch.bb= class >>> index babdfbd4..c2bba21f 100644 >>> --- a/meta/classes/multiarch.bbclass >>> +++ b/meta/classes/multiarch.bbclass >>> @@ -29,7 +29,11 @@ python() { >>> d.appendVar('BBCLASSEXTEND', ' compat') >>> =20 >>> # build native separately only when it differs from the target v= ariant >>> - if not archIsAll and archDiffers: >>> + # We must not short-circuit for DPKG_ARCH=3Dall packages, as they = might >>> + # have transitive dependencies which need to be built for -native. >> Funny enough i suspected to have the same problem yesterday, but it >> turned out to >> be different: When a package is single architecture only, e.g. arm64, it >> should not be >> extended as native if HOST_ARCH is amd64. >> >> So I added a check to BBCLASSEXTEND only if DPKG_ARCH !=3D HOST_ARCH. > Good catch. This case is currently not handled. But I would like to > have it in a separate patch, as it tackles another issue. I thought it's possible to make the nesting of if-clauses easier that way, but after some more thought and fiddling... unfortunately it's the opposite. So yes, separate patch. > >>> + # This special handling for DPKG_ARCH=3Dall packages is left to th= e >>> + # multiarch_virtclass_handler >>> + if archDiffers: >>> d.appendVar('BBCLASSEXTEND', ' native') >> Now, seeing your patch to remove the not-"all" case also, I wonder if >> that could be used >> as the sole check before BBCLASSEXTEND. Like e.g. >> archIsNative =3D d.getVar('DPKG_ARCH') =3D=3D d.getVar('HOST_ARCH') >> if isNative: >> =C2=A0=C2=A0 d.appendVar('BBCLASSEXTEND', ' native') >>> else: >>> extend_provides(pn, 'native', d) >> but now I wonder what the extend_provides is needed for. If HOST_ARCH = =3D=3D >> DISTRO_ARCH, what's >> the use of providing a native variant? > If we are building for the native arch, we can just add the -native > variants to the PROVIDES, so dependencies of packages depending > explicitly on -native can be resolved (without the need for extra > recipe variants). I understand that its a simpler solution in that case. But, maybe I'm not seeing the obvious, what would require a -native package then? If=20 target-arch is host-arch, why would anything else than the base package be in any dependency chain? > >> But back to your Patch: Is it possible that -compat "all" packages also = have >> dependencies on other "all" packages, which in turn have dependencies on >> architecture specific packages? > Good question. In general, package dependencies are resolved for the > native architecture (or the requested one). AFAIK this selection is > propagated down the dependency tree. By that, A:i386 -> B:all -> C:x > should always resolve C as either :all or i386 (except if there is a > explicit cross-arch dependency specifier like :any, which we don't > model in bitbake). Anyways, The A:i386 -> B:all -> C:i386 chain should > already be resolved correctly with this patch. The patch doesnt change that -compat is "short-circuited" when=20 archIsAll, doesnt it? Or maybe I dont fully understand how the code works yet. > > Tested by's are welcome :) I'm working with it and keep an eye on it. regards, Andreas > > Felix > >> regards, >> Andreas >> >> >>> @@ -86,6 +90,8 @@ python multiarch_virtclass_handler() { >>> d.setVar(var, ' '.join(multiarch_var)) >>> =20 >>> pn =3D e.data.getVar('PN') >>> + archDiffers =3D d.getVar('HOST_ARCH') !=3D d.getVar('DISTRO_ARCH') >>> + archIsAll =3D d.getVar('DPKG_ARCH') =3D=3D 'all' >>> if pn.endswith('-compat'): >>> e.data.setVar('BPN', pn[:-len('-compat')]) >>> e.data.appendVar('OVERRIDES', ':class-compat') >>> @@ -96,6 +102,16 @@ python multiarch_virtclass_handler() { >>> e.data.appendVar('OVERRIDES', ':class-native') >>> fixup_pn_in_vars(e.data) >>> fixup_depends('-native', e.data) >>> + elif archIsAll and archDiffers: >>> + # Arch=3Dall packages might build depend on other arch=3Dall p= ackages, >>> + # hence we need to correctly model the dependency chain. >>> + # We implement this by dispatching the non-native variant to t= he -native >>> + # variant by adding a dependency. We further replace the non-n= ative >>> + # do_deploy_dep task with a noop to preserve the dependency ch= ain. >>> + e.data.setVar('do_deploy_deb', '') >>> + bb.build.deltask('deploy_deb', e.data) >>> + bb.build.addtask('deploy_deb', 'do_build', '', e.data) >>> + e.data.setVarFlag('do_deploy_deb', 'depends', f'{pn}-native:do= _deploy_deb') >>> } >>> addhandler multiarch_virtclass_handler >>> multiarch_virtclass_handler[eventmask] =3D "bb.event.RecipePreFinali= se" >> --=20 >> Andreas Naumann >> >> emlix GmbH >> Headquarters: Berliner Str. 12, 37073 Goettingen, Germany >> Phone +49 (0)551 30664-0, e-mail info@emlix.com >> District Court of Goettingen, Registry Number HR B 3160 >> Managing Directors: Heike Jordan, Dr. Uwe Kracke >> VAT ID No. DE 205 198 055 >> Office Berlin: Panoramastr. 1, 10178 Berlin, Germany >> Office Bonn: Bachstr. 6, 53115 Bonn, Germany >> http://www.emlix.com --=20 Andreas Naumann emlix GmbH Headquarters: Berliner Str. 12, 37073 Goettingen, Germany Phone +49 (0)551 30664-0, e-mail info@emlix.com District Court of Goettingen, Registry Number HR B 3160 Managing Directors: Heike Jordan, Dr. Uwe Kracke VAT ID No. DE 205 198 055 Office Berlin: Panoramastr. 1, 10178 Berlin, Germany Office Bonn: Bachstr. 6, 53115 Bonn, Germany http://www.emlix.com --=20 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 e= mail to isar-users+unsubscribe@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/isar-users/= f7ac34b9-c96b-4939-aec4-c72bcd471db9%40emlix.com.