[debhelper-devel] Bug#795193: debhelper: dh_installinit --onlyscripts should generate the debhelper scripts for the first package only

Jose M Calhariz jose.calhariz at hds.com
Tue Aug 11 16:04:26 UTC 2015


Package: debhelper
Version: 9.20150628
Severity: normal

With source packages that generate <name>-dbg package for debug
symbols, they generally use dh_installinit without problems.  The
debhelper scripts are generated for the first package only.

But when is added the option "--onlyscripts" it generates debhelper
scripts for both packages.  This means that when installing <package>
and <package>-dbg, it is not possible to remove <pakage>-dbg.  The
postrm script of <package>-dbg tries to remove the init script that
belongs to <package>.

Using debhelper compatibility mode 5.

This bug was reproduced using nginx package v0.7.67.  From debian/rules:

binary-arch: install
        dh_testdir
        dh_testroot
        dh_installchangelogs CHANGES
        dh_installdocs
        dh_installinit -r --no-start --onlyscripts
        dh_installman debian/nginx.1
        dh_installlogrotate
        dh_link
        dh_strip --dbg-package=nginx-dbg
        dh_compress
        dh_fixperms
        dh_installdeb
        dh_shlibdeps
        dh_gencontrol
        dh_md5sums
        dh_builddeb


Adding the option --onlyscripts breaks the package.


-- System Information:
Debian Release: 8.1
  APT prefers stable
  APT policy: (990, 'stable'), (500, 'stable-updates'), (500, 'oldstable-updates'), (500, 'oldoldstable-updates'), (500, 'oldoldstable'), (500, 'stable'), (500, 'oldstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.16.0-4-amd64 (SMP w/12 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages debhelper depends on:
ii  binutils      2.25-5
ii  dpkg          1.17.25
ii  dpkg-dev      1.17.25
ii  file          1:5.22+15-2
ii  libdpkg-perl  1.17.25
ii  man-db        2.7.0.2-5
ii  perl          5.20.2-3+deb8u1
ii  po-debconf    1.0.16+nmu3

debhelper recommends no packages.

Versions of packages debhelper suggests:
pn  dh-make  <none>

-- no debconf information

Kind regards
Jose M Calhariz




More information about the debhelper-devel mailing list