[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: keep specific versions of packages

On Sun, 24 Dec 2006, Francesco Pietra wrote:

I want to avoid any modification from apt-get commands

mpqc 2.3.1-0.2

Ciao Francesco. There are many ways to achieve what you want. The simplest
one is just to put the mpqc packages in "hold" state. You can do that using
any of the frontends (e.g. from dselect to synaptic just to name two). This
will prevent _any_ automatic upgrade of mpqc. You will still be able to
upgrade it, if needed, using a explicit command, but not with a general
upgrade of the system.

Another option: if you obtained those packages from a repository which
includes "release" information, you can use the "pin" functionality of apt
to force apt-get to always obtain a well-defined revision. This is achieved
by adding "stanzas" to the file /etc/apt/preferences, such as

Package:  mpqc*
Pin:  release a=whateveritisinthatrepository
Pin-Priority:  higherthandefault

where you should substitute "whateveritisinthatrepository" with the release
name for packages in the repository you use, and "higherthandefault" with a
number higher than the default and than any other general matching stanza
(if you have others), to avoid your mpqc packages to be taken from another
source. You should find more information about how to handle this
functionality in the /usr/share/doc/Debian/apt-howto directory. Read it,
it's worth the time you will spend with it, since you will probably save you
quite a bit more time in solving trivial problems in the future. If
necessary, install some apt-howto package (I think there is also one in

If you compile your mpqc packages yourself and did not set up a full-fledged
repository with release fields for it, you will probably be better off with
the first option, i.e. put the packages on hold, but I also offer you a
small suggestion from my own experience in maintaining locally a number of
backported packages: when compiling your own packages, edit the
debian/changelog to bump up your compiled version from the currently
available one you are tracking (from unstable, perhaps?). I usually just add
a ".1" to the version number. Then install your local packages and put them
on hold. This has 2 effects: the first one, as explained above, they will
not be automatically upgraded; the second one, they will not even show up in
the list of packages for which a newer version is available, until this is
really the case, i.e. when a new version is release in debian. Therefore, it
will not be automatically upgraded but you will know there was a new version
released, possibly with bug fixes, and you will decide whether it's worth
recompiling a new local version with those bug fixes.

Have fun

P.S.: Buon Natale (in ritardo) e felice anno nuovo


Giacomo Mulas <gmulas@ca.astro.it>

Str. 54, Loc. Poggio dei Pini * 09012 Capoterra (CA)

Tel. (OAC): +39 070 71180 248     Fax : +39 070 71180 222
Tel. (UNICA): +39 070 675 4916

"When the storms are raging around you, stay right where you are"
                         (Freddy Mercury)

This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

Reply to: