when g++ NOT installed, apt-get remove g++ wants to install packages

Bug #982716 reported by irrational John on 2012-04-16
This bug affects 1 person
Affects Status Importance Assigned to Milestone
apt (Debian)
Fix Released
apt (Ubuntu)

Bug Description

The g++ package is NOT installed on my system.

In 11.10 when I issued the command
sudo apt-get remove g++
I received the expected response "Package g++ is not installed, so not removed"

After using the upgrade process (update-manage -d) to change my 11.10 system to 12.04, when I attempt to remove the uninstalled package g++, apt-get instead wants to install packages. (See excerpt below).

Here is my current system information.
gjohn@Vbubux86-11:~$ uname -srvmo && cat /etc/lsb-release
Linux 3.2.0-23-generic #36-Ubuntu SMP Tue Apr 10 20:41:14 UTC 2012 i686 GNU/Linux
DISTRIB_DESCRIPTION="Ubuntu precise (development branch)"

Here is an example of the problem.
gjohn@Vbubux86-11:~$ sudo apt-get -V --dry-run remove g++
[sudo] password for gjohn:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
   g++-4.6 (4.6.3-1ubuntu4)
   libstdc++6-4.6-dev (4.6.3-1ubuntu4)
Suggested packages:
   g++-multilib (4.6.3-1ubuntu5)
   g++-4.6-multilib (4.6.3-1ubuntu4)
   gcc-4.6-doc (4.6.3-1ubuntu4)
   libstdc++6-4.6-dbg (4.6.3-1ubuntu4)
   libstdc++6-4.6-doc (4.6.3-1ubuntu4)
The following NEW packages will be installed:
   g++ (4.6.3-1ubuntu5)
   g++-4.6 (4.6.3-1ubuntu4)
   libstdc++6-4.6-dev (4.6.3-1ubuntu4)
0 upgraded, 3 newly installed, 0 to remove and 1 not upgraded.
Inst libstdc++6-4.6-dev (4.6.3-1ubuntu4 Ubuntu:12.04/precise [i386]) []
Inst g++-4.6 (4.6.3-1ubuntu4 Ubuntu:12.04/precise [i386])
Inst g++ (4:4.6.3-1ubuntu5 Ubuntu:12.04/precise [i386])
Conf libstdc++6-4.6-dev (4.6.3-1ubuntu4 Ubuntu:12.04/precise [i386])
Conf g++-4.6 (4.6.3-1ubuntu4 Ubuntu:12.04/precise [i386])
Conf g++ (4:4.6.3-1ubuntu5 Ubuntu:12.04/precise [i386])

gjohn@Vbubux86-11:~$ apt-cache policy apt
  Installed: 0.8.16~exp12ubuntu8
  Candidate: 0.8.16~exp12ubuntu8
  Version table:
 *** 0.8.16~exp12ubuntu8 0
        500 http://us.archive.ubuntu.com/ubuntu/ precise/main i386 Packages
        100 /var/lib/dpkg/status

gjohn@Vbubux86-11:~$ apt-cache policy g++
  Installed: (none)
  Candidate: 4:4.6.3-1ubuntu5
  Version table:
     4:4.6.3-1ubuntu5 0
        500 http://us.archive.ubuntu.com/ubuntu/ precise/main i386 Packages

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: apt 0.8.16~exp12ubuntu8
ProcVersionSignature: Ubuntu 3.2.0-23.36-generic 3.2.14
Uname: Linux 3.2.0-23-generic i686
ApportVersion: 2.0.1-0ubuntu3
Architecture: i386
Date: Sun Apr 15 21:41:41 2012
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Release i386 (20111012)
 PATH=(custom, no user)
SourcePackage: apt
UpgradeStatus: Upgraded to precise on 2012-04-16 (0 days ago)

irrational John (ijohn) wrote :
irrational John (ijohn) wrote :

I should probably also add that the system I tested this on began as a clean install from the ubuntu-11.10-desktop-i386.iso image.

After verifying that things worked as expected in 11.10 I initiated the upgrade process for 12.04. Since I never really used this install I think the problem is most likely somewhere in the updates applied for 12.04.

Michael Vogt (mvo) on 2012-04-20
Changed in apt (Ubuntu):
status: New → In Progress
importance: Undecided → Medium
milestone: none → precise-updates
Changed in apt (Debian):
status: Unknown → New
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package apt - 0.8.16~exp12ubuntu10

apt (0.8.16~exp12ubuntu10) precise-proposed; urgency=low

  [ Malcolm Scott ]
  * apt-pkg/packagemanager.cc:
    - Fix a regression in the pre-depend handling: where a pre-depend option
      other than the first specified is already installed, apt-get enters an
      infinite loop (LP: #985852)

  [ Michael Vogt ]
  * apt-pkg/packagemanager.cc:
    - add APT::pkgPackageManager::MaxLoopCount to ensure that the
      ordering code does not get into a endless loop when it flip-flops
      between two states

  [ David Kalnischkies ]
  * apt-pkg/cacheset.cc:
    - actually return to the fallback modifier if we have detected we
      should for packagenames which look like modifiers (Closes: #669591)
      LP: #982716
 -- Michael Vogt <email address hidden> Fri, 20 Apr 2012 11:10:12 +0200

Changed in apt (Ubuntu):
status: In Progress → Fix Released
Changed in apt (Debian):
status: New → Fix Released
irrational John (ijohn) wrote :

Yes, it appears to be fixed. Thank you.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.