Debian Bug report logs - #814843
show package-specific pin on sources

version graph

Package: apt; Maintainer for apt is APT Development Team <[email protected]>; Source for apt is src:apt (PTS, buildd, popcon).

Reported by: Russ Allbery <[email protected]>

Date: Mon, 15 Feb 2016 20:48:05 UTC

Severity: wishlist

Found in version apt/1.2.3

Reply or subscribe to this bug.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to [email protected], [email protected], APT Development Team <[email protected]>:
Bug#814843; Package apt. (Mon, 15 Feb 2016 20:48:09 GMT) (full text, mbox, link).


Acknowledgement sent to Russ Allbery <[email protected]>:
New Bug report received and forwarded. Copy sent to [email protected], APT Development Team <[email protected]>. (Mon, 15 Feb 2016 20:48:09 GMT) (full text, mbox, link).


Message #5 received at [email protected] (full text, mbox, reply):

From: Russ Allbery <[email protected]>
To: Debian Bug Tracking System <[email protected]>
Subject: Origin pins for single packages don't work
Date: Mon, 15 Feb 2016 12:46:30 -0800
Package: apt
Version: 1.2.3
Severity: normal

I have the following files in /etc/apt/preferences.d:

==> google-base.pref <==
Package: *
Pin: origin dl.google.com
Pin-Priority: 1

==> google-chrome.pref <==
Package: google-chrome-stable
Pin: origin dl.google.com
Pin-Priority: 100

The goal is to assign a low priority to all packages from dl.google.com
except for google-chrome-stable, which gets a somewhat higher priority
that allows automatic updates.

But this doesn't actually work:

google-chrome-stable:
  Installed: 48.0.2564.109-1
  Candidate: 48.0.2564.109-1
  Version table:
 *** 48.0.2564.109-1 100
          1 http://dl.google.com/linux/chrome/deb stable/main amd64 Packages
        100 /var/lib/dpkg/status

The general pin works fine, but the specific package pin does not.  If I
delete the general pin entirely, I get:

google-chrome-stable:
  Installed: 48.0.2564.109-1
  Candidate: 48.0.2564.109-1
  Version table:
 *** 48.0.2564.109-1 100
        500 http://dl.google.com/linux/chrome/deb stable/main amd64 Packages
        100 /var/lib/dpkg/status

showing that the google-chrome.pref file appears to just be ignored
completely.  The same continues to be true even if I change it to be a
version pin, as in:

Package: google-chrome-stable
Pin: version 48.0*
Pin-Priority: 100

but still:

google-chrome-stable:
  Installed: 48.0.2564.109-1
  Candidate: 48.0.2564.109-1
  Version table:
 *** 48.0.2564.109-1 100
        500 http://dl.google.com/linux/chrome/deb stable/main amd64 Packages
        100 /var/lib/dpkg/status

For some reason, APT seems to be completely ignoring a pin for a specific
named package?  Or I'm doing something wrong, but I'm not at all sure what
that would be.

-- Package-specific info:

-- apt-config dump --

APT "";
APT::Architecture "amd64";
APT::Build-Essential "";
APT::Build-Essential:: "build-essential";
APT::Install-Recommends "0";
APT::Install-Suggests "0";
APT::Sandbox "";
APT::Sandbox::User "_apt";
APT::Authentication "";
APT::Authentication::TrustCDROM "true";
APT::NeverAutoRemove "";
APT::NeverAutoRemove:: "^firmware-linux.*";
APT::NeverAutoRemove:: "^linux-firmware$";
APT::NeverAutoRemove:: "^linux-image-4\.2\.0-1-amd64$";
APT::NeverAutoRemove:: "^linux-image-4\.3\.0-1-amd64$";
APT::NeverAutoRemove:: "^linux-headers-4\.2\.0-1-amd64$";
APT::NeverAutoRemove:: "^linux-headers-4\.3\.0-1-amd64$";
APT::NeverAutoRemove:: "^linux-image-extra-4\.2\.0-1-amd64$";
APT::NeverAutoRemove:: "^linux-image-extra-4\.3\.0-1-amd64$";
APT::NeverAutoRemove:: "^linux-signed-image-4\.2\.0-1-amd64$";
APT::NeverAutoRemove:: "^linux-signed-image-4\.3\.0-1-amd64$";
APT::NeverAutoRemove:: "^kfreebsd-image-4\.2\.0-1-amd64$";
APT::NeverAutoRemove:: "^kfreebsd-image-4\.3\.0-1-amd64$";
APT::NeverAutoRemove:: "^kfreebsd-headers-4\.2\.0-1-amd64$";
APT::NeverAutoRemove:: "^kfreebsd-headers-4\.3\.0-1-amd64$";
APT::NeverAutoRemove:: "^gnumach-image-4\.2\.0-1-amd64$";
APT::NeverAutoRemove:: "^gnumach-image-4\.3\.0-1-amd64$";
APT::NeverAutoRemove:: "^.*-modules-4\.2\.0-1-amd64$";
APT::NeverAutoRemove:: "^.*-modules-4\.3\.0-1-amd64$";
APT::NeverAutoRemove:: "^.*-kernel-4\.2\.0-1-amd64$";
APT::NeverAutoRemove:: "^.*-kernel-4\.3\.0-1-amd64$";
APT::NeverAutoRemove:: "^linux-backports-modules-.*-4\.2\.0-1-amd64$";
APT::NeverAutoRemove:: "^linux-backports-modules-.*-4\.3\.0-1-amd64$";
APT::NeverAutoRemove:: "^linux-tools-4\.2\.0-1-amd64$";
APT::NeverAutoRemove:: "^linux-tools-4\.3\.0-1-amd64$";
APT::VersionedKernelPackages "";
APT::VersionedKernelPackages:: "linux-image";
APT::VersionedKernelPackages:: "linux-headers";
APT::VersionedKernelPackages:: "linux-image-extra";
APT::VersionedKernelPackages:: "linux-signed-image";
APT::VersionedKernelPackages:: "kfreebsd-image";
APT::VersionedKernelPackages:: "kfreebsd-headers";
APT::VersionedKernelPackages:: "gnumach-image";
APT::VersionedKernelPackages:: ".*-modules";
APT::VersionedKernelPackages:: ".*-kernel";
APT::VersionedKernelPackages:: "linux-backports-modules-.*";
APT::VersionedKernelPackages:: "linux-tools";
APT::Never-MarkAuto-Sections "";
APT::Never-MarkAuto-Sections:: "metapackages";
APT::Never-MarkAuto-Sections:: "contrib/metapackages";
APT::Never-MarkAuto-Sections:: "non-free/metapackages";
APT::Never-MarkAuto-Sections:: "restricted/metapackages";
APT::Never-MarkAuto-Sections:: "universe/metapackages";
APT::Never-MarkAuto-Sections:: "multiverse/metapackages";
APT::Move-Autobit-Sections "";
APT::Move-Autobit-Sections:: "oldlibs";
APT::Move-Autobit-Sections:: "contrib/oldlibs";
APT::Move-Autobit-Sections:: "non-free/oldlibs";
APT::Move-Autobit-Sections:: "restricted/oldlibs";
APT::Move-Autobit-Sections:: "universe/oldlibs";
APT::Move-Autobit-Sections:: "multiverse/oldlibs";
APT::Default-Release "unstable";
APT::Update "";
APT::Update::Post-Invoke-Success "";
APT::Update::Post-Invoke-Success:: "touch /var/lib/apt/periodic/update-success-stamp 2>/dev/null || true";
APT::Architectures "";
APT::Architectures:: "amd64";
APT::Compressor "";
APT::Compressor::. "";
APT::Compressor::.::Name ".";
APT::Compressor::.::Extension "";
APT::Compressor::.::Binary "";
APT::Compressor::.::Cost "0";
APT::Compressor::lz4 "";
APT::Compressor::lz4::Name "lz4";
APT::Compressor::lz4::Extension ".lz4";
APT::Compressor::lz4::Binary "false";
APT::Compressor::lz4::Cost "50";
APT::Compressor::gzip "";
APT::Compressor::gzip::Name "gzip";
APT::Compressor::gzip::Extension ".gz";
APT::Compressor::gzip::Binary "gzip";
APT::Compressor::gzip::Cost "100";
APT::Compressor::gzip::CompressArg "";
APT::Compressor::gzip::CompressArg:: "-6n";
APT::Compressor::gzip::UncompressArg "";
APT::Compressor::gzip::UncompressArg:: "-d";
APT::Compressor::xz "";
APT::Compressor::xz::Name "xz";
APT::Compressor::xz::Extension ".xz";
APT::Compressor::xz::Binary "xz";
APT::Compressor::xz::Cost "200";
APT::Compressor::xz::CompressArg "";
APT::Compressor::xz::CompressArg:: "-6";
APT::Compressor::xz::UncompressArg "";
APT::Compressor::xz::UncompressArg:: "-d";
APT::Compressor::bzip2 "";
APT::Compressor::bzip2::Name "bzip2";
APT::Compressor::bzip2::Extension ".bz2";
APT::Compressor::bzip2::Binary "bzip2";
APT::Compressor::bzip2::Cost "300";
APT::Compressor::bzip2::CompressArg "";
APT::Compressor::bzip2::CompressArg:: "-6";
APT::Compressor::bzip2::UncompressArg "";
APT::Compressor::bzip2::UncompressArg:: "-d";
APT::Compressor::lzma "";
APT::Compressor::lzma::Name "lzma";
APT::Compressor::lzma::Extension ".lzma";
APT::Compressor::lzma::Binary "xz";
APT::Compressor::lzma::Cost "400";
APT::Compressor::lzma::CompressArg "";
APT::Compressor::lzma::CompressArg:: "--format=lzma";
APT::Compressor::lzma::CompressArg:: "-6";
APT::Compressor::lzma::UncompressArg "";
APT::Compressor::lzma::UncompressArg:: "--format=lzma";
APT::Compressor::lzma::UncompressArg:: "-d";
Dir "/";
Dir::State "var/lib/apt/";
Dir::State::lists "lists/";
Dir::State::cdroms "cdroms.list";
Dir::State::mirrors "mirrors/";
Dir::State::extended_states "extended_states";
Dir::State::status "/var/lib/dpkg/status";
Dir::Cache "var/cache/apt/";
Dir::Cache::archives "archives/";
Dir::Cache::srcpkgcache "srcpkgcache.bin";
Dir::Cache::pkgcache "pkgcache.bin";
Dir::Etc "etc/apt/";
Dir::Etc::sourcelist "sources.list";
Dir::Etc::sourceparts "sources.list.d";
Dir::Etc::main "apt.conf";
Dir::Etc::netrc "auth.conf";
Dir::Etc::parts "apt.conf.d";
Dir::Etc::preferences "preferences";
Dir::Etc::preferencesparts "preferences.d";
Dir::Etc::trusted "trusted.gpg";
Dir::Etc::trustedparts "trusted.gpg.d";
Dir::Bin "";
Dir::Bin::methods "/usr/lib/apt/methods";
Dir::Bin::solvers "";
Dir::Bin::solvers:: "/usr/lib/apt/solvers";
Dir::Bin::dpkg "/usr/bin/dpkg";
Dir::Bin::bzip2 "/bin/bzip2";
Dir::Bin::xz "/usr/bin/xz";
Dir::Bin::lz4 "/usr/bin/lz4";
Dir::Bin::lzma "/usr/bin/xz";
Dir::Media "";
Dir::Media::MountPath "/media/cdrom";
Dir::Log "var/log/apt";
Dir::Log::Terminal "term.log";
Dir::Log::History "history.log";
Dir::Ignore-Files-Silently "";
Dir::Ignore-Files-Silently:: "~$";
Dir::Ignore-Files-Silently:: "\.disabled$";
Dir::Ignore-Files-Silently:: "\.bak$";
Dir::Ignore-Files-Silently:: "\.dpkg-[a-z]+$";
Dir::Ignore-Files-Silently:: "\.save$";
Dir::Ignore-Files-Silently:: "\.orig$";
Dir::Ignore-Files-Silently:: "\.distUpgrade$";
Acquire "";
Acquire::AllowInsecureRepositories "1";
Acquire::AllowDowngradeToInsecureRepositories "0";
Acquire::cdrom "";
Acquire::cdrom::mount "/media/cdrom";
Acquire::IndexTargets "";
Acquire::IndexTargets::deb "";
Acquire::IndexTargets::deb::Packages "";
Acquire::IndexTargets::deb::Packages::MetaKey "$(COMPONENT)/binary-$(ARCHITECTURE)/Packages";
Acquire::IndexTargets::deb::Packages::flatMetaKey "Packages";
Acquire::IndexTargets::deb::Packages::ShortDescription "Packages";
Acquire::IndexTargets::deb::Packages::Description "$(RELEASE)/$(COMPONENT) $(ARCHITECTURE) Packages";
Acquire::IndexTargets::deb::Packages::flatDescription "$(RELEASE) Packages";
Acquire::IndexTargets::deb::Packages::Optional "0";
Acquire::IndexTargets::deb::Translations "";
Acquire::IndexTargets::deb::Translations::MetaKey "$(COMPONENT)/i18n/Translation-$(LANGUAGE)";
Acquire::IndexTargets::deb::Translations::flatMetaKey "$(LANGUAGE)";
Acquire::IndexTargets::deb::Translations::ShortDescription "Translation-$(LANGUAGE)";
Acquire::IndexTargets::deb::Translations::Description "$(RELEASE)/$(COMPONENT) Translation-$(LANGUAGE)";
Acquire::IndexTargets::deb::Translations::flatDescription "$(RELEASE) Translation-$(LANGUAGE)";
Acquire::IndexTargets::deb-src "";
Acquire::IndexTargets::deb-src::Sources "";
Acquire::IndexTargets::deb-src::Sources::MetaKey "$(COMPONENT)/source/Sources";
Acquire::IndexTargets::deb-src::Sources::flatMetaKey "Sources";
Acquire::IndexTargets::deb-src::Sources::ShortDescription "Sources";
Acquire::IndexTargets::deb-src::Sources::Description "$(RELEASE)/$(COMPONENT) Sources";
Acquire::IndexTargets::deb-src::Sources::flatDescription "$(RELEASE) Sources";
Acquire::IndexTargets::deb-src::Sources::Optional "0";
Acquire::Changelogs "";
Acquire::Changelogs::URI "";
Acquire::Changelogs::URI::Origin "";
Acquire::Changelogs::URI::Origin::Debian "http://metadata.ftp-master.debian.org/changelogs/@CHANGEPATH@_changelog";
Acquire::Changelogs::URI::Origin::Tanglu "http://metadata.tanglu.org/changelogs/@CHANGEPATH@_changelog";
Acquire::Changelogs::URI::Origin::Ubuntu "http://changelogs.ubuntu.com/changelogs/pool/@CHANGEPATH@/changelog";
Acquire::Changelogs::URI::Origin::Ultimedia "http://packages.ultimediaos.com/changelogs/pool/@CHANGEPATH@/changelog.txt";
Acquire::Languages "";
Acquire::Languages:: "en";
Acquire::Languages:: "none";
Aptitude "";
Aptitude::Recommends-Important "no";
DPkg "";
DPkg::Pre-Install-Pkgs "";
DPkg::Pre-Install-Pkgs:: "/usr/bin/apt-listchanges --apt || test $? -ne 10";
DPkg::Pre-Install-Pkgs:: "/usr/sbin/dpkg-preconfigure --apt || true";
DPkg::Tools "";
DPkg::Tools::Options "";
DPkg::Tools::Options::/usr/bin/apt-listchanges "";
DPkg::Tools::Options::/usr/bin/apt-listchanges::Version "2";
Binary "apt-config";
Binary::apt "";
Binary::apt::APT "";
Binary::apt::APT::Color "1";
Binary::apt::APT::Cache "";
Binary::apt::APT::Cache::Show "";
Binary::apt::APT::Cache::Show::Version "2";
Binary::apt::APT::Cache::AllVersions "0";
Binary::apt::APT::Cache::ShowVirtuals "1";
Binary::apt::APT::Cache::Search "";
Binary::apt::APT::Cache::Search::Version "2";
Binary::apt::APT::Cache::ShowDependencyType "1";
Binary::apt::APT::Cache::ShowVersion "1";
Binary::apt::APT::Get "";
Binary::apt::APT::Get::Upgrade-Allow-New "1";
Binary::apt::APT::Cmd "";
Binary::apt::APT::Cmd::Show-Update-Stats "1";
Binary::apt::APT::Keep-Downloaded-Packages "0";
Binary::apt::DPkg "";
Binary::apt::DPkg::Progress-Fancy "1";
Binary::apt::Acquire "";
Binary::apt::Acquire::AllowInsecureRepositories "0";
CommandLine "";
CommandLine::AsString "apt-config dump";

-- (no /etc/apt/preferences present) --


-- /etc/apt/sources.list --

# Repos managed by puppet.

-- System Information:
Debian Release: stretch/sid
  APT prefers unstable
  APT policy: (990, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 4.3.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages apt depends on:
ii  adduser                 3.113+nmu3
ii  debian-archive-keyring  2014.3
ii  gnupg                   1.4.20-3
ii  gnupg2                  2.1.11-5
ii  gpgv                    1.4.20-3
ii  libapt-pkg5.0           1.2.3
ii  libc6                   2.21-7
ii  libgcc1                 1:5.3.1-8
ii  libstdc++6              5.3.1-8

apt recommends no packages.

Versions of packages apt suggests:
pn  apt-doc                      <none>
pn  aptitude | synaptic | wajig  <none>
ii  dpkg-dev                     1.18.4
ii  python-apt                   1.1.0~beta1

-- no debconf information



Information forwarded to [email protected], APT Development Team <[email protected]>:
Bug#814843; Package apt. (Mon, 15 Feb 2016 21:27:10 GMT) (full text, mbox, link).


Acknowledgement sent to Julian Andres Klode <[email protected]>:
Extra info received and forwarded to list. Copy sent to APT Development Team <[email protected]>. (Mon, 15 Feb 2016 21:27:10 GMT) (full text, mbox, link).


Message #10 received at [email protected] (full text, mbox, reply):

From: Julian Andres Klode <[email protected]>
To: Russ Allbery <[email protected]>, [email protected]
Subject: Re: Bug#814843: Origin pins for single packages don't work
Date: Mon, 15 Feb 2016 22:25:17 +0100
Control: severity -1 wishlist
Control: retitle -1 show package-specific pin on sources

(Not a bug, just UI)

On Mon, Feb 15, 2016 at 12:46:30PM -0800, Russ Allbery wrote:
> Package: apt
> Version: 1.2.3
> Severity: normal
> 
> I have the following files in /etc/apt/preferences.d:
> 
> ==> google-base.pref <==
> Package: *
> Pin: origin dl.google.com
> Pin-Priority: 1
> 
> ==> google-chrome.pref <==
> Package: google-chrome-stable
> Pin: origin dl.google.com
> Pin-Priority: 100
> 
> The goal is to assign a low priority to all packages from dl.google.com
> except for google-chrome-stable, which gets a somewhat higher priority
> that allows automatic updates.
> 
> But this doesn't actually work:
> 
> google-chrome-stable:
>   Installed: 48.0.2564.109-1
>   Candidate: 48.0.2564.109-1
>   Version table:
>  *** 48.0.2564.109-1 100

This shows the pin matching a Package: google-chrome-stable entry.

>           1 http://dl.google.com/linux/chrome/deb stable/main amd64 Packages

This shows the pin value for that source, that is, Package: * pins.

>         100 /var/lib/dpkg/status

> The general pin works fine, but the specific package pin does not.  If I
> delete the general pin entirely, I get:
> 
> google-chrome-stable:
>   Installed: 48.0.2564.109-1
>   Candidate: 48.0.2564.109-1
>   Version table:
>  *** 48.0.2564.109-1 100
>         500 http://dl.google.com/linux/chrome/deb stable/main amd64 Packages
>         100 /var/lib/dpkg/status
> 
> showing that the google-chrome.pref file appears to just be ignored
> completely.  The same continues to be true even if I change it to be a
> version pin, as in:

No, you still get 100, as shown next to the version number.

Consider
 Package: *
 Pin: origin dl.google.com
 Pin-Priority: 1

 Package: google-chrome-stable
 Pin: origin dl.google.com
 Pin-Priority: 111

The output is:

google-chrome-stable:
  Installed: 48.0.2564.103-1
  Candidate: 48.0.2564.109-1
  Version table:
     48.0.2564.109-1 111
          1 http://dl.google.com/linux/chrome/deb stable/main amd64 Packages

Meaning that the version was pinned at 111, whereas the source usually only
has 1.

Maybe it would make sense to show that 
  http://dl.google.com/linux/chrome/deb stable/main amd64 Packages
is effectively 111 here, but we do not store that information, we only
store one version -> pin assocation, so it fails for multiple ones. So
I don't think we can change that.

But I'll leave it open for now, maybe I get a better idea.

-- 
Julian Andres Klode  - Debian Developer, Ubuntu Member

See http://wiki.debian.org/JulianAndresKlode and http://jak-linux.org/.

When replying, only quote what is necessary, and write each reply
directly below the part(s) it pertains to (`inline'). Thank you.



Severity set to 'wishlist' from 'normal' Request was from Julian Andres Klode <[email protected]> to [email protected]. (Mon, 15 Feb 2016 21:27:10 GMT) (full text, mbox, link).


Changed Bug title to 'show package-specific pin on sources' from 'Origin pins for single packages don't work' Request was from Julian Andres Klode <[email protected]> to [email protected]. (Mon, 15 Feb 2016 21:27:11 GMT) (full text, mbox, link).


Information forwarded to [email protected], APT Development Team <[email protected]>:
Bug#814843; Package apt. (Mon, 15 Feb 2016 23:15:07 GMT) (full text, mbox, link).


Acknowledgement sent to Russ Allbery <[email protected]>:
Extra info received and forwarded to list. Copy sent to APT Development Team <[email protected]>. (Mon, 15 Feb 2016 23:15:08 GMT) (full text, mbox, link).


Message #19 received at [email protected] (full text, mbox, reply):

From: Russ Allbery <[email protected]>
To: Julian Andres Klode <[email protected]>
Cc: [email protected]
Subject: Re: Bug#814843: Origin pins for single packages don't work
Date: Mon, 15 Feb 2016 15:10:26 -0800
Julian Andres Klode <[email protected]> writes:

>> But this doesn't actually work:
>> 
>> google-chrome-stable:
>>   Installed: 48.0.2564.109-1
>>   Candidate: 48.0.2564.109-1
>>   Version table:
>>  *** 48.0.2564.109-1 100

> This shows the pin matching a Package: google-chrome-stable entry.

>>           1 http://dl.google.com/linux/chrome/deb stable/main amd64 Packages

> This shows the pin value for that source, that is, Package: * pins.

Ah!  Apologies -- I completely misread that.  Thank you for the
information!

-- 
Russ Allbery ([email protected])               <http://www.eyrie.org/~eagle/>



Send a report that this bug log contains spam.


Debian bug tracking system administrator <[email protected]>. Last modified: Mon Nov 11 13:46:50 2024; Machine Name: bembo

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.