[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#236132: libx11-6 postrm bug prevents removal of package



Package: libx11-6
Version: 4.3.0-2
Severity: critical

quoting the postrm script:

  # is the line present?
  if fgrep -qsx "$dir" "$ldsoconf"; then
    # are there any shared objects in the directory?
    if [ "$(echo "$dir"/lib*.so.*.*)" = "$dir/lib*.so.*.*" ]; then
      # glob expansion produced nothing, so no shared libraries are present
      observe "removing $dir directory from $ldsoconf"
      fgrep -qsvx "$dir" > "$ldsoconf.dpkg-tmp"
      mv "$ldsoconf.dpkg-tmp" "$ldsoconf"
    fi
  fi

Note:

      fgrep -qsvx "$dir" > "$ldsoconf.dpkg-tmp"

should perhaps read

      fgrep -qsvx "$dir" "$ldsoconf" > "$ldsoconf.dpkg-tmp"

Congrats, you just directed fgrep to read from stdin, effectively hangig
the process:

schmitz@q650:~$ bin/chrootapt unstable remove libx11-6 libxpm4 libice6
xfree86-common xlibs-data
Reading Package Lists... Done
Building Dependency Tree... Done
The following packages will be REMOVED:
  libice6 libx11-6 libxpm4 xfree86-common xlibs-data
0 packages upgraded, 0 newly installed, 5 to remove and 8  not upgraded.
Need to get 0B of archives. After unpacking 10.5MB will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 13171 files and directories currently installed.)
Removing libice6 ...
Removing libx11-6 ...

17340 pts/0    S      0:28 apt-get -o Dir::State=/usr/local/chroot/unstable/var/state/apt
17345 pts/0    S      0:10 /usr/bin/dpkg --root=/usr/local/chroot/unstable --force-depends
17355 pts/0    S      0:01 sh /var/lib/dpkg/info/libx11-6.postrm remove
17363 pts/0    S      0:00 grep -F -qsvx /usr/X11R6/lib

This happening on a buildd machine, the log watcher kills the parent
process, leaving the package installed which in turn borks further builds
by way of dependency conflicts (hence the severity). Please fix.

Side note: same bug also affects libxpm4 and perhaps others.

	Michael




Reply to: