what configuration files are read?
Ryan Schmidt
ryandesign at macports.org
Mon Dec 31 16:00:01 PST 2007
On Dec 31, 2007, at 06:48, Michael Stillwell wrote:
> How does "port" figure out which configuration files to read? Mine
> is now trying to get configuration information from a non-existent
> file: I have a (source-compiled) version installed in /Ports, and
> then installed another temporary version into $HOME/scratch/ports
> (via ./configure --prefix=$HOME/scratch/ports, to see whether a
> dependency problem with ncursesw had been fixed). Running /Ports/
> bin/port now produces an error message:
>
> boom:~$ /Ports/bin/port --help
> sources_conf must be set in /Users/mjs/scratch/ports/etc/macports/
> macports.conf or in your /Users/mjs/.macports/macports.conf file
> while executing
> "mportinit ui_options global_options global_variations"
> Error: /Ports/bin/port: Failed to initialize MacPorts, sources_conf
> must be set in /Users/mjs/scratch/ports/etc/macports/macports.conf
> or in your /Users/mjs/.macports/macports.conf file
>
> Where is it getting the "scratch" directory from? There's nothing
> in $HOME/.macports except for a history file, and there's nothing
> in my environment either. /Ports/bin/ports itself appears to be
> unchanged, and rgrep over the /Ports directory gives nothing as well.
>
> Also, why does "make install" require root privileges? I tried to
> install without "sudo" to try to prevent the temporary install from
> making changes to my existing configuration files, but it won't
> actually install this way.
There are two things going on here.
Issue #1: The reason why your two installations are conflicting with
one another is that they both installed their Tcl components to /
Library/Tcl/macports1.0, and the $HOME/scratch/ports instalation's /
Library/Tcl/macports1.0 has overwritten the one from $HOME/Ports.
There has been discussion of moving the directory /Library/Tcl/
macports1.0 to ${prefix}/share/macports/Tcl:
http://lists.macosforge.org/pipermail/macports-dev/2007-August/
002491.html
You could bypass all the arguments and just do it yourself. You
should reinstall both of your installations (or at least the /Ports
one, since its /Library/Tcl/macports1.0 is gone), making sure that at
least one, or perhaps both, of them put their Tcl directory
elsewhere, for example:
PATH=/usr/bin:/usr/sbin:/bin:/sbin ./configure \
--prefix=$HOME/Ports \
--with-tclpackage=$HOME/Ports/share/macports/Tcl
And for the other installation:
PATH=/usr/bin:/usr/sbin:/bin:/sbin ./configure \
--prefix=$HOME/scratch/ports \
--with-tclpackage=$HOME/scratch/ports/share/macports/Tcl
See this message where this question came up before:
http://lists.macosforge.org/pipermail/macports-users/2007-December/
007690.html
Though note that Daniel's suggested location for the Tcl directory is
worse; ${prefix}/share/macports/Tcl already contains other MacPorts
Tcl code, so that's the directory that should be used.
Issue #2: Issue #1 would also be a reason why you could not install
without root. You should be able to install without root, provided
you install to a location you control. And you are. But, even doing
so, we get a failure, for which I have filed a bug report:
http://trac.macosforge.org/projects/macports/ticket/13766
More information about the macports-users
mailing list