1

Working on Ubuntu 14.04.5 LTS. zsh is a package, for which an upgrade is available:

# apt-cache policy zsh
zsh:
  Installed: 5.0.2-3ubuntu6
  Candidate: 5.0.2-3ubuntu6
  Version table:
     5.0.5-4ubuntu1~ubuntu14.04.1 0
        100 http://nova.clouds.archive.ubuntu.com/ubuntu/ trusty-backports/main amd64 Packages
 *** 5.0.2-3ubuntu6 0
        500 http://nova.clouds.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
        100 /var/lib/dpkg/status

However, neither apt-get install zsh nor unattended-upgrades would upgrade it:

apt-get

# apt-get install --dry-run zsh
Reading package lists... Done
Building dependency tree       
Reading state information... Done
zsh is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

unattended-upgrade

# unattended-upgrade --debug   
Initial blacklisted packages: 
Starting unattended upgrades script
Allowed origins are: ['o=LP-PPA-brightbox-ruby-ng,a=trusty', 'o=Percona Development Team,a=', 'o=Ubuntu,a=trusty-security', 'o=Ubuntu,a=trusty-updates', 'o=Ubuntu,a=trusty', 'o=Ubuntu,a=trusty-backports', 'o=LP-PPA-ondrej-php,a=trusty', 'o=RabbitMQ,a=testing', 'o=LP-PPA-vbernat-haproxy-1.5,a=trusty', 'o=Node Source,a=', 'o=,a=now', 'o=Ubuntu,a=trusty-security', 'o=Ubuntu,a=trusty', 'o=UbuntuESM,a=trusty', 'o=Ubuntu,a=trusty-updates', 'o=Ubuntu,a=trusty-proposed', 'o=Ubuntu,a=trusty-backports', 'o=LP-PPA-ondrej-php,a=trusty', 'o=LP-PPA-brightbox-ruby-ng,a=trusty', 'o=Node Source,a=trusty']
pkgs that look like they should be upgraded: 
Fetched 0 B in 0s (0 B/s)                                                                                                                         
fetch.run() result: 0
blacklist: []
No packages found that can be upgraded unattended and no pending auto-removals

Even if I explicitly request the new version, no upgrade will take place:

# apt-get install zsh=5.0.5-4ubuntu1~ubuntu14.04.1
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  zsh
Suggested packages:
  zsh-doc
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Why would apt-get lie to me, that I already have the latest version? Why would unattended-upgrades similarly skip it, even though I list all possible origins, including trusty-backports, in its /etc/apt/apt.conf.d/50unattended-upgrades as "allowed"?

UPDATE: yes, it would make sense, that "backports" be disabled by default. However, we have them listed as valid origins in /etc/apt/sources.list:

## Uncomment the following two lines to add software from the 'backports'
## repository.
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://nova.clouds.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse
deb-src http://nova.clouds.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse

Even if I remove the restricted part from the above lines, it still would not upgrade zsh...

UPDATE: After studying the link @olivierb2 offered in his comment below, I created /etc/apt/preferences.d/equalize to force equal priority to all origins:

Package: *
Pin: release a=trusty-security
Pin-Priority: 509

Package: *
Pin: release a=trusty
Pin-Priority: 509

Package: *
Pin: release a=testing
Pin-Priority: 509

Package: *
Pin: release a=trusty-updates
Pin-Priority: 509

Package: *
Pin: release a=trusty-backports
Pin-Priority: 509

Package: *
Pin: release a=now
Pin-Priority: 509

And now things work as I expect them to:

# apt-cache policy zsh
zsh:
  Installed: 5.0.2-3ubuntu6
  Candidate: 5.0.5-4ubuntu1~ubuntu14.04.1
  Version table:
     5.0.5-4ubuntu1~ubuntu14.04.1 0
        509 http://nova.clouds.archive.ubuntu.com/ubuntu/ trusty-backports/main amd64 Packages
 *** 5.0.2-3ubuntu6 0
        509 http://nova.clouds.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
        509 /var/lib/dpkg/status

I still do not understand, just what controls the priorities in the absence of explicit "preferences" setting. But now I have the solution.

1 Answer 1

4

Backports are disabled by default, you have to use the following command to upgrade your package from backports

apt-get install zsh -t trusty-backports

Edit: I miss the source page where you can find information

5
  • Is it written in some config-file, that backports are disabled, or is it hard-coded in apt-get and unattended-upgrades somewhere? Thanks!
    – Mikhail T.
    Sep 26, 2017 at 21:09
  • I updated my question with additional details. Would you give it another glance, please?
    – Mikhail T.
    Sep 26, 2017 at 22:37
  • Apt rules regarding Backports is hard coded. It's not very recommended to bypass this rules. More information here help.ubuntu.com/community/UbuntuBackports
    – ob2
    Sep 27, 2017 at 9:10
  • I still can't find, where it is hardcoded. The command dpkg -L apt | xargs fgrep -d skip backports does not list anything... But your link identified, how to work-around this -- I when I pinning priorities, one must use release instead of origin I used above! Thanks.
    – Mikhail T.
    Sep 27, 2017 at 14:35
  • 1
    E: The value 'trusty-backports' is invalid for APT::Default-Release as such a release is not available in the sources
    – alper
    Jul 29, 2021 at 20:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .