registry malformed after a kernel panic interrupted port build
Arno Hautala
arno at alum.wpi.edu
Thu Jun 26 21:43:30 PDT 2014
Well, I may have fixed things for myself.
With a few tips from this page: [1] I first tried dumping the registry
and restoring to a new database. That got me a valid sqlite database,
but it seemed to be missing some table definitions.
So then I restored that old backup. That seemed to get things working,
but completing my port upgrades yielded several files that were
installed but not owned by a port. I'm assuming these were the ports
that had been upgraded before the database went south. I forced the
activation on those and was able to get everything installed.
So far, things are looking good. Is there a reason that there isn't a
journal for the registry.db? Or is there and I ran into some other
issue?
[1]: http://www.dosomethinghere.com/2013/02/20/fixing-the-sqlite-error-the-database-disk-image-is-malformed/
On Thu, Jun 26, 2014 at 11:51 PM, Arno Hautala <arno at alum.wpi.edu> wrote:
> I just upgraded to 2.3.1 and experienced a kernel panic while later
> upgrading ports. I'm fairly certain the panic was unrelated.
>
> Anyway, once booted I went to finish the port upgrades and found my
> registry.db is now corrupt.
>
>> sqlite error: database disk image is malformed (11) while executing query: ATTACH DATABASE '/opt/local/var/macports/registry/registry.db' AS registry
>> while executing
>> "registry::open $db_path"
>> (procedure "mportinit" line 610)
>> invoked from within
>> "mportinit ui_options global_options global_variations"
>> Error: /opt/local/bin/port: Failed to initialize MacPorts, sqlite error: database disk image is malformed (11) while executing query: ATTACH DATABASE '/opt/local/var/macports/registry/registry.db' AS registry
>
> I did find tickets 32686 [1] and 36126 [2], but neither seems to have
> a solution. One reply suggested that restoring from a backup may work
> and I do have such a backup from a few days ago (probably the last
> time I touched the port command).
>
> Will restoring from this backup leave things out of sync? I did
> successfully upgrade a few ports before the panic, so I imagine some
> port versions and installed files won't match. Is a reinstall of all
> ports in my future?
>
> Thanks for any tips.
>
> --Arno
>
> [1]: https://trac.macports.org/ticket/32686
> [2]: https://trac.macports.org/ticket/36126
>
> --
> arno s hautala /-| arno at alum.wpi.edu
>
> pgp b2c9d448
--
arno s hautala /-| arno at alum.wpi.edu
pgp b2c9d448
More information about the macports-users
mailing list