Comment 3 for bug 935678

Revision history for this message
Anthony Fok (foka) wrote :

I tried the upgrade to 12.04 LTS (beta) on 2012-03-16, and experienced the same problem, and Update Manager got stuck with "wpasupplicant" and its dependencies "network-manager", "network-manager-gnome" and "ubuntu-desktop" left uninstalled.

I then tried to fix the problem manually by using "sudo apt-get -f install", and saw the following:

================================================================
Setting up wpasupplicant (0.7.3-6ubuntu1) ...
mv: `/lib/init/rw/sendsigs.omit.d/wpasupplicant.wpa_supplicant.wlan0.pid' and `/run/sendsigs.omit.d/wpasupplicant.wpa_supplicant.wlan0.pid' are the same file
dpkg: error processing wpasupplicant (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of network-manager:
 network-manager depends on wpasupplicant (>= 0.7.3-1); however:
  Package wpasupplicant is not configured yet.
dpkg: error processing network-manager (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of network-manager-gnome:
 network-manager-gnome depends on network-manager (>= 0.8.998); however:
  Package network-manager is not configured yet.
dpkg: error processing network-manager-gnome (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of ubuntu-desktop:
 ubuntu-desktop depends on wpasupplicant; however:
  Package wpasupplicant is not configured yet.
dpkg: error processing ubuntu-desktop (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
                          No apport report written because the error message indicates its a followup error from a previous failure.
                                                    No apport report written because MaxReports is reached already
                                  Errors were encountered while processing:
 wpasupplicant
 network-manager
 network-manager-gnome
 ubuntu-desktop
E: Sub-process /usr/bin/dpkg returned an error code (1)
================================================================

Hmm... looks like a problem with "/lib/init/rw" to "/run" migration, which I cannot quite remember when it happened on Ubuntu.
On my computer, I see:

    $ ls -l /lib/init/rw
    lrwxrwxrwx 1 root root 4 Oct 17 08:11 /lib/init/rw -> /run

Checking wpasupplicant postinst script /var/lib/info/dpkg/wpasupplicant.postinst, Lines 27-36:

  # Migrate existing sendsigs omission pid files to /run
  if [ -d /run/sendsigs.omit.d/ ] && \
     [ -d /lib/init/rw/sendsigs.omit.d/ ]; then
   for f in /lib/init/rw/sendsigs.omit.d/wpasupplicant.*.pid
   do
    if [ -f "$f" ]; then
     mv "$f" /run/sendsigs.omit.d/
    fi
   done
  fi

The "mv" command above fails because /lib/init/rw is a symlink to /run, hence the error:

    mv: `/lib/init/rw/sendsigs.omit.d/wpasupplicant.wpa_supplicant.wlan0.pid' and
           `/run/sendsigs.omit.d/wpasupplicant.wpa_supplicant.wlan0.pid' are the same file

As a quick workaround, I changed

    mv "$f" /run/sendsigs.omit.d/

to

    mv "$f" /run/sendsigs.omit.d/ || true

so that the error is ignored, and a new run of "sudo apt-get -f install" now completes.

Hope this helps,

Anthony