FS#42277 - [devtools] mkarchroot's '-C' switch doesn't work fine when invoked as an unprivileged user

Attached to Project: Arch Linux
Opened by N. I. (izmntuk) - Tuesday, 07 October 2014, 06:16 GMT
Last edited by Dave Reisner (falconindy) - Friday, 24 October 2014, 13:24 GMT
Task Type Bug Report
Category Arch Projects
Status Closed
Assigned To Pierre Schmitz (Pierre)
Dave Reisner (falconindy)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Overview:
The '-C' switch of mkarchroot doesn't work when running as a normal(unprivileged) user.

Package version:
* extra/devtools 20140510-1

Additional Information:
I tested this in a btrfs pool.

Steps to reproduce:
1. $ cp /usr/share/devtools/pacman-extra.conf ~/tmp/chroot/extra.conf
2. Add ILoveCandy to ~/tmp/chroot/extra.conf, and make sure that ILoveCandy is not enabled in /etc/pacman.conf
3. Run 'mkarchroot -C ~/tmp/chroot/extra.conf -- extra base-devel'.
4. Watch if there is a little pac-man during mkarchroot.

Workaround:
A fixup function in my zshrc:
[[ -n ${commands[mkarchroot]} && -n ${commands[sudo]} ]] && mkarchroot() {
if [[ ${EUID} -ne 0 ]];then
sudo mkarchroot $@
else
command mkarchroot $@
fi
}
This task depends upon

Closed by  Dave Reisner (falconindy)
Friday, 24 October 2014, 13:24 GMT
Reason for closing:  Fixed
Additional comments about closing:  devtools-20141024
Comment by Dave Reisner (falconindy) - Tuesday, 07 October 2014, 16:07 GMT
Broken in 03611dc63e3e44d05

Pretty sure this patch fixes it:

https://lists.archlinux.org/pipermail/arch-projects/2014-May/004159.html
Comment by Dave Reisner (falconindy) - Friday, 24 October 2014, 13:18 GMT
Aforementioned patch is crap. This actually fixes it:

https://projects.archlinux.org/devtools.git/commit/?id=bf7dc83bab4f002

Loading...