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

Bug#670322: apt: hiding foreign arch from APT::Architectures, using with [arch=] only, only partly works



On 11 September 2012 00:17, David Kalnischkies
<kalnischkies+debian@gmail.com> wrote:
>> APT::Sources::Default-Architectures ?
>
> I wonder if this isn't better served by providing a syntax to add and
> remove architectures from the list, much like tags for bugreports:
> arch=armel  # only get armel
> arch=-armel # get everything from APT::Architectures expect armel

This looks good also.  The negative filter is precisely what the
original report was anticipating.

> arch=+armel # get everything from APT::Architectures and armel

One caveat with this type of entry (and
APT::Sources::Default-Architectures, if it contains extra archs also)
is #451369, where APT has trouble with installed packages from these
“extra” architectures if they do not also appear in a current source.
This will probably have to be resolved to enable such a format.

>>>> > (Sidenote: apt/preferences does not seem to allow scoring based on
>>>> > arch, so I cannot pin armel packages to squeeze on this box where the
>>>> > native packages are usually pinned to testing - maybe worth its own bugreport)
>>>>
>>>> Package: *:armel
>>>> Pin: release n=squeeze
>>>> Pin-Priority: 991
>
> Arch-qualification will work for specific-packages stanzas only,

A bit of a hack but it worked when I tested it. apt-cache policy
listed every armel package as pinned, which is not very nice output
;-)

> but you can do this:
> Package: *
> Pin: release n=squeeze,b=armel
> Pin-Priority: 991

A better format, though it is not documented or working (?) in 0.9.7.4:

$ cat /etc/apt/preferences
Package: *
Pin: release a=experimental,b=amd64
Pin-Priority: 992
$ apt-cache policy
Package files:
 100 /var/lib/dpkg/status
     release a=now
   1 http://ftp.iinet.net.au/debian/debian/ experimental/main i386 Packages
     release o=Debian,a=experimental,n=experimental,l=Debian,c=main
     origin ftp.iinet.net.au
   1 http://ftp.iinet.net.au/debian/debian/ experimental/main amd64 Packages
     release o=Debian,a=experimental,n=experimental,l=Debian,c=main
     origin ftp.iinet.net.au
 500 http://ftp.iinet.net.au/debian/debian/ sid/main i386 Packages
     release o=Debian,a=unstable,n=sid,l=Debian,c=main
     origin ftp.iinet.net.au
 500 http://ftp.iinet.net.au/debian/debian/ sid/main amd64 Packages
     release o=Debian,a=unstable,n=sid,l=Debian,c=main
     origin ftp.iinet.net.au
Pinned packages:


Regards


Reply to: