1

My Debian system is set to install unstable packages by default

$ cat /etc/apt/apt.conf.d/99defaultrelease 
APT::Default-Release "unstable";

However, I would like to pull automake from stable, ie, version 1.15

$ apt-cache policy automake
automake:
  Installed: (none)
  Candidate: 1:1.16.1-4
  Version table:
     1:1.16.1-4 990
        500 http://deb.debian.org/debian testing/main amd64 Packages
        500 http://deb.debian.org/debian testing/main i386 Packages
        990 http://deb.debian.org/debian unstable/main amd64 Packages
        990 http://deb.debian.org/debian unstable/main i386 Packages
        990 http://deb.debian.org/debian sid/main amd64 Packages
        990 http://deb.debian.org/debian sid/main i386 Packages
     1:1.15-6 500
        500 http://deb.debian.org/debian stable/main amd64 Packages
        500 http://deb.debian.org/debian stable/main i386 Packages

But whenever I tell it to install automake/stable or automake with -t stable, apt just ignores that part.

$ apt-get install automake -t stable --dry-run
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  autoconf autotools-dev
Suggested packages:
  autoconf-archive gnu-standards autoconf-doc libtool
The following NEW packages will be installed:
  autoconf automake autotools-dev
0 upgraded, 3 newly installed, 0 to remove and 125 not upgraded.
Inst autoconf (2.69-11 Debian:testing, Debian:unstable [all])
Inst autotools-dev (20180224.1 Debian:testing, Debian:unstable [all])
Inst automake (1:1.16.1-4 Debian:testing, Debian:unstable [all])
Conf autoconf (2.69-11 Debian:testing, Debian:unstable [all])
Conf autotools-dev (20180224.1 Debian:testing, Debian:unstable [all])
Conf automake (1:1.16.1-4 Debian:testing, Debian:unstable [all])

I can specify the package version like this:

apt-get install automake=1:1.15-6

Which should solve my problem, although the dependencies (autoconf, autotools-dev, etc.) will still be installed from unstable, which is a little concerning.

Anyway why is apt ignoring the given target in this case?

Also - this is not a question - if this behavior is "by design", I think it would be really nice if apt could print some informative notice.

Edit

This is the output of apt -t stable policy automake (note: after having installed automake)

$ apt -t stable policy automake
automake:
  Installed: 1:1.16.1-4
  Candidate: 1:1.16.1-4
  Version table:
 *** 1:1.16.1-4 1001
        500 http://deb.debian.org/debian testing/main amd64 Packages
        500 http://deb.debian.org/debian testing/main i386 Packages
       1001 http://deb.debian.org/debian unstable/main amd64 Packages
       1001 http://deb.debian.org/debian unstable/main i386 Packages
       1001 http://deb.debian.org/debian sid/main amd64 Packages
       1001 http://deb.debian.org/debian sid/main i386 Packages
        100 /var/lib/dpkg/status
     1:1.15-6 990
        990 http://deb.debian.org/debian stable/main amd64 Packages
        990 http://deb.debian.org/debian stable/main i386 Packages

Since this might be an issue with priorities, this might also be relevant:

$ cat /etc/apt/preferences
Package: *
Pin: release a=unstable
Pin-Priority: 1001
2
  • 2
    Could you edit your question to show the output of apt -t stable policy automake? (I want to check whether your unstable sources stay at priority 990.) Commented Mar 8, 2019 at 10:11
  • @StephenKitt sure, thank you. Done! Note that I have already installed automake by specifying the older version of autoconf to avoid a bug in unstable. I don't think it would affect the priorities in any way. I didn't know what these numbers meant :) now I know, I guess. Commented Mar 8, 2019 at 11:51

1 Answer 1

2

The behaviour you’re seeing comes from the priorities you’ve defined. Setting the default release, using Default-Release or -t, sets the priority to 990 for corresponding versions; your priority of 1001 for unstable always beats that.

See man apt_preferences for details.

4
  • Thank you. So "Pin-Priority" is redundant? Commented Mar 8, 2019 at 12:22
  • Not quite, if you don’t set it to 990. But in your case, if you want to track unstable, Default-Release is sufficient, you don’t need an additional Pin-Priority. Note that values starting at 1000 mean that downgrades are allowed, which you may not want either. Commented Mar 8, 2019 at 12:36
  • In fact your first policy section in your question shows that Pin-Priority is overridden by Default-Release since your unstable priority was 990 before you specified -t. Commented Mar 8, 2019 at 12:39
  • Thank you. I have removed the Pin-Priority, since I don't fully understand it's purpose. I had followed instructions found online to upgrade my system to unstable. It may have intended to force all packages to upgrade, in which case I'm guessing it's not needed anymore. Commented Mar 8, 2019 at 12:52

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.