#47283 closed defect (fixed)
Backslashes in file names in destroot cause activate to fail
Reported by: | jpo@… | Owned by: | macports-tickets@… |
---|---|---|---|
Priority: | Normal | Milestone: | MacPorts 2.3.4 |
Component: | base | Version: | 2.3.3 |
Keywords: | Cc: | neverpanic (Clemens Lang) | |
Port: |
Description (last modified by neverpanic (Clemens Lang))
Seems like a simple enough fix for anyone who is familiar with TCL and the base plumbing. I'm not unfortunately.
Consider the following:
PortSystem 1.0 name backslash-test version 1 categories devel platforms darwin description tests backslashes in filenames for the activate target fetch {} checksum {} use_configure no build {} destroot { touch "${destroot}${prefix}/share/back\\slash" }
Which produces the following results
$ sudo port destroot backslash-test ---> Fetching distfiles for backslash-test ---> Verifying checksums for backslash-test ---> Extracting backslash-test ---> Configuring backslash-test ---> Building backslash-test ---> Staging backslash-test into destroot $ find backslash-test -type f backslash-test/work/.macports.backslash-test.state backslash-test/work/destroot/opt/local/share/back\slash $ sudo port install backslash-test ---> Activating backslash-test @1_0 Error: org.macports.activate for port backslash-test returned: Image error: Source file /opt/local/var/macports/software/backslash-test/mpextractFapBvhDF/opt/local/share/back lash does not appear to exist (cannot lstat it). Unable to activate port backslash-test. Please see the log file for port backslash-test for details: /opt/local/var/macports/logs/_Volumes_case_src_macports_devel_backslash-test/backslash-test/main.log To report a bug, follow the instructions in the guide: http://guide.macports.org/#project.tickets Error: Processing of port backslash-test failed
I've attached a full log of an install of the above portfile from a clean state.
Attachments (1)
Change History (12)
Changed 10 years ago by jpo@…
comment:1 Changed 10 years ago by jpo@…
comment:2 Changed 10 years ago by jpo@…
Hmm. I wish I could edit the original ticket since the
$ sudo port activate backslash-test $ sudo port install backslash-test
was a copy-paste fail and not actually activate with no output.
In any case, the full log is still accurate.
comment:3 Changed 10 years ago by neverpanic (Clemens Lang)
Cc: | cal@… added |
---|---|
Description: | modified (diff) |
Keywords: | backslash activate removed |
comment:4 Changed 10 years ago by neverpanic (Clemens Lang)
Hm, I might take a look at this, since I've been looking for something like deco for a while. Debian has unp, but that hasn't been ported either.
comment:5 Changed 10 years ago by neverpanic (Clemens Lang)
Milestone: | → MacPorts Future |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Fixed in r134501. That happened to be quite the ride.
Of course, since this is a change in MacPorts base, it'll require a new update to be released until this can be used in public Portfiles. I'll make sure to merge this into our 2.3 branch so it gets released if there is going to be a 2.3.4. Bummer, though, because it means we cannot port deco-archive before that.
You can still install MacPorts trunk with the fix and file a ticket with the Portfile, though – I'd certainly like to use it.
comment:6 Changed 10 years ago by neverpanic (Clemens Lang)
And r134502, because there really was no reason to use a regular expression in this case.
comment:7 Changed 10 years ago by jpo@…
Cool, thanks for the quick fix!
Now time to decide if I really want to run trunk just for this... :/
comment:8 Changed 10 years ago by neverpanic (Clemens Lang)
Backported to the 2.3.x branch in r134503.
comment:9 Changed 10 years ago by neverpanic (Clemens Lang)
Just for the record, applying r134502 locally is enough to fix this issue.
comment:10 Changed 10 years ago by jpo@…
comment:11 Changed 9 years ago by jmroot (Joshua Root)
Milestone: | MacPorts Future → MacPorts 2.3.4 |
---|
Btw, I found this while trying to port deco-archive (http://hartlich.com/deco/archive/) which has a directory full of files named as regexes.