Trouble with Local Port

Nathan Brazil nb at bitaxis.com
Thu Aug 18 09:53:21 PDT 2011


I maintain a re-distributable package of the Freeciv game that is built using MacPorts and then packaged for re-distribution.

What I have been doing successfully prior to Lion & MacPorts 2 is create an alternate port install (rooted at /opt/com.bitaxis), create a local port repository, copy the Portfile and patch file into it, edit, build, and package.  The local port repository bit is needed because the official port often lags behind most the current version.

Now, with Lion (10.7.0) and MacPorts 2.0.1, I run into the following issue when I try to install Freeciv 2.3.0 (the official one is still at 2.2.7) after I've edited the local Portfile:

$ sudo port fetch freeciv-x11
Error: Unable to execute port: could not read "/Users/nathan/Documents/Projects/ports/games/freeciv-x11/Portfile": permission denied
To report a bug, see <http://guide.macports.org/#project.tickets>

Okay.  This is different.  It used to write to the system location.  But, moving along...

$ port fetch freeciv-x11
Warning: MacPorts running without privileges. You may be unable to complete certain actions (e.g. install).
Portfile changed since last build; discarding previous state.
--->  Fetching freeciv-x11
--->  Attempting to fetch freeciv-2.3.0.tar.bz2 from http://cdnetworks-us-2.dl.sourceforge.net/project/freeciv/Freeciv%202.3/2.3.0/

$ sudo port install freeciv-x11
Password:
Error: Unable to execute port: could not read "/Users/nathan/Documents/Projects/ports/games/freeciv-x11/Portfile": permission denied
To report a bug, see <http://guide.macports.org/#project.tickets>

Okay.  Maybe it will install to my home directory.

$ port install freeciv-x11
Error: Insufficient privileges to write to MacPorts install prefix.

I checked the Unix permissions on my local port repository, and it looks like this:

$ ll ~/Projects/ports/games/freeciv-x11
total 8
0 drwxr-xr-x  5 nathan  staff   170B Aug 18 09:12 ./
0 drwxr-xr-x  4 nathan  staff   136B Apr  3 13:54 ../
4 -rw-r--r--  1 nathan  staff   1.5K Aug 18 09:12 Portfile
0 drwxr-xr-x  3 nathan  staff   102B Aug 18 08:53 files/
4 lrwxr-xr-x  1 root    staff   109B Aug 18 09:07 work@ -> /opt/com.bitaxis/var/macports/build/_Users_nathan_Documents_Projects_ports_games_freeciv-x11/freeciv-x11/work

I deleted the work symbolic link, re-ran portindex (which re-created work as a local directory with my permissions), and tried it again:

$ port install freeciv-x11
Error: Insufficient privileges to write to MacPorts install prefix.

So I am kinda stuck now.  Please advise.

Thanks!

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-users/attachments/20110818/505ab7b8/attachment.html>


More information about the macports-users mailing list