tried to grab repository for wrong architecture

Bug #860432 reported by Marcin Juszkiewicz
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
apt (Ubuntu)
Opinion
Undecided
Unassigned
multistrap (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

multistrap 2.1.6ubuntu3 using extra-configs/multistrap.conf
Using foreign architecture: armel
multistrap building armel multistrap on 'amd64'
Getting package lists: apt-get -o Apt::Architecture=armel -o Dir::Etc::TrustedParts=/etc/apt/trusted.gpg.d -o Dir::Etc::Trusted=/etc/apt/trusted.gpg -o Apt::Get::Download-Only=true -o Apt::Install-Recommends=false -o Dir=/home/hrw/HDD/devel/canonical/armel-cross-toolchain/generic-linux/sysroot/opt/linaro/11.07/sysroot/ -o Dir::Etc=/home/hrw/HDD/devel/canonical/armel-cross-toolchain/generic-linux/sysroot/opt/linaro/11.07/sysroot/etc/apt/ -o Dir::State=/home/hrw/HDD/devel/canonical/armel-cross-toolchain/generic-linux/sysroot/opt/linaro/11.07/sysroot/var/lib/apt/ -o Dir::State::Status=/home/hrw/HDD/devel/canonical/armel-cross-toolchain/generic-linux/sysroot/opt/linaro/11.07/sysroot/var/lib/dpkg/status -o Dir::Cache=/home/hrw/HDD/devel/canonical/armel-cross-toolchain/generic-linux/sysroot/opt/linaro/11.07/sysroot/var/cache/apt/ update
Ign http://ports.ubuntu.com oneiric InRelease
Traf http://ports.ubuntu.com oneiric Release.gpg
Traf http://ports.ubuntu.com oneiric Release
Traf http://ports.ubuntu.com oneiric/main Sources
Traf http://ports.ubuntu.com oneiric/main armel Packages
Ign http://ports.ubuntu.com oneiric/main TranslationIndex
Traf http://ports.ubuntu.com oneiric/main Translation-pl
Traf http://ports.ubuntu.com oneiric/main Translation-en
Błąd http://ports.ubuntu.com oneiric/main i386 Packages
  404 Not Found [IP: 192.168.1.1 3142]
Ign http://ports.ubuntu.com oneiric/main Translation-pl_PL
W: Failed to fetch http://ports.ubuntu.com/dists/oneiric/main/binary-i386/Packages 404 Not Found [IP: 192.168.1.1 3142]

E: Some index files failed to download. They have been ignored, or old ones used instead.
apt update failed. Exit value: 100

192.168.1.1:3142 is apt-cacher-ng proxy
---
ApportVersion: 1.23-0ubuntu1
Architecture: amd64
DistroRelease: Ubuntu 11.10
InstallationMedia: Kubuntu 10.04 "Lucid Lynx" - Release Candidate amd64 (20100419.1)
Package: multistrap 2.1.6ubuntu3
PackageArchitecture: all
ProcEnviron:
 SHELL=/bin/bash
 PATH=(custom, no user)
 LANG=pl_PL.UTF-8
 LANGUAGE=pl_PL:en
ProcVersionSignature: Ubuntu 3.0.0-10.16-generic 3.0.4
Tags: oneiric oneiric
Uname: Linux 3.0.0-10-generic x86_64
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare vboxusers video

Revision history for this message
Marcin Juszkiewicz (hrw) wrote :

Configuration file given to multistrap

Revision history for this message
Marcin Juszkiewicz (hrw) wrote :

Problem exists because dpkg is told that i386 is foreign architecture which is allowed in system. APT follows it even if it should not.

tags: added: apport-collected oneiric
description: updated
Revision history for this message
Marcin Juszkiewicz (hrw) wrote : Dependencies.txt

apport information

Revision history for this message
Torsten Spindler (tspindler) wrote :

Does this problem still occur in Precise?

Changed in apt (Ubuntu):
status: New → Incomplete
Revision history for this message
Marcin Juszkiewicz (hrw) wrote :
Download full text (6.5 KiB)

Yes, it still happens:

sudo http_proxy=http://192.168.1.1:3142/ multistrap --arch armel --no-auth --tidy-up --file multistrap-configs/linaro-alip-dev.conf -
-dir sysroots/sysroot-alip-dev | tee log-alip-dev
[sudo] password for hrw: tee: log-alip-dev: Brak dostępu

Use of uninitialized value $sources{"a"} in pattern match (m//) at /usr/sbin/multistrap line 863.
Use of uninitialized value in lc at /usr/sbin/multistrap line 871.
Use of uninitialized value in lc at /usr/sbin/multistrap line 874.
Use of uninitialized value $sources{"a"} in pattern match (m//) at /usr/sbin/multistrap line 863.
Use of uninitialized value in lc at /usr/sbin/multistrap line 871.
Use of uninitialized value in lc at /usr/sbin/multistrap line 874.
Use of uninitialized value in lc at /usr/sbin/multistrap line 857.
Use of uninitialized value in lc at /usr/sbin/multistrap line 871.
Use of uninitialized value in lc at /usr/sbin/multistrap line 874.
Use of uninitialized value in lc at /usr/sbin/multistrap line 871.
Use of uninitialized value in lc at /usr/sbin/multistrap line 874.
Use of uninitialized value in lc at /usr/sbin/multistrap line 871.
Use of uninitialized value in lc at /usr/sbin/multistrap line 874.
Use of uninitialized value in lc at /usr/sbin/multistrap line 871.
Use of uninitialized value in lc at /usr/sbin/multistrap line 874.
multistrap 2.1.6ubuntu3 using multistrap-configs/common.conf
multistrap 2.1.6ubuntu3 using multistrap-configs/common.conf
Using foreign architecture: armel
multistrap building armel multistrap on 'amd64'
INF: Setting ./lib64 -> ./lib symbolic link.
Getting package lists: apt-get -o Apt::Architecture=armel -o Dir::Etc::TrustedParts=/etc/apt/trusted.gpg.d -o Dir::Etc::Trusted=/etc
/apt/trusted.gpg -o Apt::Get::AllowUnauthenticated=true -o Apt::Get::Download-Only=true -o Apt::Install-Recommends=false -o Dir=/home
/hrw/HDD/devel/canonical/2011-precise/sysroots/multistrap/sysroots/sysroot-alip-dev/ -o Dir::Etc=/home/hrw/HDD/devel/canonical/2011-p
recise/sysroots/multistrap/sysroots/sysroot-alip-dev/etc/apt/ -o Dir::State=/home/hrw/HDD/devel/canonical/2011-precise/sysroots/multi
strap/sysroots/sysroot-alip-dev/var/lib/apt/ -o Dir::State::Status=/home/hrw/HDD/devel/canonical/2011-precise/sysroots/multistrap/sys
roots/sysroot-alip-dev/var/lib/dpkg/status -o Dir::Cache=/home/hrw/HDD/devel/canonical/2011-precise/sysroots/multistrap/sysroots/sysr
oot-alip-dev/var/cache/apt/ update
Ign http://localhost . InRelease
Ign http://localhost . Release.gpg
Ign http://localhost . Release
Ign http://localhost ./main TranslationIndex
Pob: 1 http://localhost ./main armel Packages [8931 B]
Błąd http://localhost ./main i386 Packages
  404 Not Found [IP: ::1 80]
Ign http://localhost ./main Translation-pl_PL
Ign http://localhost ./main Translation-pl
Ign http://localhost ./main Translation-en
Ign http://ports.ubuntu.com oneiric InRelease
Ign http://ppa.launchpad.net oneiric InRelease
Pob: 2 http://ports.ubuntu.com oneiric Release.gpg [198 B]
Pob: 3 http://ppa.launchpad.net oneiric Release.gpg [316 B]
Pob: 4 http://ports.ubuntu.com oneiric Release [40,8 kB]
Ign http://ddebs.ubuntu.com oneiric InRelease
Pob: 5 http://ports.ubuntu.com oneiric/main armel Packages ...

Read more...

Marcin Juszkiewicz (hrw)
Changed in apt (Ubuntu):
status: Incomplete → Opinion
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in multistrap (Ubuntu):
status: New → Confirmed
Revision history for this message
Svein Seldal (sveinse) wrote :

I confirm the bug.

I didn't find this bug using multistrap, I rather used a custom script of my own which is attached here. It's purpose is to download a armel package and all its dependencies.

This script works when being run on a Natty amd64 and i386 host machine, while it fails on Precise amd64:

W: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/dists/natty/main/binary-i386/Packages 404 Not Found
W: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/dists/natty/universe/binary-i386/Packages 404 Not Found
W: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/dists/natty-updates/main/binary-i386/Packages 404 Not Found
W: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/dists/natty-updates/universe/binary-i386/Packages 404 Not Found
W: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/dists/natty-security/main/binary-i386/Packages 404 Not Found
W: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/dists/natty-security/universe/binary-i386/Packages 404 Not Found

Revision history for this message
Daniel Hartwig (wigs) wrote :

From attached apt-wrap:

> mkdir -p $DIR/var/cache/apt/archives/partial
> cat >$DIR/etc/apt/apt.conf <<EOF
> APT::Architecture "$ARCH";

You should also add this line:

 APT::Architectures { "$ARCH"; };

which will prevent apt getting this list from "dpkg --print-foreign-architectures".

Alternatively, you could also try arch-restricting the generated sources:

 cat >$DIR/etc/apt/sources.list <<EOF
 deb [ arch=$ARCH ] http://ports.ubuntu.com/ubuntu-ports natty main universe

Similar changes should also be effective for multistrap.

Revision history for this message
Svein Seldal (sveinse) wrote :

Both approaches have been tested and confirmed. I'm going to stick with setting the APT::Architectures as I have less control of the real sources.list being used.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.