apt-get upgrade vs apt-show-versions

Tom H tomh0665 at gmail.com
Sun Jan 17 22:16:24 UTC 2016


On Sun, Jan 17, 2016 at 9:32 PM, Лев Тен <l.ten at reg.ru> wrote:
>
> I am running Ubuntu 14.04.3 LTS some servers and I wonder if someone have
> noticed a difference in output of two utilities in subject concerning
> security updates, for example today I noticed a bunch of packages that
> apt-show-version marked as trusty-security, while apt-get upgrade show them
> as trusty-updates.
>
> For example:
>
> root at server1:~# apt-get dist-upgrade -s | grep python-samba | grep Inst
> Inst python-samba [2:4.1.6+dfsg-1ubuntu2.14.04.8]
> (2:4.1.6+dfsg-1ubuntu2.14.04.11 Ubuntu:14.04/trusty-updates [amd64]) []
>
> root at server1:~# apt-show-versions | grep python-samba
> python-samba:amd64/trusty-security 2:4.1.6+dfsg-1ubuntu2.14.04.8 upgradeable
> to 2:4.1.6+dfsg-1ubuntu2.14.04.11

I don't have access to a 14.04 system at the moment to check myself
but it's better to run "apt-cache policy python-samba" to check on
installed and installable packages.

I changed the sources.list of a 16.04 box to pull in 14.04 packages
and ran "apt-get update", so ignore the "Installed" and "Candidate"
lines below. :)

th at localhost:~$ apt-cache policy python-samba
python-samba:
  Installed: 2:4.3.3+dfsg-1ubuntu1
  Candidate: 2:4.3.3+dfsg-1ubuntu1
  Version table:
 *** 2:4.3.3+dfsg-1ubuntu1 100
        100 /var/lib/dpkg/status
     2:4.1.6+dfsg-1ubuntu2.14.04.11 500
        500 http://security.ubuntu.com/ubuntu trusty-security/main
amd64 Packages
        500 http://uk.archive.ubuntu.com/ubuntu trusty-updates/main
amd64 Packages
     2:4.1.6+dfsg-1ubuntu2 500
        500 http://uk.archive.ubuntu.com/ubuntu trusty/main amd64 Packages

So both trusty-security and trusty-updates provide
"2:4.3.3+dfsg-1ubuntu1". It's not the first time that I see this or
apt-get installing from -updates rather than -security but it's never
bothered me.

I also downloaded the Packages.gz of -security and -updates and they
both (unsurprisingly) provide the same package:

th at localhost:/tmp/zzDown$ gzip -dc trusty-security-Packages.gz | grep
-A23 'Package: python-samba' | awk 'FNR==1 || FNR==9 || FNR==12
{print}'
Package: python-samba
Version: 2:4.1.6+dfsg-1ubuntu2.14.04.11
Filename: pool/main/s/samba/python-samba_4.1.6+dfsg-1ubuntu2.14.04.11_amd64.deb

th at localhost:/tmp/zzDown$ gzip -dc trusty-updates-Packages.gz | grep
-A23 'Package: python-samba' | awk 'FNR==1 || FNR==9 || FNR==12
{print}'
Package: python-samba
Version: 2:4.1.6+dfsg-1ubuntu2.14.04.11
Filename: pool/main/s/samba/python-samba_4.1.6+dfsg-1ubuntu2.14.04.11_amd64.deb



More information about the ubuntu-users mailing list