AW: Question why multiarch is considered by apt 3.1.16, investigation of a problem in mkosi
Wagner Andre <[email protected]> Thu, 26 Mar 2026 17:20:04 +0000
| Newsgroups | gmane.linux.debian.apt.devel |
|---|---|
| Message-ID | <DBBPR03MB10462460BB50DFA0F27AD4AB0B756A@DBBPR03MB10462.eurprd03.prod.outlook.com> |
Thank you very much for your input!
I investigated the issue a bit further in a Ubuntu 26.04 Daily Build VM without mkosi at all.
The settings within the VM are:
APT::Architecture="amd64"
APT::Architectures="amd64"
dpkg --print-architecture => "amd64"
dpkg --print-foreign-architectures => ""
I put the apt sources with amd64 from archive.ubuntu.com and armhf+arm64 from ports.ubuntu.com to the VMs /etc/apt/sources.list.d
When i try:
sudo apt install '?essential'
I see the the pattern i described:
package :...
Conflicts: package:armhf
Conflicts: package:arm64
package:armhf :...
Conflicts: package but version is to be installed
Conflicts: package:arm64
package:arm64 : ...
Conflicts: package but version is to be installed
Conflicts: package:armhf
But when i try:
sudo apt install 'base-files'
it works without problems.
So my conclusion is:
"normal" package names a implicitly appended by APT::Architecture(s), but apt-patterns are not. Should the missing appending/filtering of apt-pattern not to be considered as bug, since it looks quite inconsistent and as a user of apt you easily do the mistake which was done in mkosi?
> You posted your message to a public mailing list and thus your message is
>already copied and available to many others even outside this list.
I am aware of that, but its automatically appended by the mail server and i cannot change it. See yourself and the public as the audience these emails are addressed to ;)
Greetings,
André
[https://www.richard-wolf.com/mam/data/Typo3/banner/SteriTreff26-e-mail-banner-600x82.png]<https://steritreff.com/>
Richard Wolf GmbH, Pforzheimer Strasse 32, 75438 Knittlingen
Managing Directors: Juergen Pfab, Juergen Steinbeck. Trade Register: Mannheim HRB 510031
Richard Wolf GmbH routinely monitors the content of e-mail sent and received via its network for the purposes of ensuring compliance with its policies and procedures. Richard Wolf GmbH is not responsible for any changes made to the message after it has been sent. Where opinions are expressed, they are not necessarily those of Richard Wolf GmbH. This e-mail and any files transmitted with it are confidential and intended solely for the use of the individual or entity to which they are addressed. If you are not the intended addressee, or the person responsible for delivering it to them, you may not copy, forward, disclose, or otherwise use it or any part of it in any way. To do so may be unlawful. If you receive this e-mail by mistake, please advise the sender immediately.
Data Protection Policy<https://www.richard-wolf.com/en/data-protection-policy> | Legal Information<https://www.richard-wolf.com/en/legal-information/> | Terms & Conditions<https://www.richard-wolf.com/en/terms-conditions/>
________________________________
Von: Johannes Schauer Marin Rodrigues
Gesendet: Donnerstag, 26. März 2026 11:33
An: Wagner Andre
Cc: [email protected]
Betreff: Re: Question why multiarch is considered by apt 3.1.16, investigation of a problem in mkosi
Hi,
Quoting Wagner Andre (2026-03-26 11:04:42)
> For solving this problem I replaced '?essential' by '?essential
> ?architecture(amd64)', now only "amd64" packages are considered and the
> install works.
>
> Can someone explain to me why this happens and if the workaround i did is a
> good idea or are there better and more reliable solutions?
this is because ?essential select packages which have Essential:yes and that
matches packages from any architecture. In mmdebstrap we are using:
?narrow(...,?architecture(...),?essential)
Note also how some configuration settings to apt have to be specified via a
configuration file passed to it with the APT_CONFIG environment variable. This
is because settings like Dir::Etc are evaluated *before* apt takes command line
arguments into account. Does your /etc outside /buildroot maybe include armhf?
For example, look at the man page of mmdebstrap in the section OPERATION to see
a minimal example for how to set up a minimal chroot with apt only. Note how
that example is not using apt options like you do but creates a temporary
configuration file and passes that to apt via APT_CONFIG.
> This e-mail and any files transmitted with it are confidential and intended
> solely for the use of the individual or entity to which they are addressed.
> If you are not the intended addressee, or the person responsible for
> delivering it to them, you may not copy, forward, disclose, or otherwise use
> it or any part of it in any way. To do so may be unlawful. If you receive
> this e-mail by mistake, please advise the sender immediately.
You posted your message to a public mailing list and thus your message is
already copied and available to many others even outside this list.
Thanks!
cheers, josch