Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#30611 closed defect (wontfix)

inconsistent flat receipt cannot be converted to sqlite

Reported by: micrology Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: base Version: 1.9.2
Keywords: Cc:
Port:

Description

Trying to see what needed to be upgraded, I used sudo port outdated, which failed. I repeated the command with the debug flag and got the following output. What should I do next?

sudo port -d outdated
Password:
Warning: Converting your registry to sqlite format, this might take a while...
DEBUG: /Library/LaunchDaemons/org.macports.apache2.plist is being used by another port
    while executing
"$regref activate $props(imagefiles) $props(files)"
    invoked from within
"registry::write {
        set regref [registry::entry create $props(name) $props(version) $props(revision) $props(variants) $props(epoch)]
        $re..."
    (procedure "receipt_sqlite::create_entry_l" line 3)
    invoked from within
"receipt_sqlite::create_entry_l $proplist"
    (procedure "registry::convert_to_sqlite" line 62)
    invoked from within
"registry::convert_to_sqlite"
Failed to convert your registry to sqlite!
    while executing
"error "Failed to convert your registry to sqlite!""
    (procedure "mportinit" line 550)
    invoked from within
"mportinit ui_options global_options global_variations"
Error: /opt/local/bin/port: Failed to initialize MacPorts, Failed to convert your registry to sqlite!

Change History (4)

comment:1 Changed 13 years ago by micrology

Cc: n.gilbert@… added

Cc Me!

comment:2 Changed 13 years ago by mf2k (Frank Schima)

Cc: n.gilbert@… removed

The reporter is automatically Cc'ed.

comment:3 Changed 13 years ago by jmroot (Joshua Root)

Resolution: wontfix
Status: newclosed
Summary: MacPorts 1.9.2. Snow Leopard Failed to convert your registry to sqlite!inconsistent flat receipt cannot be converted to sqlite

Your receipts contain inconsistent information. Specifically, two active ports claim to have installed the same file. There isn't really any way to resolve this automatically.

You probably need to switch back to portdbformat flat, uninstall one of the ports in question, then try converting to sqlite again. Ask on the mailing list if you need more help.

comment:4 in reply to:  description Changed 13 years ago by someuser12

Maybe this can be helpful to you: you can modify the file /opt/local/share/macports/Tcl/registry2.0/registry.tcl so that it displays each port it is converting to the new registry format. Then you will know the name of the port it was processing when it stops. Maybe you can then remove the receipt.bz2 file of the port (in /opt/local/var/macports/receipts/portname/version/).

To do so, look for the following lines in /opt/local/share/macports/Tcl/registry2.0/registry.tcl and modify them (using an editor with the administrator's rights):

proc convert_to_sqlite {} {
    set ilist [receipt_flat::installed "" ""]

    foreach installed $ilist {
        set iname [lindex $installed 0]

Then add the following line just after the line with foreach...:

        ui_warn "Converting $installed"
Note: See TracTickets for help on using tickets.