[arch-general] Removing gitolite package doesn't remove gitolite user
Eli Schwartz
eschwartz93 at gmail.com
Sun Apr 2 06:14:48 UTC 2017
On 03/31/2017 10:12 PM, Ricardo Band wrote:
> On Fri, 2017-03-31 at 20:37 -0500, Doug Newgard wrote:
>>
>> Short version here, you deleted the user's home dir manually and left
>> the user.
>> That's not a packaging problem.
>
> Yep. But shouldn't the home dir be recreated when I reinstall the
> package?
You are literally responding to a post in which you are told that this
"shouldn't" be done.
> It seems that the package only executes a useradd command that creates
> the user home. If the user already exists that command seems to return
> true without recreating the home.
Correct. Since the user home dir is created as part of the user creation
itself, it makes sense to assume that the user home dir is *deleted* as
part of the user deletion itself.
You have now learned a valuable lesson: don't delete user home dirs for
system users, without first making sure the system user is deleted as
well (in addition to anything else that system user may have been
responsible for).
> The package could check for the dir after that and if it's not there
> create it. The package method in the PKGBUILD already includes the
> creation of the directory but it doesn't seem to fire if the user is
> already there. Which is a bit weird because I don't see any check for
> the user in there [1].
>
> [1]: https://git.archlinux.org/svntogit/community.git/tree/trunk/PKGBUI
> LD?h=packages/gitolite
No, the PKGBUILD package() method does not in fact create the directory
in any way, shape, or form. If it did, you wouldn't have had this problem.
--
Eli Schwartz
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.archlinux.org/pipermail/arch-general/attachments/20170402/a610efe3/attachment-0001.asc>
More information about the arch-general
mailing list