Package: fai-client
Version: 5.0.2
Severity: important

Hi,

trying to install file-rc from Debian testing/unstable (which
includes the according dpkg-diverts to support recent
init-system-helpers, see #285835, #812337) using FAI fails with:

| Adding 'diversion of /usr/sbin/update-rc.d to 
/usr/sbin/update-rc.d.init-system-helpers by file-rc'
| dpkg-divert: error: 'diversion of /usr/sbin/invoke-rc.d to 
/usr/sbin/invoke-rc.d.init-system-helpers by file-rc' clashes with 'diversion 
of /usr/sbin/invoke-rc.d to /usr/sbin/invoke-rc.d.distrib by fai'
| dpkg: error processing archive /var/cache/apt/archives/file-rc_0.8.18_all.deb 
(--unpack):
|  subprocess new pre-installation script returned error exit status 2
| Removing 'diversion of /usr/sbin/update-rc.d to 
/usr/sbin/update-rc.d.init-system-helpers by file-rc'
| dpkg-divert: error: mismatch on divert-to
|   when removing 'diversion of /usr/sbin/invoke-rc.d to 
/usr/sbin/invoke-rc.d.init-system-helpers by file-rc'
|   found 'diversion of /usr/sbin/invoke-rc.d to /usr/sbin/invoke-rc.d.distrib 
by fai'
| dpkg: error while cleaning up:
|  subprocess new post-removal script returned error exit status 2
| Errors were encountered while processing:
|  /var/cache/apt/archives/file-rc_0.8.18_all.deb
| E: Sub-process /usr/bin/dpkg returned an error code (1)

The dpkg-divert of /usr/sbin/invoke-rc.d within
/usr/lib/fai/updatebase shouldn't exist for the purpose of what FAI
is using it for (and would actually qualify as RC bug AFAICT).

The according change was introduced back in 2004:

| commit 4e5ff05ecfe73955b93739e3a9996036369bbaf0
| Author: Thomas Lange <la...@informatik.uni-koeln.de>
| Date:   Wed Aug 4 15:25:50 2004 +0000
| 
|     make diversion of invoke-rc.d
| 
| diff --git a/lib/prepare_apt b/lib/prepare_apt
| index 07539ee..9b546c9 100644
| --- a/lib/prepare_apt
| +++ b/lib/prepare_apt
| @@ -15,7 +15,7 @@ mount -t proc proc $FAI_ROOT/proc
|  
|  # if libc is upgraded init u is called in chroot environment and
|  # then init will eat up much cpu time
| -fai-divert -a /sbin/init /usr/sbin/liloconfig
| +fai-divert -a /sbin/init /usr/sbin/liloconfig /usr/sbin/invoke-rc.d
|  
|  $ROOTCMD apt-get update
|  $ROOTCMD apt-get check

Sadly there's no further history attached *why* this change was
introduced at all, though I guess it was meant as a workaround until
the cleaner policy-rc.d solution came up in FAI. Nowadays inside
lib/updatebase there's a policy-rc.d wrapper which takes care of
this. Removing `/usr/sbin/invoke-rc.d` from the fai-divert cmdline
indeed fixes the file-rc situation.

regards,
-mika-

Reply via email to