Follow-up Comment #5, bug #20399 (project mypaint):

The problem occurs with both scons 2.0.1 and scons 2.2.0, regardless of
whether I specify prefix=/opt/local when I run scons. /opt/local/ is the
default prefix in SConstruct when the OS is darwin (a.k.a. OS X).

The problem does *not* occur if I edit SConstruct and change it so that...


default_prefix = '/usr/local/'


...nor if I run scons with prefix=/usr/local or prefix=some nonexistent
directory inside the MacPorts work directory (which is where MacPorts will
allow ports to write things at build time). Setting
prefix=/nonexistent/directory (a nonexistent directory that MacPorts will not
allow ports to write to) results in an error right away before anything is
built:


DEBUG: Executing command line:  cd
"/opt/local/var/macports/build/_Users_rschmidt_macports_dports_graphics_MyPaint/MyPaint/work/mypaint-1.1.0"
&& /opt/local/bin/scons -j8 python_binary=/opt/local/bin/python2.7
python_config=/opt/local/bin/python2.7-config prefix=/nonexistent/directory 
scons: Reading SConscript files ...
OSError: [Errno 13] Permission denied: '/nonexistent':
  File
"/opt/local/var/macports/build/_Users_rschmidt_macports_dports_graphics_MyPaint/MyPaint/work/mypaint-1.1.0/SConstruct",
line 42:
    env = Environment(ENV=os.environ, options=opts, tools=tools)
  File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/scons-2.2.0/SCons/Environment.py",
line 985:
    variables.Update(self)
  File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/scons-2.2.0/SCons/Variables/__init__.py",
line 216:
    option.validator(option.key, env.subst('${%s}'%option.key), env)
  File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/scons-2.2.0/SCons/Variables/PathVariable.py",
line 102:
    os.makedirs(val)
  File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/os.py",
line 150:
    makedirs(head, mode)
  File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/os.py",
line 157:
    mkdir(name, mode)
Command failed:  cd
"/opt/local/var/macports/build/_Users_rschmidt_macports_dports_graphics_MyPaint/MyPaint/work/mypaint-1.1.0"
&& /opt/local/bin/scons -j8 python_binary=/opt/local/bin/python2.7
python_config=/opt/local/bin/python2.7-config prefix=/nonexistent/directory 
Exit code: 2


I'm not quite sure what to make of all this but I can certainly set prefix to
a nonexistent directory in the work directory to avoid the problem for now.

---------

Thank you for the tip about using an absolute --install-sandbox. I thought I
had tried that before, and I tried it again now to verify that it doesn't work
right for me: it tries to chmod directories outside of the sandbox, which
fails.

The MacPorts sandbox directory is called "destroot" and is created at the same
level as (not inside of) the source directory. Trying to use that gives a
permission error. It correctly installs mypaint inside the sandbox, but then
tries to chmod the corresponding parent directory outside of the sandbox,
which MacPorts does not permit:


DEBUG: Executing command line:  cd
"/opt/local/var/macports/build/_Users_rschmidt_macports_dports_graphics_MyPaint/MyPaint/work/mypaint-1.1.0"
&& /opt/local/bin/scons install python_binary=/opt/local/bin/python2.7
python_config=/opt/local/bin/python2.7-config prefix=/opt/local
--install-sandbox=/opt/local/var/macports/build/_Users_rschmidt_macports_dports_graphics_MyPaint/MyPaint/work/destroot

...
Install file: "mypaint" as
"/opt/local/var/macports/build/_Users_rschmidt_macports_dports_graphics_MyPaint/MyPaint/work/destroot/opt/local/bin/mypaint"
Chmod("/opt/local/var/macports/build/_Users_rschmidt_macports_dports_graphics_MyPaint/MyPaint/work/destroot/opt/local/bin/mypaint",
0755)
Chmod("/opt/local/bin", 0755)
scons: ***
[/opt/local/var/macports/build/_Users_rschmidt_macports_dports_graphics_MyPaint/MyPaint/work/destroot/opt/local/bin/mypaint]
/opt/local/bin: Operation not permitted
scons: building terminated because of errors.


Following instead the direction in the README that it must be a directory
under the source directory, I get instead a file-not-found error. Same
problem, but it's installing a different file. It succeeds installing mypaint
and chmod'ing its parent directory in the sandbox, then installs
mypaint-brush.h in the sandbox and fails when trying to chmod its nonexistent
parent directory outside of the sandbox:

+verbatim
DEBUG: Executing command line:  cd
"/opt/local/var/macports/build/_Users_rschmidt_macports_dports_graphics_MyPaint/MyPaint/work/mypaint-1.1.0"
&& /opt/local/bin/scons install python_binary=/opt/local/bin/python2.7
python_config=/opt/local/bin/python2.7-config prefix=/opt/local
--install-sandbox=/opt/local/var/macports/build/_Users_rschmidt_macports_dports_graphics_MyPaint/MyPaint/work/mypaint-1.1.0/destroot

...
Install file: "mypaint" as "destroot/opt/local/bin/mypaint"
Chmod("destroot/opt/local/bin/mypaint", 0755)
Install file: "brushlib/glib/mypaint-brush.h" as
"destroot/opt/local/include/libmypaint/glib/mypaint-brush.h"
Chmod("destroot/opt/local/include/libmypaint/glib/mypaint-brush.h", 0644)
Chmod("/opt/local/include/libmypaint/glib", 0755)
scons: *** [destroot/opt/local/include/libmypaint/glib/mypaint-brush.h]
/opt/local/include/libmypaint/glib: No such file or directory
scons: building terminated because of errors.



    _______________________________________________________

Reply to this item at:

  <http://gna.org/bugs/?20399>

_______________________________________________
  Message sent via/by Gna!
  http://gna.org/


_______________________________________________
Mypaint-bugs mailing list
[email protected]
https://mail.gna.org/listinfo/mypaint-bugs

Reply via email to