[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#695352: apt: incorrect behavior/documentation concerning foreign architectures for sources.list / apt-get update



Well, those strange "Duplicate sources.list entry" warnings don't seem to
happen anymore with apt 0.9.7.7, and the file is downloaded sure enough,
but installation still fails in exactly the same way.

However, this probably isn't a bug: take a look at the documentation for
the "arch" setting,

,----[ sources.list(5) ]
|        ·   arch=arch1,arch2,...  can be used to specify for which
|            architectures information should be downloaded. If this option is
|            not set all architectures defined by the APT::Architectures option
|            will be downloaded.
`----

the related apt variables,

,----[ apt.conf(5) ]
|        Architecture
|            System Architecture; sets the architecture to use when fetching
|            files and parsing package lists. The internal default is the
|            architecture apt was compiled for.
| 
|        Architectures
|            All Architectures the system supports. For instance, CPUs
|            implementing the amd64 (also called x86-64) instruction set are
|            also able to execute binaries compiled for the i386 (x86)
|            instruction set. This list is used when fetching files and parsing
|            package lists. The initial default is always the system's native
|            architecture (APT::Architecture), and foreign architectures are
|            added to the default list when they are registered via dpkg
|            --add-architecture.
`----

and for dpkg --add-architecture,

,----[ dpkg(1) ]
|        --add-architecture architecture
|               Add architecture to the list of architectures for  which  pack‐
|               ages  can  be installed without using --force-architecture. The
|               architecture  dpkg  is  built   for   (i.e.   the   output   of
|               --print-architecture) is always part of that list.
`----

It seems fairly clear, then, that dpkg itself really won't be happy
unless you actually run "dpkg --add-architecture i386", so it's
reasonable for apt to act the same way.

This should, however, be clarified in sources.list(5), perhaps by
applying the supplied patch.
=== modified file 'doc/sources.list.5.xml'
--- doc/sources.list.5.xml	2012-06-09 20:05:55 +0000
+++ doc/sources.list.5.xml	2012-12-31 20:02:03 +0000
@@ -117,7 +117,8 @@
    <itemizedlist><listitem><para><literal>arch=<replaceable>arch1</replaceable>,<replaceable>arch2</replaceable>,…</literal>
    can be used to specify for which architectures information should
    be downloaded. If this option is not set all architectures defined by the
-   <literal>APT::Architectures</literal> option will be downloaded.</para></listitem>
+   <literal>APT::Architectures</literal> option will be downloaded.
+   This must be a subset of <literal>APT::Architectures</literal>.</para></listitem>
    <listitem><para><literal>trusted=yes</literal> can be set to indicate that packages
    from this source are always authenticated even if the <filename>Release</filename> file
    is not signed or the signature can't be checked. This disables parts of &apt-secure;

(It also wouldn't hurt if apt would give a warning about what you tried,
instead of downloading and ignoring the information or giving a bogus
warning.)

Unfortunately, it looks like the only way you can prevent apt wasting
time (and space) on excess package lists is to add "[ arch=amd64 ]" to
any lines of sources.list for which you don't want i386 packages.

This certainly doesn't seem very convenient; perhaps a new apt.conf
option to specify a default subset of architectures is called for?

-- 
Hi! I'm a .signature virus! Copy me into your ~/.signature to help me spread!

Reply to: