[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#787827: Broken version comparison in kernel postinst hook (apt-auto-removal)



Package: apt
Version: 1.0.9.10
Severity: important

Firstly, the script is currently not stripping the architecture from
names of foreign kernel packages, so I get these error messages:

/etc/kernel/postinst.d/apt-auto-removal:
dpkg: error: version '3.16.0-4-amd64:amd64' has bad syntax: epoch in version is not number
dpkg: error: version '3.16.0-4-amd64:amd64' has bad syntax: epoch in version is not number
dpkg: error: version '3.2.0-4-amd64:amd64' has bad syntax: epoch in version is not number
dpkg: error: version '3.2.0-4-amd64:amd64' has bad syntax: epoch in version is not number
dpkg: error: version '4.0.0-1-amd64:amd64' has bad syntax: epoch in version is not number
dpkg: error: version '4.0.0-1-amd64:amd64' has bad syntax: epoch in version is not number

Secondly, version comparisons between kernel release strings should be
done using the linux-version command from linux-base, not dpkg.  dpkg
does not know that e.g. 4.1-rc6 comes before 4.1.

Ben.

-- Package-specific info:

-- (/etc/apt/preferences present, but not submitted) --


-- (no /etc/apt/sources.list present) --


-- System Information:
Debian Release: stretch/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)
Foreign Architectures: amd64, ppc64el, powerpc

Kernel: Linux 4.0.0-2-686-pae (SMP w/4 CPU cores)
Locale: LANG=en_GB.utf8, LC_CTYPE=en_GB.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages apt depends on:
ii  debian-archive-keyring  2014.3
ii  gnupg                   1.4.19-3
ii  libapt-pkg4.12          1.0.9.10
ii  libc6                   2.19-18
ii  libgcc1                 1:5.1.1-9
ii  libstdc++6              5.1.1-9

apt recommends no packages.

Versions of packages apt suggests:
pn  apt-doc     <none>
ii  aptitude    0.6.11-1+b1
ii  dpkg-dev    1.18.1
ii  python-apt  0.9.4
ii  synaptic    0.81.3

-- no debconf information


Reply to: