Opened 10 years ago

Last modified 8 years ago

#45133 new defect

scons @2.3.3: Port tries to install outside of prefix when prefix is in /Library

Reported by: djvasi@… Owned by: macports-tickets@…
Priority: Low Milestone:
Component: ports Version: 2.3.1
Keywords: Cc:
Port: scons

Description

On install, I get :

[snip]
--->  Staging scons into destroot
. changed
	gid expected 0 found 80 modified
./usr missing (created)
. missing (directory not created: File exists)
./Applications missing (created)
[snip]
./www missing (created)
xinstall: mkdir /Library/MacPorts/10.9/var/macports/build/_Users_vasi_Source_macports_dports_devel_scons/scons/work/destroot/Library/MacPorts/10.9/share/doc
xinstall: mkdir /Library/MacPorts/10.9/var/macports/build/_Users_vasi_Source_macports_dports_devel_scons/scons/work/destroot/Library/MacPorts/10.9/share/doc/scons
xinstall: mkdir /Library/MacPorts/10.9/var/macports/build/_Users_vasi_Source_macports_dports_devel_scons/scons/work/destroot/Library/MacPorts/10.9/share/doc/scons/examples
running install
running build
running build_py
running build_scripts
running install_lib
creating /usr/local/lib/scons-2.3.3
error: could not create '/usr/local/lib/scons-2.3.3': Operation not permitted
Command failed:  cd "/Library/MacPorts/10.9/var/macports/build/_Users_vasi_Source_macports_dports_devel_scons/scons/work/scons-2.3.3" && /Library/MacPorts/10.9/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7 setup.py --no-user-cfg install --prefix=/Library/MacPorts/10.9/Library/Frameworks/Python.framework/Versions/2.7 --root=/Library/MacPorts/10.9/var/macports/build/_Users_vasi_Source_macports_dports_devel_scons/scons/work/destroot 
Exit code: 1
Error: org.macports.destroot for port scons returned: command execution failed

Change History (3)

comment:1 Changed 10 years ago by djvasi@…

It looks like the problem relates to this part of setup.py:

def force_to_usr_local(self):
    """
    A hack to decide if we need to "force" the installation directories
    to be under /usr/local.  This is because Mac Os X Tiger and
    Leopard, by default, put the libraries and scripts in their own
    directories under /Library or /System/Library.
    """
    return (sys.platform[:6] == 'darwin' and
            (self.install_dir[:9] == '/Library/' or
             self.install_dir[:16] == '/System/Library/'))

It assumes that since my prefix is in /Library, it must be a problem. But there's no particular reason I shouldn't be able to put my MacPorts prefix there!

comment:2 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: landonf removed
Owner: changed from macports-tickets@… to landonf@…
Port: scons added

comment:3 Changed 8 years ago by ryandesign (Ryan Carsten Schmidt)

Owner: changed from landonf@… to macports-tickets@…
Priority: NormalLow
Summary: scons @2.3.3: Port tries to install outside of prefixscons @2.3.3: Port tries to install outside of prefix when prefix is in /Library

You're probably the only user who ever configured MacPorts with a prefix inside /Library so fixing this is a low priority.

Note: See TracTickets for help on using tickets.