[MacPorts] #47283: Backslashes in file names in destroot cause activate to fail
#47283: Backslashes in file names in destroot cause activate to fail ---------------------------------+-------------------------------- Reporter: jpo@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: base | Version: 2.3.3 Keywords: backslash, activate | Port: ---------------------------------+-------------------------------- 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 activate backslash-test $ 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. -- Ticket URL: <https://trac.macports.org/ticket/47283> MacPorts <https://www.macports.org/> Ports system for OS X
#47283: Backslashes in file names in destroot cause activate to fail ---------------------+--------------------------------- Reporter: jpo@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: base | Version: 2.3.3 Resolution: | Keywords: backslash, activate Port: | ---------------------+--------------------------------- Comment (by jpo@…): 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. -- Ticket URL: <https://trac.macports.org/ticket/47283#comment:1> MacPorts <https://www.macports.org/> Ports system for OS X
#47283: Backslashes in file names in destroot cause activate to fail ---------------------+--------------------------------- Reporter: jpo@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: base | Version: 2.3.3 Resolution: | Keywords: backslash, activate Port: | ---------------------+--------------------------------- Comment (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. -- Ticket URL: <https://trac.macports.org/ticket/47283#comment:2> MacPorts <https://www.macports.org/> Ports system for OS X
#47283: Backslashes in file names in destroot cause activate to fail ---------------------+-------------------------------- Reporter: jpo@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: base | Version: 2.3.3 Resolution: | Keywords: Port: | ---------------------+-------------------------------- Changes (by cal@…): * cc: cal@… (added) * keywords: backslash, activate => Old description:
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 activate backslash-test $ 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.
New description: 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. -- -- Ticket URL: <https://trac.macports.org/ticket/47283#comment:3> MacPorts <https://www.macports.org/> Ports system for OS X
#47283: Backslashes in file names in destroot cause activate to fail ---------------------+-------------------------------- Reporter: jpo@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: base | Version: 2.3.3 Resolution: | Keywords: Port: | ---------------------+-------------------------------- Comment (by cal@…): 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. -- Ticket URL: <https://trac.macports.org/ticket/47283#comment:4> MacPorts <https://www.macports.org/> Ports system for OS X
#47283: Backslashes in file names in destroot cause activate to fail ---------------------+-------------------------------- Reporter: jpo@… | Owner: macports-tickets@… Type: defect | Status: closed Priority: Normal | Milestone: MacPorts Future Component: base | Version: 2.3.3 Resolution: fixed | Keywords: Port: | ---------------------+-------------------------------- Changes (by cal@…): * status: new => closed * resolution: => fixed * milestone: => MacPorts Future Comment: 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. -- Ticket URL: <https://trac.macports.org/ticket/47283#comment:5> MacPorts <https://www.macports.org/> Ports system for OS X
#47283: Backslashes in file names in destroot cause activate to fail ---------------------+-------------------------------- Reporter: jpo@… | Owner: macports-tickets@… Type: defect | Status: closed Priority: Normal | Milestone: MacPorts Future Component: base | Version: 2.3.3 Resolution: fixed | Keywords: Port: | ---------------------+-------------------------------- Comment (by cal@…): And r134502, because there really was no reason to use a regular expression in this case. -- Ticket URL: <https://trac.macports.org/ticket/47283#comment:6> MacPorts <https://www.macports.org/> Ports system for OS X
#47283: Backslashes in file names in destroot cause activate to fail ---------------------+-------------------------------- Reporter: jpo@… | Owner: macports-tickets@… Type: defect | Status: closed Priority: Normal | Milestone: MacPorts Future Component: base | Version: 2.3.3 Resolution: fixed | Keywords: Port: | ---------------------+-------------------------------- Comment (by jpo@…): Cool, thanks for the quick fix! Now time to decide if I really want to run trunk just for this... :/ -- Ticket URL: <https://trac.macports.org/ticket/47283#comment:7> MacPorts <https://www.macports.org/> Ports system for OS X
#47283: Backslashes in file names in destroot cause activate to fail ---------------------+-------------------------------- Reporter: jpo@… | Owner: macports-tickets@… Type: defect | Status: closed Priority: Normal | Milestone: MacPorts Future Component: base | Version: 2.3.3 Resolution: fixed | Keywords: Port: | ---------------------+-------------------------------- Comment (by cal@…): Backported to the 2.3.x branch in r134503. -- Ticket URL: <https://trac.macports.org/ticket/47283#comment:8> MacPorts <https://www.macports.org/> Ports system for OS X
#47283: Backslashes in file names in destroot cause activate to fail ---------------------+-------------------------------- Reporter: jpo@… | Owner: macports-tickets@… Type: defect | Status: closed Priority: Normal | Milestone: MacPorts Future Component: base | Version: 2.3.3 Resolution: fixed | Keywords: Port: | ---------------------+-------------------------------- Comment (by cal@…): Just for the record, applying r134502 locally is enough to fix this issue. -- Ticket URL: <https://trac.macports.org/ticket/47283#comment:9> MacPorts <https://www.macports.org/> Ports system for OS X
#47283: Backslashes in file names in destroot cause activate to fail ---------------------+-------------------------------- Reporter: jpo@… | Owner: macports-tickets@… Type: defect | Status: closed Priority: Normal | Milestone: MacPorts Future Component: base | Version: 2.3.3 Resolution: fixed | Keywords: Port: | ---------------------+-------------------------------- Comment (by jpo@…): Thanks! See #47284 and #47285 (deco-archive and deco respectively) -- Ticket URL: <https://trac.macports.org/ticket/47283#comment:10> MacPorts <https://www.macports.org/> Ports system for OS X
#47283: Backslashes in file names in destroot cause activate to fail ---------------------+-------------------------------- Reporter: jpo@… | Owner: macports-tickets@… Type: defect | Status: closed Priority: Normal | Milestone: MacPorts 2.3.4 Component: base | Version: 2.3.3 Resolution: fixed | Keywords: Port: | ---------------------+-------------------------------- Changes (by jmr@…): * milestone: MacPorts Future => MacPorts 2.3.4 -- Ticket URL: <https://trac.macports.org/ticket/47283#comment:11> MacPorts <https://www.macports.org/> Ports system for OS X
participants (1)
-
MacPorts