Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am stuck upgrading my MacPorts. I seem to have a registry issue. I filed a ticket here. When I do sudo port upgrade outdated I get these errors:

DEBUG: Executing org.macports.uninstall (iso-codes)
--->  Unable to uninstall iso-codes @3.34_0, the following ports depend on it:
Error: org.macports.uninstall for port iso-codes returned: an invalid entry was passed
DEBUG: Error code: registry::invalid
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: targets not executed for iso-codes: org.macports.uninstall
Please see the log file for port iso-codes for details:
    /opt/local/var/macports/logs/_opt_local_var_macports_registry_portfiles_iso-codes_3.34_0/iso-codes/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 iso-codes @3.34_0
--->  Unable to uninstall iso-codes @3.34_0, 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 iso-codes 3.34_0 failed: an invalid entry was passed
To report a bug, follow the instructions in the guide:
    http://guide.macports.org/#project.tickets

Another MacPorts user had the same issue and it seems he did not find an answer. It seems to be an error related to the registry - sqlite database .I have been trying to find out how I can solve this issue. I have been unsuccessful. Without a fix I cannot move onEven uninstalling all ports to do a new clean installation does not work.

How can I

  • fix this issue
  • if it cannot be fixed reinstall MacPorts when uninstalling ports is impossible
share|improve this question
add comment

2 Answers

A digest of the solution proposed at uninstall failure: "an invalid entry was passed":

Step 1: Open the Macports registry with sqlite3:

sudo sqlite3 /opt/local/var/macports/registry

Step 2: Find the problematic ports:

sqlite> SELECT * FROM dependencies WHERE id NOT IN (SELECT DISTINCT id FROM ports);
618|apr|
618|expat|
618|libiconv|
618|db46|
618|sqlite3|

Step 3: Remove the offending rows:

DELETE FROM dependencies WHERE id = 618;
DELETE FROM files WHERE id = 618;

Step 4: Fix your instalation

sudo port selfupdate 
sudo port upgrade outdated

Note that the id varies per installation!

share|improve this answer
    
thanks a lot! it works! –  bn. Aug 8 '13 at 13:04
add comment
up vote 1 down vote accepted

Issue was resolved thanks to people at MacPorts. See track ticket here. There was an issue with the MacPorts registry. Somehow the SQLite database had some rogue dependency leftovers that had to be removed.I ran the sqlite query

sqlite> UPDATE dependencies SET id = 2323 WHERE id = 1407;

to replace the id of the missing port in the database with the id used by pkgconfig. It worked like a charm. I then could do

sudo upgrade outdated

again and continue upgrading all my outdated ports and repair the broken ones. All good now!

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.