--root=... does not work under sudo
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
click (Ubuntu) |
Fix Released
|
Medium
|
Colin Watson |
Bug Description
Grab com.ubuntu.
$ mkdir /tmp/fake_root/
$ sudo click install --root=
Traceback (most recent call last):
File "/usr/bin/click", line 65, in <module>
sys.
File "/usr/bin/click", line 60, in main
mod.run(args)
File "/usr/lib/
installer.
File "/usr/lib/
env=env)
File "/usr/lib/
retcode = call(*popenargs, **kwargs)
File "/usr/lib/
with Popen(*popenargs, **kwargs) as p:
File "/usr/lib/
restore_
File "/usr/lib/
raise child_exception
RuntimeError: Exception occurred in preexec_fn.
This is with click 0.2.6 and click-apparmor 0.0.4.
Related branches
- Colin Watson: Approve
- Ubuntu CI managed package branches: Pending requested
-
Diff: 485 lines (+269/-70)11 files modifiedREADME (+1/-0)
click/build.py (+10/-22)
click/framework.py (+138/-0)
click/install.py (+8/-28)
click/paths.py.in (+1/-0)
click/tests/helpers.py (+29/-0)
click/tests/test_build.py (+39/-5)
click/tests/test_install.py (+2/-4)
debian/changelog (+8/-0)
doc/file-format.rst (+1/-2)
doc/index.rst (+32/-9)
The true error here is that you need to make /tmp/fake_root/ writable by the clickpkg user. I've fixed it for 0.2.8 to give you this exception instead:
click.install. ClickInstallerP ermissionDenied : No permission to write to /tmp/fake_root as clickpkg user