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

Bug#682574: live-tools, procps: live-tools and procps must consistently handle /usr/bin/uptime



Package: live-tools,procps
Severity: serious

Hi,

live-utils (3.0.3-1)
* diverts /usr/bin/uptime to /usr/bin/uptime.procps
* does not divert uptime.1.gz
* ships /usr/bin/uptime -> live-uptime

procps (1:3.3.3-2)
* ships /usr/bin/uptime
* ships uptime.1.gz
* installs an alternative for uptime if /usr/bin/uptime.procps exists
  with a corresponding slave alternative for uptime.1.gz

Depending on the installation order you get:
* procps, live-utils
  /usr/bin/utime -> live-uptime
* live-utils, procps
  /usr/bin/utime -> /etc/alternatives/uptime -> /usr/bin/uptime.procps
  (yes, the alternative will overwrite the link shipped by live-tools)

Depending on the install and remove order, you may end up with a
dangling symlink /usr/bin/utime and a forgotten alternative.

Mixing diversions and alternatives is not trivial ... I know from
cleaning up the nvidia-graphics-driver and fglrx-driver diversion mess
for /usr/lib/libGL.so* :-)


A possible solution that should work:
* procps ships uptime.procps and uptime.procps.1.gz
* live-utils ships live-uptime and live-uptime.1.gz
* both register an alternative for uptime with uptime.1.gz slave

For a clean upgrade path from the current mess to a working uptime ...
propably just for both procps.preinst and live-tools.postinst:
  if [ "$(dpkg-divert --listpackage /usr/bin/uptime)" = "live-tools" ]
  then
    # no --rename !
    dpkg-divert --remove --package live-tools --divert \
        /usr/bin/uptime.procps /usr/bin/uptime
  fi

Ask me if you need help getting this cleaned up.


Andreas


Reply to: