--- Begin Message ---
- To: Debian Bug Tracking System <submit@bugs.debian.org>
- Subject: apt: [multiarch] "apt-get update" update only one (foreign) architecture
- From: Vincent Danjean <vdanjean@debian.org>
- Date: Thu, 12 Jan 2012 17:01:21 +0100
- Message-id: <20120112160121.3437.79834.reportbug@eyak.imag.fr>
Package: apt
Version: 0.8.15.9
Severity: normal
Hi,
I'm trying to use apt-get in a multiarch setup. I discovered that
"apt-get update" only download one foreign architecture. I suppose (see my
experience below) that the problem lies in the parsing of
"dpkg --print-foreign-architectures".
vdanjean@eyak:~$ /usr/bin/dpkg --print-foreign-architectures
armel
i386
mipsel
vdanjean@eyak:~$ cat /var/lib/dpkg/arch
amd64
armel
i386
mipsel
vdanjean@eyak:~$
If run "apt-get update" in this situation, only the (native) amd64 architecture
and the armel architecture are downloaded.
If I edit /var/lib/dpkg/arch to switch the armel and i386 architectures,
then "apt-get update" download amd64 and i386 architectures.
ie, "apt-get update" download the native architecture and the first foreign
architecture.
Now, if I change the output of "dpkg --print-foreign-architectures" to
output only one line:
vdanjean@eyak:~$ /usr/local/bin/dpkg --print-foreign-architectures
i386 armel mipsel
vdanjean@eyak:~$ cat /usr/local/bin/dpkg
#!/bin/sh
if [ "$1" = --print-foreign-architectures ]; then
/usr/bin/dpkg "$@" | tr "\n" " " | sed -e 's/ $/\n/'
else
exec /usr/bin/dpkg "$@"
fi
vdanjean@eyak:~$
Then, if I run "apt-get -o Dir::Bin::dpkg=/usr/local/bin/dpkg update", then
all four (amd64, i386, armel, and mipsel) architectures are downloaded.
Regards,
Vincent
-- Package-specific info:
-- (/etc/apt/preferences present, but not submitted) --
-- (/etc/apt/sources.list present, but not submitted) --
-- System Information:
Debian Release: wheezy/sid
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 3.1.0-1-amd64 (SMP w/8 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages apt depends on:
ii debian-archive-keyring 2010.08.28
ii gnupg 1.4.11-3
ii libc6 2.13-24
ii libgcc1 1:4.6.2-11
ii libstdc++6 4.6.2-11
ii zlib1g 1:1.2.3.4.dfsg-3
apt recommends no packages.
Versions of packages apt suggests:
ii apt-doc <none>
ii aptitude 0.6.4-1.2
ii bzip2 1.0.6-1
ii dpkg-dev 1.16.2~61.gbp2f1b87
ii python-apt 0.8.3
ii synaptic 0.75.4
ii xz-lzma [lzma] 5.1.1alpha+20110809-3
-- no debconf information
--- End Message ---
--- Begin Message ---
Version: 0.8.16~exp10
On Thu, Mar 22, 2012 at 16:32, Daniel Hartwig <mandyke@gmail.com> wrote:
> There's been a few exp. uploads since then, and doubtful that
> --print-foreign-architectures will change again, so...
>
> bump :-)
Huh. Actually, a patch for this should be in 0.8.15.10 -
at least that is what the changelog in experimental claims.
But it's not in the debian-sid branch, only in my branch for sid.
/me unlocked the achievement: "screw version-control"
(goes and tries to fixes that…)
Conclusion: experimental versions have that already fixed,
next unstable version should fix that, too.
Best regards
David Kalnischkies
P.S.: Are you sure your patch actually works?
fgets() will only return a single line.
My fix just does s/if/while/ in the fgets line.
--- End Message ---