When I run apt-show-versions -a dwm command(apt-show-versions lists available package versions with distribution) then I see following output:

# apt-show-versions -a dwm
dwm:i386 6.0-4-martin install ok installed
dwm:i386 6.0-7 jessie http.debian.net
dwm:i386 6.0-4-martin newer than version in archive

dwm was installed with custom-made deb package few years ago. However, why does apt-show-versions show that it is a newer than the version in the archive when I use jessie repos:

deb http://http.debian.net/debian jessie main contrib non-free
deb-src http://http.debian.net/debian jessie main contrib non-free

..and they should provide dwm version 6.0-7.


From Debian's perspective your private version is newer than archive's, but the reason isn't obvious. In Debian versions, the Debian revision can't contain hyphens, so 6.0-4-martin is parsed as Debian revision martin of upstream version 6.0-4, whereas 6.0-7 is parsed as Debian revision 7 of upstream version 6.0. When comparing versions, 6.0-4 is greater than 6.0...

You can check this using dpkg --compare-versions:

$ dpkg --compare-versions 6.0-4-martin gt 6.0-7
$ echo $?

which means dpkg considers 6.0-4-martin as greater than 6.0-7.

You should use + as the separator for private suffixes (6.0-4+martin or whatever's appropriate the next time), unless you're preparing a private backport in which case you should use ~.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.