After doing some tests inside and outside a chroot I've found the
following.

1. If a package is not currently installed then "--install-suggests"
will work:

$ sudo apt-get --install-suggests install git

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  cvs cvsps emacs emacs23 emacs23-bin-common emacs23-common emacs23-el 
emacsen-common fgetty git-arch git-cvs git-daemon-run
  git-doc git-el git-email git-gui git-man git-svn gitk gitweb 
libauthen-sasl-perl libcxxtools-dev libcxxtools7
  libdbd-sqlite3-perl libdbi-perl libgssapi-perl libm17n-0 libnet-daemon-perl 
libnet-smtp-ssl-perl libotf0 libplrpc-perl
  libsvn-perl libterm-readkey-perl libtntnet-dev libtntnet9 m17n-contrib 
m17n-db m17n-docs mksh rcs runit ssh tcl tk tk8.5 tla
  tla-doc tntnet tntnet-demos tntnet-doc tntnet-runtime
Suggested packages:
  httpd-cgi libcgi-fast-perl socklog-run
The following NEW packages will be installed
  cvs cvsps emacs emacs23 emacs23-bin-common emacs23-common emacs23-el 
emacsen-common fgetty git git-arch git-cvs git-daemon-run
  git-doc git-el git-email git-gui git-man git-svn gitk gitweb 
libauthen-sasl-perl libcxxtools-dev libcxxtools7
  libdbd-sqlite3-perl libdbi-perl libgssapi-perl libm17n-0 libnet-daemon-perl 
libnet-smtp-ssl-perl libotf0 libplrpc-perl
  libsvn-perl libterm-readkey-perl libtntnet-dev libtntnet9 m17n-contrib 
m17n-db m17n-docs mksh rcs runit ssh tcl tk tk8.5 tla
  tla-doc tntnet tntnet-demos tntnet-doc tntnet-runtime
0 upgraded, 52 newly installed, 0 to remove and 5 not upgraded.
Need to get 56.4 MB/63.1 MB of archives.
After this operation, 165 MB of additional disk space will be used.
Do you want to continue [Y/n]? 


2. If a package is already installed then installing (upgrading to) a newer 
version over the top will not honour the "--install-suggests" option:

$ sudo add-apt-repository ppa:git-core/ppa
$ sudo apt-get update
$ apt-cache policy git

git:
  Installed: 1:1.7.9.5-1
  Candidate: 1:1.7.11.1-0ppa1~precise3
  Version table:
     1:1.7.11.1-0ppa1~precise3 0
        500 http://ppa.launchpad.net/git-core/ppa/ubuntu/ precise/main amd64 
Packages
 *** 1:1.7.9.5-1 0
        500 http://gb.archive.ubuntu.com/ubuntu/ precise/main amd64 Packages
        100 /var/lib/dpkg/status

$ sudo apt-get --install-suggests install git

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  git-man
Suggested packages:
  git-daemon-run git-daemon-sysvinit git-doc git-el git-arch git-cvs git-svn 
git-email git-gui gitk gitweb
The following packages will be upgraded:
  git git-man
2 upgraded, 0 newly installed, 0 to remove and 5 not upgraded.
Need to get 0 B/8,030 kB of archives.
After this operation, 197 kB of additional disk space will be used.
Do you want to continue [Y/n]? 

3. Doing a reinstall will not honour the "--install-suggests" option:

$ sudo apt-get --install-suggests --reinstall install git
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 5 not upgraded.
Need to get 0 B/6,087 kB of archives.
After this operation, 0 B of additional disk space will be used.
(Reading database ... 444159 files and directories currently installed.)
Preparing to replace git 1:1.7.9.5-1 (using .../git_1%3a1.7.9.5-1_amd64.deb) ...
Unpacking replacement git ...
Setting up git (1:1.7.9.5-1) ...

The behaviour when the package is already installed is unexpected - one
would expect the flag to be honoured when using the "install" command.

** Changed in: apt (Ubuntu)
       Status: Invalid => Confirmed

** Changed in: apt (Ubuntu)
   Importance: Undecided => Low

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/862776

Title:
  apt-get  --install-suggests install  is a NOOP

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apt/+bug/862776/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to