Removing any u-desktop depdencency marks all other packages for auto-removal (on alternate install)

Bug #61684 reported by Martin Pitt
8
Affects Status Importance Assigned to Milestone
Ubuntu CD Images
Invalid
Undecided
Unassigned
livecd-rootfs (Ubuntu)
Fix Released
Undecided
Adam Conrad
portmap (Ubuntu)
Invalid
Undecided
Unassigned
tasksel (Ubuntu)
Fix Released
High
Colin Watson

Bug Description

Trying to uninstall any ubuntu-desktop dependency causes all other u-d dependencies to be marked for auto-removal (likewise with ubuntu-minimal and -standard):

$ LANG=C sudo apt-get remove --purge bug-buddy
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  ubuntu-desktop libwpd8c2a libxmlsec1 libgmime-2.0-2 tomboy ekiga gimp-print xfonts-75dpi gedit-common libgutenprint2 gcalctool pnm2ppa gthumb libpoppler1-glib xfonts-scalable
  cdparanoia update-notifier libwvstreams4.2-extras ubuntu-docs libxplc0.3.13 libsensors3 wvdial xsane libnet-dbus-perl libkpathsea4 libwmf0.2-7 gnome-volume-manager
  libpt-plugins-alsa openoffice.org-impress python-apport-utils libopal-2.2.0 doc-base gucharmap libbtctl2 zenity gnome-games gdebi vnc-common libuniconf4.2 libxml-perl libsane
  esound unzip rhythmbox gedit gstreamer0.10-plugins-base-apps readahead hpijs ubuntu-sounds evolution-exchange screen libpisock8 bc hplip dc language-selector-common
  libhsqldb-java guile-1.6-libs whois cupsys-driver-gutenprint libgmime2.2-cil libpt-plugins-v4l xsane-common fortune-mod apport libgpod0 evolution-webcal libgadu3
  openoffice.org-math openoffice.org-writer libmdbtools libguile-ltdl-1 festlex-cmu gnome-nettool libsnmp-base language-selector gaim-data libportaudio0 openoffice.org-gtk
  gconf-editor librecode0 hal-device-manager gnome-orca hotkey-setup xvncviewer gnome-system-tools libt1-5 gdb libcurl3 eog gdm festvox-kallpc16k xfonts-base
  screensaver-default-images libpt-1.10.0 gok libxmlsec1-openssl gnome-spell bug-buddy python-problem-report python-vte bittorrent ia32-libs-gtk python-xml contact-lookup-applet
  tsclient rdesktop libieee1284-3 gaim sound-juicer vino libxml-grove-perl xserver-xorg libao2 libdjvulibre15 evince xfonts-100dpi gnome-btdownload gnome-cups-manager
  foomatic-db-hpijs fping libservlet2.3-java gstreamer0.10-gnomevfs libpt-plugins-v4l2 openoffice.org nautilus-sendto gimp foo2zjs libgnomevfs2-bin openoffice.org-base libgimp2.0
  diveintopython libgnome-speech3 hwdb-client libstlport4.6c2 tango-icon-theme tango-icon-theme-common landscape-client zip openoffice.org-calc python-gst0.10 liboobs-1-1 slocate
  libxmlsec1-nss linux-headers-2.6.17-7-generic xorg fortunes-min festival gnome-games-data gstreamer0.10-tools libsnmp9 libgnomebt0 festlex-poslex libopenobex-1.0-0
  libgutenprintui2-1 dbus-1-utils ssh-askpass-gnome tangerine-icon-theme gnome-keyring-manager system-tools-backends totem libwvstreams4.2-base gimp-data min12xxw gnome-themes
  openoffice.org-gnome apport-gtk libgnomecupsui1.0-1c2a hwdb-client-gnome hwdb-client-common libsndfile1 firefox-gnome-support gimp-python file-roller serpentine hplip-data lftp
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
  bug-buddy* ubuntu-desktop*

This has not been the case in earlier releases and is highly uncomfortable.

<mdz> hmm, is that because the metapackage is used to install the livefs?
<mdz> rather than the task?
<mvo> mdz: its a matter of modifing the livefs build script

Related branches

Revision history for this message
Michael Vogt (mvo) wrote :

This needs fixing in the livefs cd build script. It should use the new support for tasks in apt-get via "apt-get install taskname^" <- (notice the "^")

Revision history for this message
Tollef Fog Heen (tfheen) wrote :

Assigning to Adam, since he knows (and has access to) hack our livecd.sh.

Revision history for this message
Matt Zimmerman (mdz) wrote :

Tollef has access to fix this now

Revision history for this message
Adam Conrad (adconrad) wrote :

Tollef doesn't actually have access to fix this yet, but I'll mangle it right now.

Revision history for this message
Martin Pitt (pitti) wrote :

For the record: this happens on *both* the current amd64 live and the ppc/alternate install, so fixing the livefs building is not enough.

Revision history for this message
Michael Vogt (mvo) wrote :

I debugged the problem and it turns out that there is a bug in the new install-task code.

The reason is that TryToInstall() was used with BrokenFix=False. But unfortunately this mean in apt-speak that apt will fix any broken package automatically and this means that ones it encounters ubuntu-desktop it will auto-install all dependencies and mark those as auto-installed. Calling TryToInstall() with BrokenFix=True (newspeak!) means it won't autofix it and things work fine.

The fix is trivial (but too late for beta :(

--- cmdline/apt-get.cc 2006-09-19 15:22:41 +0000
+++ cmdline/apt-get.cc 2006-09-27 20:24:31 +0000
@@ -1440,7 +1440,7 @@
       buf[end-start] = 0x0;
       if (regexec(&Pattern,buf,0,0,0) != 0)
         continue;
- res &= TryToInstall(Pkg,Cache,Fix,false,BrokenFix,ExpectedInst);
+ res &= TryToInstall(Pkg,Cache,Fix,false,true,ExpectedInst);
       found = true;
    }

A workaround is to just empty /var/lib/apt/extended_states after the livefs build.

Revision history for this message
Matt Zimmerman (mdz) wrote :

apt (0.6.45ubuntu14) edgy; urgency=low

  * cmdline/apt-get.cc:
    - fix in the TryInstallTask() code to make sure that all package
      there are marked manual install (lp: #61684)

 -- Michael Vogt <email address hidden> Thu, 28 Sep 2006 00:34:20 +0200

Revision history for this message
Martin Pitt (pitti) wrote :

Closing portmap task (WTH??)

Changed in portmap:
status: Unconfirmed → Rejected
Revision history for this message
Martin Pitt (pitti) wrote :

Reopening, since this still happens on an alternate install (ppc/20060928)

Revision history for this message
Michael Vogt (mvo) wrote :

This is fixed on live but the installer needs to be adepted to use the new method on alternate.

Revision history for this message
Matt Zimmerman (mdz) wrote :

Colin and I discussed this on IRC, and agreed that the most appropriate thing to do is to special-case langpacks in the livefs build process so that they are marked explicitly installed.

Adam said that he already has code for using the seeds to do things like this. Please make it so.

Changed in debian-installer:
assignee: nobody → adconrad
Revision history for this message
Colin Watson (cjwatson) wrote :

Michael and I talked about this on IRC, and it seemed that changing tasksel to use apt-get would be the path of least resistance for now.

However, I just had a look at tasksel and I can only do this by dropping a feature (installation by priority). That may not matter too much in the Ubuntu case, but if I can avoid dropping features then that would be preferable - so if fixing aptitude so that its task installation plays well with apt's auto-marking is easy, then that would be best.

Revision history for this message
Colin Watson (cjwatson) wrote :

(My last comment only pertains to the alternate install CD. I'd open a bug task for it but Malone is too pedantic to let me do so.)

Revision history for this message
Matt Zimmerman (mdz) wrote : Re: [Bug 61684] Re: Removing any u-desktop depdencency marks all other packages for auto-removal (on alternate install)

On Mon, Oct 09, 2006 at 09:23:51PM -0000, Colin Watson wrote:
> Michael and I talked about this on IRC, and it seemed that changing
> tasksel to use apt-get would be the path of least resistance for now.
>
> However, I just had a look at tasksel and I can only do this by dropping
> a feature (installation by priority). That may not matter too much in
> the Ubuntu case, but if I can avoid dropping features then that would be
> preferable - so if fixing aptitude so that its task installation plays
> well with apt's auto-marking is easy, then that would be best.

Has this issue been properly fixed for the desktop CD yet? That needs to be
done, replacing the livefs.sh workaround.

I don't mind if we drop the priority feature; the metapackages provide a
similar level of granularity, so if that's the simplest, safest solution, I
prefer it.

--
 - mdz

Revision history for this message
Colin Watson (cjwatson) wrote :

Adam can have the ubuntu-cdimage task for the livefs handling; I'll take the Ubuntu task for tasksel work.

Changed in ubuntu-cdimage:
assignee: nobody → adconrad
status: Unconfirmed → Confirmed
Revision history for this message
Colin Watson (cjwatson) wrote :

tasksel (2.50ubuntu6) edgy; urgency=low

  * Use apt-get rather than aptitude to install tasks (closes: Malone
    #61684). (This means that "Packages: standard" will no longer work, but
    we don't use that in Ubuntu anyway.)

 -- Colin Watson <email address hidden> Fri, 13 Oct 2006 10:40:48 +0100

Changed in tasksel:
status: Confirmed → Fix Released
Revision history for this message
Colin Watson (cjwatson) wrote :

Moving the ubuntu-cdimage task to the new livecd-rootfs package.

Changed in livecd-rootfs:
assignee: nobody → adconrad
status: New → Confirmed
Changed in ubuntu-cdimage:
assignee: adconrad → nobody
status: Confirmed → Invalid
Revision history for this message
Adam Conrad (adconrad) wrote :

livecd-rootfs has been using apt-get to install tasks for ages, not sure why this bug stayed open...

Changed in livecd-rootfs:
status: Confirmed → Fix Released
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.