I need nginx compiled with a special flag, so I grabbed the source from the nginx stable PPA (apt-get source), changed debian/rules, built it and packaged it with debuild/dpkg-buildpackage, and installed the necessary .debs -- so far so good.
Only now APT wants to switch my local package with the one from the repository. This is a little puzzling since both packages have the exact same version:
$ dpkg -l nginx-full Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) ||/ Name Version Description +++-=======================================-=======================================-============================================================================================== ii nginx-full 1.2.1-0ubuntu0ppa1~precise nginx web/proxy server (standard version)
$ sudo apt-get upgrade -s Reading package lists... Done Building dependency tree Reading state information... Done The following packages will be upgraded: nginx-full 1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. Inst nginx-full [1.2.1-0ubuntu0ppa1~precise] (1.2.1-0ubuntu0ppa1~precise Stable:12.04/precise [amd64]) Conf nginx-full (1.2.1-0ubuntu0ppa1~precise Stable:12.04/precise [amd64])
Why exactly is this happening, and what's the best way of stopping it? Ideally, APT should offer to upgrade my package only with a strictly newer version, which would be a cue for me to rebuild my patched version with the newest source.
I've come across this bug report which looks pretty relevant, but since it contained no satisfactory work-around, I'm leaving the question open.