[Apt-Rpm] How do I hold back individual packages from being upgraded

Nigel Henry cave.dnb at tiscali.fr
Sat Dec 15 10:24:26 PST 2007


On Friday 14 December 2007 18:36, Nigel Henry wrote:
> On Friday 14 December 2007 05:24, Gary L. Greene Jr. wrote:
> > On Thursday 13 December 2007 02:58:05 pm Nigel Henry wrote:
> > > I have a problem with the fltk package. The Fedora 7 version will not
> > > work with Zynaddsubfx, so I've replaced the Fedora 7 version of fltk
> > > with that from FC5.
> > >
> > > Now when I run apt-get update, followed by apt-get dist-upgrade,
> > > apt-get wants to upgrade fltk to the Fedora 7 version again, which I
> > > don't want.
> > >
> > > I've looked through the man pages for apt-get, but all I can find is
> > > the option --ignore-hold, but can't find any info on how to place a
> > > hold on a specific package.
> > >
> > > Any magical incantions I can use to hold back the upgrading of fltk?
> > >
> > > Distro: Fedora 7
> > > Apt version: apt-0.5.15lorg3.2-12.fc7
> > >
> > > Gratefull as always for any help.
> > >
> > > Nigel.
> >
> > You'll want to look into pinning the version you want. Take a read of the
> > apt_preferences man page. There is also some info about this on
> > http://www.apt-rpm.org/
>
> Thanks for the pointers Gary.
>
> I have put the following into /etc/apt/preferences.
>
> Package: fltk
> Pin: version 1.1.8*
> Pin-Priority: 0
>
> According to the man page for apt_preferences, a 0 (zero) prevents the
> version from being installed.
>
> Now I run an apt-get update, and upon completion the last line says.
> W: No priority (or zero) specified for pin
>
> Now I'm a bit confused, unless the syntax for the examples on the manpage
> is incorrect.
>
> The current version of fltk installed is 1.1.7-1.fc5, and I want to prevent
> it being upgraded to the Fedora 7 version, which causes problems with a
> music app. An apt-get update, followed by apt-get dist-upgrade shows the
> following for fltk.
> fltk (1.1.7-1.fc5 => 1.1.8-0.3.r5750.fc7)
>
> Any additional help in resolving this problem will be very welcome.
>
> Nigel.

Problem resolved "he says" (speaking in a whisper). Having tried various 
incantations in /etc/apt/preferences, this one appears to be viable, as 
apt-get dist-upgrade -s shows nothing to be upgraded, see below.

Package: fltk
Pin: version 1.1.7*
Pin-Priority: 1001

The fltk version 1.1.7* is referring to fltk-1.1.7-1.fc5, which is the 
installed version of fltk, and installed using rpm -Uvh <path to fltk 
package>. I replaced the fltk-1.1.8-0.3.r5750.fc7 version with the fc5 
version, as the fc7 version creates problems with ZynnAddSubFX.

Thanks again for the pointers to pinning in /etc/apt/preferences, and the 
associated manpage.

Nigel.




More information about the Apt-Rpm mailing list