what configuration files are read?

paul beard paulbeard at gmail.com
Mon Dec 31 13:57:41 PST 2007


On Dec 31, 2007 4:48 AM, Michael Stillwell <mjs at beebo.org> 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).


Is there some compelling reason why it couldn't be installed in /opt/local?

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.
>

Did you not create a scratch directory in your various installs? You might
want to look at your PATH to see what instance of this you're using.

I don't find any relevant invocation of scratch so I think it's safe to
assume it's from your testing or whatever you were doing.

:: mdfind -onlyin /opt/local  scratch
/opt/local/var/macports/sources/rsync.macports.org/release/ports/java/jakarta-taglibs-string/files/common.xml
/opt/local/lib/ruby/gems/1.8/doc/rake-0.7.3
/rdoc/files/lib/rake/clean_rb.html
/opt/local/lib/ruby/gems/1.8/doc/rake-0.7.3
/rdoc/files/doc/rational_rdoc.html
/opt/local/lib/ruby/gems/1.8/doc/rake-0.7.3/rdoc/classes/Rake/RDocTask.html
/opt/local/lib/ruby/gems/1.8/doc/rake-0.7.3
/rdoc/classes/Rake/PackageTask.html


> 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.
>
> You can change the permissions on your ports hierarchy to fix this, if you
want. I believe that's why sudo is required.


-- 
Paul Beard / www.paulbeard.org/
<paulbeard at gmail.com/paulbeard at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-users/attachments/20071231/c66293a1/attachment.html


More information about the macports-users mailing list