> 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.
It is unfortunate. I am considering following patch: --- a/postrm-sysuser.sh +++ b/postrm-sysuser.sh @@ -3,6 +3,8 @@ if [ "$1" = purge ] ; then rm -f "$store/$package" if [ $(count_files_in "$store") = 1 ] ; then - deluser --force --remove-home "$username" + home=$(getent passwd "$username"| cut -d: -f6) + deluser --force "$username" + rm -fr --preserve-root --one-file-system -- "$home" fi fi but I am scared to invoke `rm -fr' with root. I beleive, that deluser would handle it better then me. Ah, and by the way, why `adduser' package, from which `deluser' binary comes is still present during post-rm? `adduser' is not Essential, only Important. I know that abusing Pre-Depends is frowned upon, but would Pre-Depends: perl help? -- X-Web-Site: https://sinsekvu.github.io | Note that I process my email in batch, Accept-Languages: eo,ru,en | at most once every 24 hours. If matter Accept: text/plain, text/x-diff | is urgent, you have my phone number.
pgpNqGc3UPG3o.pgp
Description: PGP signature