Bug#386649: [Pkg-sysvinit-devel] Bug#386649: sysvinit: Dangerous instructions in NEWS.Debian, removes packages

Petter Reinholdtsen pere at hungry.com
Sat Sep 9 08:25:03 UTC 2006


[Adrian Irving-Beer]
> The NEWS.Debian has these instructions on how to fix the broken init.d
> links caused by bug #386500:
> 
>     for p in `dpkg -S /etc/init.d/*|cut -d: -f1|sort -u`; do
>       apt-get --reinstall install -y $p
>     done
> 
> This fails to check if a package has been removed but not purged -- hence
> its init.d script exists, but the package is no longer on the system.

Yes.  I discovered that last night when people complained about scary
unrelated removals.  I am truely sorry that I rushed the sysvinit
update out without discovering this problem.  Here is a safer script:

    for p in `dpkg -S /etc/init.d/*|cut -d: -f1|sort -u`; do
      if dpkg --get-selections $p | grep -qw install ; then
        echo reinstalling $p
        apt-get --reinstall install $p
      fi
    done

I've also been told about the file /var/log/dpkg.log a log of
installs, upgrades and removals.  I guess that can be used to recover?

> (Please let me know if this is the correct severity,

I agree on the severity.  This breakage has been horrible for a lot of
people, and really earned unstable its name.

Friendly,
-- 
Petter Reinholdtsen




More information about the Pkg-sysvinit-devel mailing list