Re: MacPorts selfupdate fails… cannot write to location

William H. Magill magill at me.com
Sat Oct 1 12:07:01 PDT 2011


On Sep 14, 2011, at 12:38 PM, Ryan Schmidt wrote:

> On Sep 13, 2011, at 21:49, William H. Magill wrote:
>> This is very weird… True… registry.db does not exist… no idea why unless the previous "selfupdate" attempt deleted it.
>>                                  False… both my userid and root (sudo) can write to the directory.
>> -----------------------------<cut here>--------------------------
>> outpost> sudo port -v selfupdate
>> Password:
>> port registry doesn't exist at "/opt/local/var/macports/registry/registry.db" and couldn't write to this location
> 
> [snip]
> 
>> Note: last activity had been 8 July when I successfully installed iStumbler.
> 
> July 8 predates MacPorts 2, unless you were running a beta version of it.
> 
> MacPorts 1 by default used a flat registry, not the new SQLite registry mandated by MacPorts 2.
> 
> When upgrading to MacPorts 2, it's supposed to detect if you're using the flat registry, and convert it to the new SQLite registry.
> 
> It looks like that conversion didn't happen in your case, or at least, didn't happen completely. Or maybe you thought selfupdate was taking too long and you interrupted it? The conversion can take hours depending on how many ports you have installed and how fast your computer is.
> 
> In that case, hopefully MacPorts hasn't removed the previous flat registry information, and it should be possible to "reset" MacPorts so that it tries the conversion again. But I forget how to make it do that.

Returning to a problem I was having earlier before "life" interrupted ….and am still having.

I realize that the registry.db file does not exist. What I don't understand is the "couldn't write to this location" part of the error.

I have no problem simply wiping Mac Ports and sting over but upgrading from Snow Leopard (where I had last run Mac Ports 1.9) to Lion and attempting to upgrade to MacPorts 2.x "should work."
I also realize that the flat registry is/was gone because of a previous failed "self update"… but why can't it write?

=================<cut here>===================
outpost> sudo port -vd selfupdate
port registry doesn't exist at "/opt/local/var/macports/registry/registry.db" and couldn't write to this location
    while executing
"registry::open $db_path"
    (procedure "mportinit" line 551)
    invoked from within
"mportinit ui_options global_options global_variations"
Error: /opt/local/bin/port: Failed to initialize MacPorts, port registry doesn't exist at "/opt/local/var/macports/registry/registry.db" and couldn't write to this location
=================<cut here>===================

outpost> ls -alse /opt
total 0
0 drwxr-xr-x@  3 magill  admin   102 Aug 27  2009 .
0 drwxr-xr-x@ 32 root    wheel  1156 Aug 17 21:49 ..
0 drwxr-xr-x  13 magill  admin   442 Sep 12 13:45 local
[/Users/magill] magill 
 outpost> ls -alse /opt/local
total 4
0 drwxr-xr-x  13 magill  admin   442 Sep 12 13:45 .
0 drwxr-xr-x@  3 magill  admin   102 Aug 27  2009 ..
0 drwxr-xr-x  28 magill  admin   952 Sep 12 13:45 bin
0 drwxr-xr-x   3 magill  admin   102 Aug 27  2009 etc
0 drwxr-xr-x  23 magill  admin   782 Jun 15 01:37 include
0 drwxr-xr-x  31 magill  admin  1054 Sep 12 13:45 lib
0 drwxr-xr-x   3 magill  admin   102 Nov  7  2010 libexec
4 lrwxr-xr-x   1 root    admin     9 Sep 12 13:45 man -> share/man
0 drwxr-xr-x   3 magill  admin   102 Nov  7  2010 sbin
0 drwxr-xr-x   7 magill  admin   238 Sep 12 13:45 share
0 drwxr-xr-x   2 magill  admin    68 Sep 12 13:45 src
0 drwxr-xr-x   3 magill  admin   102 Nov  7  2010 var
0 drwxr-xr-x   2 magill  admin    68 Sep 12 13:45 www
[/Users/magill] magill 
 outpost> ls -alse /opt/local/var
total 0
0 drwxr-xr-x   3 magill  admin  102 Nov  7  2010 .
0 drwxr-xr-x  13 magill  admin  442 Sep 12 13:45 ..
0 drwxr-xr-x  12 magill  admin  408 Sep 12 13:45 macports
[/Users/magill] magill 
 outpost> ls -alse /opt/local/var/macports
total 16
 0 drwxr-xr-x  12 magill  admin   408 Sep 12 13:45 .
 0 drwxr-xr-x   3 magill  admin   102 Nov  7  2010 ..
 4 -rw-r--r--   1 root    admin    13 Sep 12 13:45 .tclpackage
 0 drwxr-xr-x   3 magill  admin   102 Jul  8 14:03 build
 0 drwxr-xr-x   4 magill  admin   136 Jul  8 14:03 distfiles
 0 drwxr-xr-x   2 magill  admin    68 Jul  8 14:03 logs
 0 drwxr-xr-x   3 root    admin   102 Nov  7  2010 packages
12 -r--r--r--   1 magill  admin  9851 Sep 12 13:45 port-help.tcl
 0 drwxr-xr-x   6 root    admin   204 Jul  8 14:03 receipts
 0 drwxr-xr-x   4 magill  admin   136 Sep 13 22:39 registry
 0 drwxr-xr-x   3 magill  admin   102 Jul  8 14:03 software
 0 drwxr-xr-x   3 root    admin   102 Jun 15 01:37 sources
[/Users/magill] magill 
 outpost> ls -alse /opt/local/var/macports/registry
total 0
0 drwxr-xr-x   4 magill  admin  136 Sep 13 22:39 .
0 drwxr-xr-x  12 magill  admin  408 Sep 12 13:45 ..
0 -rw-r--r--   1 root    admin    0 Jul  8 14:03 .registry.lock
0 -rw-rw-r--   1 root    admin    0 Nov  7  2010 .turd_MacPorts
[/Users/magill] magill 



T.T.F.N.
William H. Magill
# iMac11,3 Core i7 [2.936GHz - 4 GB 1333] OS X 10.7.1
# iMac6,1 Core 2 Duo [2.16GHz - 3 GB 667] OS X 10.6.8
# MacBook Pro4.1 Core 2 Duo [2.5GHz - 4GB 667] OS X 10.6.8
# Mac mini Core Duo [1.66 Ghz - 2 GB 667] OS X 10.6.8
# Flat-panel iMac (2.1) [800MHz - Super Drive - 768 Meg] OS X 10.4.11 
# PWS433a [Alpha 21164 Rev 7.2 (EV56)- 64 Meg] Tru64 5.1a 
# XP1000 [Alpha 21264-3 (EV6) - 256 meg] FreeBSD 5.3
# XP1000 [Alpha 21264-A (EV6-7) - 256 meg] FreeBSD 5.3
magill at mcgillsociety.org
magill at me.com
whmagill at gmail.com










More information about the macports-users mailing list