Using MacPorts "Offline"

Joshua Root jmr at macports.org
Wed Jan 31 01:48:28 UTC 2018


Jepeway, Chris wrote:
> Ah, perfect, thanks (& to Ryan).
> 
> This now works:
> 
> nickel% sudo port version
> [long delay while bsdtar runs]
> Version: 2.4.2
> 
> This, however, is a bust:
> 
> nickel% sudo port echo gawk\*
> Warning: Can't open index file for source: file:///Users/chrjep2/share/macports/ports.tar
> Error: /opt/local/bin/port: search for portname gawk* failed: No index(es) found! Have you synced your port definitions? Try running 'port selfupdate'.
> 
> And, of course, "port selfupdate" wants to phone home to rsync.macports.org<http://rsync.macports.org>, which my "banned from the internet" MacBook can't do.
> 
> Is there something I can do with "port index" that'll clear this up?  There seem to be indexes in the extracted ports dir:
> 
> nickel% ls -ltrd /opt/local/var/macports/portdirs/ports/*dex*17*
> drwxr-xr-x  4 500  505  128 Jan 30 15:17 /opt/local/var/macports/portdirs/ports/PortIndex_darwin_17_i386/

If you mark a source as nosync you are responsible for generating a
PortIndex for it, yes. That's not really possible when all you have is a
tarball. (Server-side we generate the index before tarring up the ports
tree; we distribute it as a tarball just because it's easier to generate
a signature for a single file.)

You'd be much better off using a file:// source as Ryan suggested. (And
allowing it to sync, which for a plain non-VCS-checkout directory will
just update the PortIndex.)

- Josh


More information about the macports-users mailing list