Red Hat Bugzilla – Bug 402201
tilde expansion nonfunctional in --resultdir
Last modified: 2013-01-09 20:44:10 EST
Description of problem:
mock doesn't parse args to --resultdir correctly.
Seemingly tilde expansion doesn't work.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. mkdir tmp
2. cd tmp
3. mock -r <repoid> --resultdir=~/results rebuild <pkg>.src.rpm
Results are being put into ./~/results
instead of ~/results [$(HOME)/results]
mock to perform tilde expansions on command line args.
tilde expansion is a function of the shell, not the program being run.
Bash doesnt recognize '--something=~/...' as something it should expand. Leave
out the '=' to let bash perform tilde-expansion on this.
man 3 glob
it is complicated by the fact that $HOME is reset to /root because of the setuid
wrapper, so this isnt trivial to implement.
a call to os.path.expanduser() would theoretically fix this, but it would
require some pretty significant code rearrangements to accomplish due to the
Additionally, this appears to have been broken for every released version of mock.
(In reply to comment #4)
> Additionally, this appears to have been broken for every released version of
I know, it has been haunting and nagging me from the earliest days of mock, but
it's always a surprise to me being hit by it every couple months.
Fixed for $nextrelease.
Clark is preparing this release and will be releasing sometime in the next
If you want to look at this before the official release, please check out the
upstream git repo.