[Bug 1268716] Re: Pinning repositories not being used properly in apt-get dist-upgrade -s

Julian Andres Klode juliank at ubuntu.com
Tue Jan 14 22:27:39 UTC 2014


Not a bug. It's clearly documented in one of the manpages that the order
of sources.list entries determine the repository if the same version is
available from multiple repositories.

** Changed in: apt (Ubuntu)
       Status: New => Invalid

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to apt in Ubuntu.
https://bugs.launchpad.net/bugs/1268716

Title:
  Pinning repositories not being used properly in apt-get dist-upgrade
  -s

Status in “apt” package in Ubuntu:
  Invalid

Bug description:
  I'm having a unique issue involving repository pinning and apt-get
  reporting an incorrect repository. There is a package that has the
  same version in 2 different repositories (precise-updates and precise-
  security). Even though I have the Apt Pinning/Preferences configured
  properly and apt-cache policy reporting the correct information, apt-
  get dist-upgrade -s is not reporting the correct repository. This
  becomes an issue when trying to determine if a package/version is a
  security update or not.

  
  Code:
  root at server:~# cat /etc/apt/preferences.d/pin-precise-updates-release
  Package: *
  Pin: release a=precise-updates
  Pin-Priority: 600

  
  Package: *
  Pin: release a=precise
  Pin-Priority: 300

  
  root at server:~# cat /etc/apt/preferences.d/pin-precise-security-release
  Package: *
  Pin: release a=precise-security
  Pin-Priority: 900

  root at server:~# sudo apt-get update
  (output clipped)

  root at server:~# sudo apt-cache policy linux-libc-dev
  linux-libc-dev:
    Installed: 3.2.0-53.81
    Candidate: 3.2.0-58.88
    Version table:
       3.2.0-58.88 0
          600 http://us.archive.ubuntu.com/ubuntu/ precise-updates/main amd64 Packages
          900 http://security.ubuntu.com/ubuntu/ precise-security/main amd64 Packages
   *** 3.2.0-53.81 0
          100 /var/lib/dpkg/status
       3.2.0-23.36 0
          500 http://us.archive.ubuntu.com/ubuntu/ precise/main amd64 Packages

  
  root at server:~# sudo apt-get dist-upgrade -s
  Reading package lists... Done
  Building dependency tree
  Reading state information... Done
  Calculating upgrade... Done
  The following packages will be upgraded:
    linux-libc-dev
  1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
  Inst linux-libc-dev [3.2.0-53.81] (3.2.0-58.88 Ubuntu:12.04/precise-updates [amd64])
  Conf linux-libc-dev (3.2.0-58.88 Ubuntu:12.04/precise-updates [amd64])



  1) Release - 
  # lsb_release -rd
  Description:    Ubuntu 12.04.4 LTS
  Release:        12.04

  
  2) Package Version - 
  # apt-cache policy apt
  apt:
    Installed: 0.8.16~exp12ubuntu10.16

  
  3) What I expect to happen - 
  I would expect "sudo apt-get dist-upgrade -s" to show Ubuntu:12.04/precise-security and not Ubuntu:12.04/precise-updates because of the higher repository priority.

  
  4) What happened instead - 
  sudo apt-get dist-upgrade -s is showing the correct package version, but the repository being shown is one of a smaller pin value.

  
  I have found that if I put the precise-security source before precise-updates in /etc/apt/sources.list, apt-get dist-upgrade -s shows the precise-security repository.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1268716/+subscriptions



More information about the foundations-bugs mailing list