Opened 9 years ago

Last modified 9 years ago

#47283 closed defect

Backslashes in file names in destroot cause activate to fail — at Version 3

Reported by: jpo@… Owned by: macports-tickets@…
Priority: Normal Milestone: MacPorts 2.3.4
Component: base Version: 2.3.3
Keywords: Cc: cal@…
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.

Change History (4)

Changed 9 years ago by jpo@…

Attachment: main.log added

comment:1 Changed 9 years ago 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.

comment:2 Changed 9 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 9 years ago by neverpanic (Clemens Lang)

Cc: cal@… added
Description: modified (diff)
Keywords: backslash activate removed
Note: See TracTickets for help on using tickets.