Installing multiarch debs can uninstall native arch packages

Bug #1171931 reported by Iain Lane
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
software-center (Ubuntu)
Confirmed
High
Unassigned

Bug Description

1. Download the .deb which I've attached (it was built from equivs and is harmless but I'll also attach the equivs script if you want to reproduce it) on an amd64 system with i386 multiarch enabled. It's an i386 deb which depends on unity. Importantly Unity is uninstallable with multiarch.
2. Open it in software-center by software-center fakepkg_1.0_i386.deb
3. Click "Install".
4. Observe that s-c tries to install the .deb and removes a load of packages in the process, e.g. by comparing ubuntu-desktop versions before and after.

It is possible to know that this package isn't installable; apt-get --dry run can do this, for example:

laney@raring-vm:~/temp$ apt-get --dry-run install fakepkg
NOTE: This is only a simulation!
      apt-get needs root privileges for real execution.
      Keep also in mind that locking is deactivated,
      so don't depend on the relevance to the real current situation!
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies.
 fakepkg:i386 : Depends: unity:i386 but it is not going to be installed
 libgudev-1.0-0:i386 : Depends: libudev1:i386 (>= 183) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

I don't think it's enough just to know if it can be installed, though - you have to make sure that no native arch packages are removed too, I think.

Revision history for this message
Iain Lane (laney) wrote :
Revision history for this message
Iain Lane (laney) wrote :
Revision history for this message
Iain Lane (laney) wrote :
Revision history for this message
Iain Lane (laney) wrote :
Revision history for this message
Iain Lane (laney) wrote :
Revision history for this message
Iain Lane (laney) wrote :
Changed in software-center (Ubuntu):
importance: Undecided → High
status: New → Confirmed
Revision history for this message
Dave Morley (davmor2) wrote :

Part of the issue here is that apt-get -y will have the same effect if the package were in the archive. So I'm not so sure this is something that USC should be fixing but rather one that apt itself should be fixing. If it is fixed in apt, then USC then follows the erroring system, USC can then popup a dialog that reads along the lines of "This package will not be installed as it removes key system files"

Revision history for this message
Matthew Paul Thomas (mpt) wrote :

If it isn't apt's job, then I suggest that it's aptdaemon's, not USC's. You should get the same error whether you try to install the package from USC, from the Dash, or (if it ends up in a PPA or third-party archive somehow) from Software Updater.

If so, reassign to me and I'll spec the error presentation in <https://wiki.ubuntu.com/SoftwarePackageOperations#installing-or-updating>.

Revision history for this message
Iain Lane (laney) wrote :

I think to some extent you get what you deserve if you pass -y to apt-get. I've just looked at aptdaemon's API and it does look like perhaps it doesn't provide the functionality that we need to avoid this undesirable behaviour. I'll try to write a small aptdaemon client to reproduce this.

We will probably need a design in s-c to present the error though.

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

Other bug subscribers

Remote bug watches

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