Bug#840469: dh_sysuser: should add a dependency to "perl-modules" to remove sysuser.

Niko Tyni ntyni at debian.org
Wed Oct 19 09:23:54 UTC 2016


On Wed, Oct 19, 2016 at 10:18:25AM +0200, Dylan wrote:
> 2016-10-19 9:19 GMT+02:00 Dmitry Bogatov <KAction at gnu.org>:
> > Unexpected, since I tested on bcron daemon. Can you please attach log itself?
> >
> > I followed [2] link, but while it state that piuparts fails, I did not found
> > failure log.
> 
> Please find attached the log where galileo-daemon failed to be purged.
> It seems that perl was removed before to purge galileo-daemon, so we have still:
> 
>   /usr/sbin/deluser: In order to use the --remove-home,
> --remove-all-files, and --backup features,
>   you need to install the `perl-modules' package. To accomplish that, run
>   apt-get install perl-modules.

Packages can't rely on their dependencies being present or functional
during 'postrm purge' (or in the worst case even 'postrm remove').

>From policy 6.5 (Summary of ways maintainer scripts are called):

  The package whose postrm is being called may have previously been
  deconfigured and only be "Unpacked", at which point subsequent package
  changes do not consider its dependencies. Therefore, all postrm actions
  may only rely on essential packages and must gracefully skip any
  actions that require the package's dependencies if those dependencies
  are unavailable.[

and 7.2 (Binary Dependencies):

  There is no guarantee that package dependencies will be available
  when postrm is run, but the depended-on package is more likely to be
  available if the package declares a dependency (particularly in the
  case of postrm remove). The postrm script must gracefully skip actions
  that require a dependency if that dependency isn't available.

So apparently you'll need to handle this deluser failure mode in the
postrm script.
-- 
Niko Tyni   ntyni at debian.org



More information about the Perl-maintainers mailing list