Created attachment 581942 [details, diff] acct-user.patch manually deleting $user and then unmerging acct-user/$user results in: >>> Unmerging (1 of 1) acct-user/postfix-0... * User does not exist, cannot set shell -- skipping. * User does not exist, cannot set comment -- skipping. usermod: user 'postfix' does not exist * ERROR: acct-user/postfix-0::gentoo failed (prerm phase): * Locking account postfix failed [...] I think the following behaviour is a better user experience: >>> Unmerging (1 of 1) acct-user/postfix-0... * User does not exist, cannot set shell -- skipping. * User does not exist, cannot set comment -- skipping. * User does not exist, cannot lock user -- skipping. see attached for a possible patch.
Yes, that makes sense. I suppose we can't have a cleaner implementation than that. I'll verify it in a few minutes, and send to ml for feedback.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d61d24f4818eef45f8e7ba2e4a7c508ad5bdfb43 commit d61d24f4818eef45f8e7ba2e4a7c508ad5bdfb43 Author: Michał Górny <mgorny@gentoo.org> AuthorDate: 2019-07-05 10:01:39 +0000 Commit: Michał Górny <mgorny@gentoo.org> CommitDate: 2019-07-05 15:44:19 +0000 acct-user.eclass: Skip locking if account does not exist Closes: https://bugs.gentoo.org/689308 Signed-off-by: Michał Górny <mgorny@gentoo.org> eclass/acct-user.eclass | 6 ++++++ 1 file changed, 6 insertions(+)