Open nshp opened 9 years ago
Yeah, if packer s for install packages from AUR and makepkg not support root user, then why packer support it?, yeah I aggre in a silly nbut informative message about not supporting root.
This is also a problem that I am encountering.
Yeah, it emerged to me after todays update. I can't finalize update with all dependencies in AUR
+1, although running as a normal user works just fine.
To get around this, just run packer
as a normal (non-root) user.
Pull request #132 fixes this, would be good to get it in since many people must be experiencing this problem.
what about
# diff -Naur /usr/bin/packer*
--- /usr/bin/packer 2014-08-11 10:43:24.000000000 +0200
+++ /usr/bin/packer.xmw 2015-01-01 23:39:05.706239397 +0100
@@ -328,7 +328,9 @@
# Installation (makepkg and pacman)
if [[ $UID -eq 0 ]]; then
- makepkg $MAKEPKGOPTS --asroot -f
+ id pacman >/dev/null 2>/dev/null || useradd -r -d /var/empty pacman
+ chown -R pacman:pacman .
+ su -c "makepkg $MAKEPKGOPTS -f" pacman
else
makepkg $MAKEPKGOPTS -f
fi
@xmw golly, i wish github had a comment voting option. i'd vote your patch up so hard.
i'd love to see that implemented as well.
EDIT: Added workaround to apacman wrapper @xmw Thank you for such an elegant fix! I was going to implement AUR user in the .install which is less optimal.
+1 thanks @xmw
+1 @xmw I've now migrated to using apacman instead since the developer implemented this patch.
:+1:
Thank you @xmw that fixed my update problems.
As of Pacman 4.2,
--asroot
is no longer an option.makepkg
must be run as a normal user. Perhaps packer should give its own error message when run as root?