Opened 15 years ago

Closed 15 years ago

#24880 closed defect (fixed)

Registry conversion fails after force activation has been used in the flat format

Reported by: raimue (Rainer Müller) Owned by: macports-tickets@…
Priority: Normal Milestone: MacPorts 1.9.0
Component: base Version: 1.8.99
Keywords: Cc: jmroot (Joshua Root)
Port:

Description

There is a problem with the registry conversion from flat to sqlite when ports have been force activated in the flat registry.

I've setup a prefix /opt/regupgrade to reproduce this problem. The port foo and bar (same Portfile, different names) have been installed which just touches ${prefix}/foo. Force activation has been used to have both active at the same time.

$ port contents foo bar
Port foo contains:
  /opt/regupgrade/foo.mp_1273772338
Port bar contains:
  /opt/regupgrade/foo

Now switching portdbformat to sqlite and then triggering the conversion:

$ sudo port -d info
Warning: Converting your registry to sqlite format, this might take a while...
DEBUG: /opt/regupgrade/foo 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 61)
    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 543)
    invoked from within
"mportinit ui_options global_options global_variations"
Error: /opt/regupgrade/bin/port: Failed to initialize MacPorts, Failed to convert your registry to sqlite!

Originally reported by ricci@/gh1 on IRC.

Attachments (1)

reg_entry_activate.diff (710 bytes) - added by jmroot (Joshua Root) 15 years ago.

Download all attachments as: .zip

Change History (2)

Changed 15 years ago by jmroot (Joshua Root)

Attachment: reg_entry_activate.diff added

comment:1 Changed 15 years ago by jmroot (Joshua Root)

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