Opened 13 years ago

Closed 12 years ago

#30847 closed defect (duplicate)

Unable to uninstall expat @2.0.1_1+universal

Reported by: essandess (Steve Smith) Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 2.0.1
Keywords: Cc: isak@…
Port: expat

Description

After upgrading to OS X Lion and running "sudo port -d selfupdate" and "sudo port -p upgrade outdated", I'm getting an error upgrading expat that prevents upgrades of several other packages:

$ sudo port -d upgrade -f expat
Password:
DEBUG: epoch: in tree: 0 installed: 0
DEBUG: expat 2.0.1_1 exists in the ports tree
DEBUG: expat 2.0.1_1 +universal is the latest installed
DEBUG: expat 2.0.1_1 +universal is active
DEBUG: Merging existing variants '+universal' into variants
DEBUG: new fully merged portvariants: universal +
DEBUG: Changing to port directory: /opt/local/var/macports/sources/rsync.macports.org/release/ports/textproc/expat
DEBUG: OS darwin/11.0.0 (Mac OS X 10.7) arch i386
DEBUG: org.macports.load registered provides 'load', a pre-existing procedure. Target override will not be provided
DEBUG: org.macports.unload registered provides 'unload', a pre-existing procedure. Target override will not be provided
DEBUG: org.macports.distfiles registered provides 'distfiles', a pre-existing procedure. Target override will not be provided
DEBUG: adding the default universal variant
DEBUG: Reading variant descriptions from /opt/local/var/macports/sources/rsync.macports.org/release/ports/_resources/port1.0/variant_descriptions.conf
DEBUG: Executing variant universal provides universal
DEBUG: platform mismatch ... upgrading!
DEBUG: Starting logging for expat
DEBUG: Skipping install (expat) since this port is already installed
DEBUG: Executing org.macports.main (expat)
DEBUG: clean phase started at Wed Aug 17 20:08:04 EDT 2011
--->  Cleaning expat
DEBUG: Executing org.macports.clean (expat)
--->  Removing work directory for expat
DEBUG: No work directory found to remove at /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_textproc_expat/expat
DEBUG: No work directory found to remove at /Users/myself/.macports/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_textproc_expat/expat
DEBUG: Removing directory: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_textproc_expat/expat
DEBUG: delete: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_textproc_expat/expat
DEBUG: Uninstalling expat 2.0.1_1+universal
DEBUG: Changing to port directory: /opt/local/var/macports/registry/portfiles/expat/2.0.1_1+universal
DEBUG: OS darwin/11.0.0 (Mac OS X 10.7) arch i386
DEBUG: org.macports.load registered provides 'load', a pre-existing procedure. Target override will not be provided
DEBUG: org.macports.unload registered provides 'unload', a pre-existing procedure. Target override will not be provided
DEBUG: org.macports.distfiles registered provides 'distfiles', a pre-existing procedure. Target override will not be provided
DEBUG: adding the default universal variant
DEBUG: Reading variant descriptions from /opt/local/var/macports/sources/rsync.macports.org/release/ports/_resources/port1.0/variant_descriptions.conf
DEBUG: Executing variant universal provides universal
DEBUG: Starting logging for expat
DEBUG: Executing org.macports.main (expat)
DEBUG: uninstall phase started at Wed Aug 17 20:08:04 EDT 2011
DEBUG: Executing org.macports.uninstall (expat)
--->  Unable to uninstall expat @2.0.1_1+universal, the following ports depend on it:
Error: Target org.macports.uninstall returned: an invalid entry was passed
DEBUG: Backtrace: an invalid entry was passed
    while executing
"$depport name"
    (procedure "registry::check_dependents" line 19)
    invoked from within
"registry::check_dependents $port ${uninstall.force} "uninstall""
    (procedure "registry_uninstall::uninstall" line 83)
    invoked from within
"registry_uninstall $subport $version $revision $portvariants [array get user_options]"
    (procedure "portuninstall::uninstall_main" line 3)
    invoked from within
"$procedure $targetname"
Warning: the following items did not execute (for expat): org.macports.uninstall
Log for expat is at: /opt/local/var/macports/logs/_opt_local_var_macports_registry_portfiles_expat_2.0.1_1+universal/expat/main.log
DEBUG: an invalid entry was passed
    while executing
"$depport name"
    (procedure "registry::check_dependents" line 19)
    invoked from within
"registry::check_dependents $port ${uninstall.force} "uninstall""
    (procedure "registry_uninstall::uninstall" line 83)
Warning: Failed to execute portfile from registry for expat @2.0.1_1+universal
--->  Unable to uninstall expat @2.0.1_1+universal, the following ports depend on it:
DEBUG: an invalid entry was passed
    while executing
"$depport name"
    (procedure "registry::check_dependents" line 19)
    invoked from within
"registry::check_dependents $port ${uninstall.force} "uninstall""
    (procedure "registry_uninstall::uninstall" line 83)
    invoked from within
"registry_uninstall::uninstall $newname $version_in_tree $revision_in_tree $portinfo(canonical_active_variants) [array get options]"
Error: Uninstall expat 2.0.1_1+universal failed: an invalid entry was passed
To report a bug, see <http://guide.macports.org/#project.tickets>

Here's the log:

$ cat /opt/local/var/macports/logs/_opt_local_var_macports_registry_portfiles_expat_2.0.1_1+universal/expat/main.log
version:1
:debug:main Executing org.macports.main (expat)
:debug:uninstall uninstall phase started at Wed Aug 17 20:12:08 EDT 2011
:debug:uninstall Executing org.macports.uninstall (expat)
:msg:uninstall --->  Unable to uninstall expat @2.0.1_1+universal, the following ports depend on it:
:error:uninstall Target org.macports.uninstall returned: an invalid entry was passed
:debug:uninstall Backtrace: an invalid entry was passed
    while executing
"$depport name"
    (procedure "registry::check_dependents" line 19)
    invoked from within
"registry::check_dependents $port ${uninstall.force} "uninstall""
    (procedure "registry_uninstall::uninstall" line 83)
    invoked from within
"registry_uninstall $subport $version $revision $portvariants [array get user_options]"
    (procedure "portuninstall::uninstall_main" line 3)
    invoked from within
"$procedure $targetname"
:info:uninstall Warning: the following items did not execute (for expat): org.macports.uninstall
:notice:uninstall Log for expat is at: /opt/local/var/macports/logs/_opt_local_var_macports_registry_portfiles_expat_2.0.1_1+universal/expat/main.log

Change History (4)

comment:1 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Sounds like there is something wrong with the port registry. I don't know what to do about that.

comment:2 Changed 13 years ago by essandess (Steve Smith)

Debugging by Google strongly suggests that this error message is generated by a call to sqlite in the file ./base/src/registry/entry.c:

            r = sqlite3_step(stmt);
            switch (r) {
                case SQLITE_ROW:
                    text = (const char*)sqlite3_column_text(stmt, 0);
                    if (text) {
                        *value = strdup(text);
                        result = 1;
                    } else {
                        reg_sqlite_error(reg->db, errPtr, query);
                    }
                    break;
                case SQLITE_DONE:
                    errPtr->code = REG_INVALID;
                    errPtr->description = "an invalid entry was passed";
                    errPtr->free = NULL;
                    break;
                case SQLITE_BUSY:
                    continue;
                default:
                    reg_sqlite_error(reg->db, errPtr, query);
                    break;
            }

Perhaps a simple rebuild of whatever macports binary uses the entry.c code will work? Anyone know how to do this without starting over from scratch?

comment:3 Changed 12 years ago by jasperfrumau@…

Did you ever find a solution for this issue? I have a similar one here: https://trac.macports.org/ticket/34482

comment:4 Changed 12 years ago by jmroot (Joshua Root)

Resolution: duplicate
Status: newclosed

Duping to #34482 since there's some analysis there.

Note: See TracTickets for help on using tickets.