#23456: use_dmg yes fails when worksrcdir contains a space -------------------------------------+-------------------------------------- Reporter: ryandesign@… | Owner: ryandesign@… Type: defect | Status: new Priority: Normal | Milestone: MacPorts 1.8.3 Component: base | Version: 1.8.2 Keywords: | Port: -------------------------------------+-------------------------------------- Comment(by ryandesign@…): Aaaaaaaaaaaa, I hate how non-simple this has [attachment:use_dmg.diff turned out to be]. The simple part is the patch to portextract.tcl. I assumed ${worksrcdir} didn't contain spaces and used it in ${extract.post_args} directly. I should have put quotes around each use of this. It was also an error to use ${worksrcdir} at all; I should have used ${distname}. (In fact, I really wanted to use the actual name of the volume inside the disk image, but found that to read it I have to use "diskutil info -plist ${dmg_mount}", put that into somefile.plist, then read out the volume name with "defaults read somefile VolumeName". Besides being verbose and inconvenient, this only worked on Snow Leopard; on Leopard and Tiger, diskutil just showed its usage message. So I gave up on this for now.) The problem is that even when I properly quote the paths, it doesn't help; ${extract.post_args} inexplicably loses the quotes I put there. Turns out this happens in portutil.tcl. I propose a patch to deal with this, but I'm unclear why the code was written the way it was written in the first place. I feel I'm basically undoing r628 with my change, and the commit message for r628 says it was done "to allow arguments ... to contain spaces" which seems to me to be the exact opposite of what it does. So I need some other eyes to look at this and see if there are any problems with my proposed changes before I commit them, since this is a change to a very fundamental part of MacPorts that's used by everything. -- Ticket URL: <http://trac.macports.org/ticket/23456#comment:1> MacPorts <http://www.macports.org/> Ports system for Mac OS