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

Bug#204780: /usr/bin/apt-get: --no-upgrade should apply to more than just install



Package: apt
Version: 0.5.8
Severity: normal
File: /usr/bin/apt-get

man says:  --no-upgrade
              Do not upgrade packages; When used in conjunction with install no-upgrade will
              prevent packages listed from being upgraded if  they  are  already  installed.

# apt-get --purge  remove libg2c0
The following extra packages will be installed:
  libc6 libc6-dev locales
Recommended packages:
  c-compiler
The following packages will be REMOVED:
  atlas2-3dnow* libg2c0* pdl* r-base* r-base-core* r-base-html* r-base-latex*
3 packages upgraded, 0 newly installed, 7 to remove and 257 not upgraded.
Need to get 9960kB of archives.
After unpacking 55.1MB disk space will be freed.
Do you want to continue? [Y/n] n

It intends to helpfully update 3 packages I already have installed.  I
don't want to do this at this time due to only having a modem.

# apt-get --purge  remove libg2c0 --no-upgrade
Skipping libg2c0, it is already installed and upgrade is not set.
0 packages upgraded, 0 newly installed, 0 to remove and 265 not upgraded.

Because --no-upgrade expects the only case it will be used is
installs, it fails to do what is needed. No other option will allow
the user to just remove the 7 packages without upgrading the 3.

A slight apt-get update made something that was ok to do yesterday now
impossible.

Wait,
# apt-get  remove --purge  libg2c0  r-base-core
The following packages will be REMOVED:
  atlas2-3dnow* libg2c0* pdl* r-base* r-base-core* r-base-html* r-base-latex*
0 packages upgraded, 0 newly installed, 7 to remove and 260 not upgraded.
Need to get 0B of archives.
After unpacking 56.1MB disk space will be freed.

Contrast this with my first example.  This shows that you are
unnecessarily computing what to upgrade before making the final total
of what to delete... so if you fixed that, then you wouldn't need to
tamper with --no-upgrade afterall...




Reply to: