Bug 402201 - tilde expansion nonfunctional in --resultdir
Summary: tilde expansion nonfunctional in --resultdir
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: mock
Version: 8
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: David Cantrell
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-11-28 06:21 UTC by Ralf Corsepius
Modified: 2013-01-10 01:44 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2007-11-30 01:55:38 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Ralf Corsepius 2007-11-28 06:21:56 UTC
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):
mock-0.8.9-1.fc8

How reproducible:
Always.

Steps to Reproduce:
1. mkdir tmp
2. cd tmp
3. mock -r <repoid> --resultdir=~/results rebuild <pkg>.src.rpm
  
Actual results:
Results are being put into ./~/results
instead of ~/results [$(HOME)/results]


Expected results:
mock to perform tilde expansions on command line args.

Comment 1 Michael E Brown 2007-11-28 15:51:19 UTC
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.

Comment 2 Ralf Corsepius 2007-11-28 16:02:56 UTC
man 3 glob


Comment 3 Michael E Brown 2007-11-28 17:01:02 UTC
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
setuid wrapper.


Comment 4 Michael E Brown 2007-11-28 17:02:12 UTC
Additionally, this appears to have been broken for every released version of mock.

Comment 5 Ralf Corsepius 2007-11-28 17:20:27 UTC
(In reply to comment #4)
> Additionally, this appears to have been broken for every released version of
> mock.
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.



Comment 6 Michael E Brown 2007-11-30 01:55:38 UTC
Fixed for $nextrelease.

Clark is preparing this release and will be releasing sometime in the next
couple days.

If you want to look at this before the official release, please check out the
upstream git repo.


Note You need to log in before you can comment on or make changes to this bug.