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

Bug#572259: Wishlist: command (or option) to install new version of package only if was already installed



2010/3/3 Goswin von Brederlow <goswin-v-b@web.de>:
> Christian Hudon <chrish@pianocktail.org> writes:
>> I've been wishing more than once for a version of the "install" command
>> that works as follows: it installs the new version of the package only
>> it said package was already installed on the computer. If the package
>> was not installed, it does nothing.
>
> This was mentioned before. The suggested syntax for this would be
>
> apt-get upgrade <package> [...]
The bugreport for this is #74067 .
To put it simple: upgrade and install/dist-upgrade are different solver
strategies - and upgrade and dist-upgrade can't handle specific packages
as it is in their nature to upgrade the complete package set.
This should (and will) be changed at some point in the future (CUDF),
but not for squeeze…

… what is possible for squeeze is a complement flag to --no-upgrade:
--only-upgrade which, oh wonder, does exactly that while using
the install command logic. This flag doesn't alter the autoinstall state.
http://bazaar.launchpad.net/~donkult/apt/sid/revision/1954

> Besides upgrading the package (if installed) it should also NOT alter
> the autoinstalled state of the package. If one uses apt-get install
> package to upgrade something it always gets set to manual.
Just as a note why i think it is okay to alter the autoinstall state if
you use plain "apt-get install" to upgrade a package:
You cared explicitly about this package by upgrading it, so it is
at least likely that you would be unhappy if it would disappear
automatically later in an autoremove…

Oh and just in case: apt has still the "upgrade" command to get
the complete system upgraded (without removes/new installs) which
is a pretty safe operation even in a scripted usage and is in general
a better option than cherrypicking - the small, ugly and untouched
cherries have most of the time the biggest bugs. ;)


Best regards / Mit freundlichen Grüßen,


David Kalnischkies



Reply to: