My Package Version Number Appears Greater Yet apt-get Doesn't Select It

Posted by nutznboltz on Ask Ubuntu See other posts from Ask Ubuntu or by nutznboltz
Published on 2011-11-23T13:51:27Z Indexed on 2011/11/23 18:05 UTC
Read the original article Hit count: 387

Filed under:
|

Backstory:

It was determined that when using lxc container VMs the Nagios nrpe shutdown script when run on the host of the containers would kill the nrpe processes inside the containers. This was remediated by changing the script to use pidfiles instead of searching the process table for the nrpe process.

Regrettably start-stop-daemon is a C program that resulted from translating a Perl script and it shows. There are far too many global varibles in start-stop-daemon.c and although there are some nice blocks of comments there are far to few comments that explain the intent behind variable names such as "schedule" (the string "schedule" appears in many contexts.) The manual page for start-stop-daemon strongly suggests that unless you use the "--retry" option the start-stop-daemon program may return before the process it sent a signal to actually calls exit() and terminates, however it doesn't actually state this in plain English.

The obtuseness of start-stop-daemon is most likely the reason that the "fixed" version of the script includes a dubious comment indicating that sometimes the pid file has not been removed. I can easily see why someone would not understand that he left the --retry option missing. This bug also causes failures when the script is given the "restart" option; the nrpe daemon will shutdown but not start up again.

Did I mention that since applying the update our nrpe servers started crashing over and over? Repairing this is why I am doing this work.

I have been working on remediating the fix. You can see my current work in this PPA.

Actual Question:

The upstream version number of nagios-nrpe-server in lucid-updates is

2.12-4ubuntu1.10.04.1

My PPA uses this version number

2.12-4ubuntu1.10.04.1.1~ppa1~lucid1

I check the rules here and use this test program and I am lead to believe that the version number I use in my PPA is greater than the one in lucid-updates yet when I ran:

sudo add-apt-repository ppa:nutznboltz/nrpe-unbreak-lp-600941
sudo apt-get update
sudo aptitiude dist-upgrade

The replacement package was not installed.

I was able to install it using

sudo aptitude install nagios-nrpe-server=2.12-4ubuntu1.10.04.1.1~ppa1~lucid1

Can anyone explain this behavior? Why didn't my version number appear greater to "aptitude dist-upgrade"?

Thanks

$ cat /etc/apt/preferences
Package: *
Pin: release a=lucid-backports
Pin-Priority: 400

Package: *
Pin: release a=lucid-security
Pin-Priority: 990

Package: *
Pin: release a=lucid-updates
Pin-Priority: 900

Package: *
Pin: release a=lucid-proposed
Pin-Priority: 400
$ ls /etc/apt/preferences.d/
$

Should not make any difference as a PPA cannot be in any of those pockets.

I went ahead and bumped the version number in the PPA to 2.12-4ubuntu1.10.04.2~ppa1~lucid1. I'll see if that makes a difference.

I do notice that lintian complains:

W: nagios-nrpe-server: debian-revision-not-well-formed 2.12-4ubuntu1.10.04.2~ppa1~lucid1

© Ask Ubuntu or respective owner

Related posts about apt

Related posts about dpkg