Re: Package Version Numbers
Jaime Tarrant <jaime.tarrant.l@tarsysco.com> wrote:
>* Jeff Grossman (jeff@stikman.com) wrote:
>> I am running Debian Stable on a server. I downloaded the source
>> package for PHP so I could remove the Suhosin patch. It was causing a
>> lot of problems with my scripts. I have a question regarding what I
>> should call the new packages that I am building. The package in
>> stable right now is called "5.2.6.dfsg.1-1+lenny3". I called my new
>> packages "5.2.6.dfsg.1-1+lenny3+custom1". I have the following
>> settings in my apt.conf file in case I ever need to install anything
>> from testing or unstable:
>>
>> Package: *
>> Pin: release a=lenny-backports
>> Pin-Priority: 800
>>
>> Package: *
>> Pin: release a=volatile
>> Pin-Priority: 600
>>
>> Package: *
>> Pin: release a=stable
>> Pin-Priority: 500
>>
>> Package: *
>> Pin: release a=testing
>> Pin-Priority: 300
>>
>> Package: *
>> Pin: release a=unstable
>> Pin-Priority: 200
>>
>> But, now aptitude wants to install the PHP package from testing when I
>> do a safe-upgrade. What should I have called my custom build PHP
>> package so it would not want to upgrade it to testing?
>>
>> Thanks for any help you can offer me.
>>
>> Jeff
>
>Hi Jeff,
>
>My understanding is that these days the best/standard place to put your
>apt pinning configuration is in the /etc/apt/preferences file. This
>might explain why apt(itude) is trying to pull packages from
>testing/unstable, as apts default behaviour is to go for the highest
>available version that it can find.
>
>You may, although it is not really essential if you also have release
>preferences configured as above, put the following in
>/etc/apt/apt.conf
>
>APT::Default-Release "stable";
>
>To hold a package at a specific version (so that it does not get
>upgraded/replaced etc, in your /etc/apt/preferences file, is:
>
>Package: package-name
>Pin: version 5.2.6.dfsg.1-1+lenny3+custom1
>Pin-Priority: 1000 or 1001
>
>You can use an asterix "*" to indicate a wildcard, such that having
>Pin: version 5.* will allow any version 5 of the package, etc, or have
>an explicit version and use priority 1000 or 1001.
>
>The difference between Pin-Priority 1000 and 1001 is that 1000 will not
>force downgrades, whereas 1001 will force package downgrades if a newer
>version happens to be installed.
>
>To see what apt thinks it is doing, you can use:
>
># apt-cache policy package-name
>
>This should show whether a package is installed, which package versions
>and their source that apt can find, and which version is the
>installation candidate based on apts configuration.
>
>Kind Regards,
>Jaime
>
My apologizes, it is the preferences file that I have the pinning in
and not apt.conf. So I do have the pinning in the correct place. Here
is the output of apt-cache policy php5:
mail:~# apt-cache policy php5
php5:
Installed: 5.2.6.dfsg.1-1+lenny3+custom1
Candidate: 5.2.9.dfsg.1-4
Version table:
5.2.10.dfsg.1-2 0
200 http://ftp.us.debian.org unstable/main Packages
5.2.9.dfsg.1-4 0
300 http://ftp.us.debian.org testing/main Packages
*** 5.2.6.dfsg.1-1+lenny3+custom1 0
100 /var/lib/dpkg/status
5.2.6.dfsg.1-1+lenny3 0
500 http://ftp.us.debian.org lenny/main Packages
500 http://security.debian.org lenny/updates/main Packages
What I don't understand is how come the candidate is 5.2.9 when that
has a pinning of 300, clearly lower than 5.2.6.
Did I use the correct naming convention when I setup my custom version
of PHP?
Thanks,
Jeff
Reply to: