Score:1

Is the version of an apt package always the version of the contained software?

ng flag

I am using wondershaper but it's hard to tell the version because it doesn't support -v or --version. So I run

apt show wondershaper

and it says Version: 1.1a-10.

But I don't know if it's the version of the package or the contained software.

So I want to know:

Is it 100% safe that apt show does tell the version of the contained software and not of the package itself?

Score:7
cn flag

It is the version of a package. It can match some other version assigned by the software author, or not.

apt show shows exactly what the package maintainer wrote.

Score:2
cn flag

Let's find out.

Our first stop is the Debian Package Tracker

  • This provides an upstream link
  • It also provides a history of imports. Looking at that history, we see that the -10 is added by Debian; it's the 10th pull of that upstream version.

Our next stop is that upstream source. Take a look at the changelog.

  • Version 1.1a is the upstream release number.

So the final result for version 1.1a-10 is that it's upstream version 1.1a. Everything after that is added by downstream distros for their own version control.

user535733 avatar
cn flag
Important to note: The software upstream has been unmaintained for over 12 years! There are branches available that are much newer, maintained, and with additional features. Consider evaluating whether or not one of those newer branches might make a better package for everybody. Debian relies on volunteers to help identify problems like these and to develops solutions to those problems.
Score:2
jp flag

Is it 100% safe that apt show does tell the version of the contained software and not of the package itself?

It is not 100% safe, at least if you mean the manifest version printed by the application program itself. See this example with the Ubuntu Startup Disk Creator. In this case I think that the maintainer forgot about the print statement in the program.

apt show lists data about packages

$ apt show usb-creator-gtk | grep -i version

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

Version: 0.3.5ubuntu18.04.2

Version printed by the application program itself

$ usb-creator-gtk --version 2> /dev/null
0.3.3

apt-cache policy is another way to list data about packages

$ apt-cache policy usb-creator-gtk 
usb-creator-gtk:
  Installed: 0.3.5ubuntu18.04.2
  Candidate: 0.3.5ubuntu18.04.2
  Version table:
 *** 0.3.5ubuntu18.04.2 500
        500 http://se.archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages
        100 /var/lib/dpkg/status
     0.3.5ubuntu18.04.1 500
        500 http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages
     0.3.5 500
        500 http://se.archive.ubuntu.com/ubuntu bionic/main amd64 Packages
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.