Opened 10 years ago

Closed 10 years ago

#32830 closed defect (duplicate)

"svn up; port -d sync" can't open registry

Reported by: yaseppochi (Stephen J. Turnbull) Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: base Version: 2.0.3
Keywords: Cc:


Like this

MacPorts/base 23:31$ svn up; port -v sync && port outdated
Updating '.':
U    src/port1.0/
U    src/macports1.0/macports.tcl
U    doc/macports.conf.5
U    doc/
Updated to revision 88735.
sqlite error: database is locked (1) while executing query: ATTACH DATABASE '/opt/local/var/macports/registry/registry.db' AS registry
    while executing
"registry::open $db_path"
    (procedure "mportinit" line 567)
    invoked from within
"mportinit ui_options global_options global_variations"
Error: /opt/local/bin/port: Failed to initialize MacPorts, sqlite error: database is locked (1) while executing query: ATTACH DATABASE '/opt/local/var/macports/registry/registry.db' AS registry

Re-running the above command from the parent directory gives the same result (except that the dports tree is updated, and base is already up-to-date, of course).

Rebuilding port and rerunning the command fails at the install stage with:

MacPorts/base 10:33$ make clean; ./configure && make && sudo make install

... normal build output elided ...

===> making install in src/port
< ../../doc/prefix.mtree /usr/sbin/mtree -U -d -e -p /opt/local > /dev/null
< ../../doc/base.mtree /usr/sbin/mtree -U -d -e -p /opt/local > /dev/null
/usr/bin/install -c -d -o root -g admin -m 0755 /opt/local/bin
/usr/bin/install -c -d -o root -g admin -m 0755 /opt/local/var/macports
/usr/bin/install -c -o root -g admin -m 555 port portindex portmirror /opt/local/bin/
/usr/bin/install -c -o root -g admin -m 444 port-help.tcl  /opt/local/var/macports/
cd /opt/local/bin && ln -s -f port portf
===> making install in src/programs
===> making install in src/programs/daemondo
mkdir -p build
/usr/bin/install -c -o root -g admin -m 555 build/daemondo /opt/local/bin
===> making install in tests
make[1]: Nothing to be done for `install'.
[ ! -f /opt/local/etc/macports/mp_version ] || rm -vf /opt/local/etc/macports/mp_version
/usr/bin/install -c -o root -g admin -m 444 setupenv.bash  /opt/local/share/macports/
/usr/bin/install -c -o root -g admin -m 444 macports-pubkey.pem  /opt/local/share/macports/
/usr/bin/tclsh src/upgrade_sources_conf_default.tcl "/opt/local"
/usr/bin/tclsh src/images_to_archives.tcl "/opt/local/share/macports/Tcl"
sqlite error: SQL logic error or missing database (1) while executing query: COMMIT
    while executing
"registry::open $db_path"
    (procedure "mportinit" line 578)
    invoked from within
"mportinit ui_options"
    (file "src/images_to_archives.tcl" line 18)
make: *** [install] Error 1

which I would guess is the same error (failure to open registry).

MacPorts/base last updated and port built within the week. MacPorts/dports updated and upgrades successfully accomplished two days ago. Since then until today I have executed svn up; port -v sync && port outdated several times successfully (with port outdated showing no relevant upgrades.

At this point I can't even run "port version". Time to switch to homebrew, I guess.

Mac OS X 10.5.8 / MacBook Pro (Intel Core Duo, purchased ca. Jan 2008)

Change History (3)

comment:1 Changed 10 years ago by yaseppochi (Stephen J. Turnbull)

Sorry about the Component and Owner entries, but I can't change them now.

comment:2 Changed 10 years ago by danielluke (Daniel J. Luke)

Component: portsbase

I believe you just have to use 'sudo' before running the command (because your sqlite registry.db is owned by root and it needs to run recovery). I know there has been some work on base/ to make the error message more informative, but I haven't run trunk for quite some time, so I can't be certain that your specific case is one that has already been addressed or not.

No one here gets paid for you to use the software, so we aren't going to be motivated by your threat to switch to some other software (which may work better for you, or may have other bugs that end up irritating you).

comment:3 Changed 10 years ago by pixilla (Bradley Giesbrecht)

Resolution: duplicate
Status: newclosed
Note: See TracTickets for help on using tickets.