#35281 closed defect (duplicate)
Registry consistency is broken
Reported by: | vgrebenschikov | Owned by: | macports-tickets@… |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | base | Version: | 2.1.1 |
Keywords: | Cc: | ||
Port: |
Description (last modified by ryandesign (Ryan Carsten Schmidt))
$ port -d uninstall inactive DEBUG: Executing org.macports.uninstall (m4) ---> Unable to uninstall m4 @1.4.16_0, the following ports depend on it: Error: org.macports.uninstall for port m4 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 m4: org.macports.uninstall Please see the log file for port m4 for details: /opt/local/var/macports/logs/_opt_local_var_macports_registry_portfiles_m4_1.4.16_0/m4/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 m4 @1.4.16_0 ---> Unable to uninstall m4 @1.4.16_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 m4 1.4.16_0 failed: an invalid entry was passed To report a bug, follow the instructions in the guide: http://guide.macports.org/#project.tickets $ port rdependents m4 an invalid entry was passed while executing "$dependent name" (procedure "receipt_sqlite::list_dependents" line 18) invoked from within "${macports::registry.format}::list_dependents $name $version $revision $variants" (procedure "registry::list_dependents" line 3) invoked from within "registry::list_dependents $portname $iversion $irevision $ivariants" ("uplevel" body line 27) invoked from within "uplevel 1 $block" (procedure "foreachport" line 20) invoked from within "foreachport $portlist { set composite_version [composite_version $portversion [array get variations]] if { [catch {set ilist [registry..." (procedure "action_dependents" line 10) invoked from within "$action_proc $action $portlist [array get global_options]" (procedure "process_cmd" line 95) invoked from within "process_cmd $remaining_args" invoked from within "if { [llength $remaining_args] > 0 } { # If there are remaining arguments, process those as a command set exit_status [process_cmd $remaining..." (file "/opt/local/bin/port" line 4784) $
Attachments (1)
Change History (11)
comment:1 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)
Component: | ports → base |
---|---|
Description: | modified (diff) |
Changed 12 years ago by vgrebenschikov
Attachment: | ports.registry.dump.bzip2 added |
---|
comment:2 Changed 12 years ago by vgrebenschikov
So, now I can't do updates for may ports tree :/
$ uname -a Darwin vbook.fbsd.ru 12.0.0 Darwin Kernel Version 12.0.0: Sun Jun 24 23:00:16 PDT 2012; root:xnu-2050.7.9~1/RELEASE_X86_64 x86_64
Also, I am on Mountain Lion with Xcode45-DP2 (build ports fine), but shows error (warning?), suggested changed (xcode-select -switch) does not help
Error: No valid Xcode installation is properly selected. Error: Please use xcode-select to select an Xcode installation: Error: sudo xcode-select -switch /Applications/Development/Xcode45-DP2.app/Contents/Developer # version 4.5
comment:3 Changed 12 years ago by vgrebenschikov
Similar error when I try to upgrade perl, due to help2man:
port rdependents help2man an invalid entry was passed while executing "$dependent name" (procedure "receipt_sqlite::list_dependents" line 18) invoked from within "${macports::registry.format}::list_dependents $name $version $revision $variants" (procedure "registry::list_dependents" line 3) invoked from within "registry::list_dependents $portname $iversion $irevision $ivariants" ("uplevel" body line 27) invoked from within "uplevel 1 $block" (procedure "foreachport" line 20) invoked from within "foreachport $portlist { set composite_version [composite_version $portversion [array get variations]] if { [catch {set ilist [registry..." (procedure "action_dependents" line 10) invoked from within "$action_proc $action $portlist [array get global_options]" (procedure "process_cmd" line 95) invoked from within "process_cmd $remaining_args" invoked from within "if { [llength $remaining_args] > 0 } { # If there are remaining arguments, process those as a command set exit_status [process_cmd $remaining..." (file "/opt/local/bin/port" line 4784)
comment:4 Changed 12 years ago by vgrebenschikov
About history - I did not do something special, just upgrade ports tree time to time.
After upgrade on mountain lion I have faced with problem that mod_php from ports does not loaded into new apache (from base system). Then I've tried to upgrade it, it builds lots of ports and finally stuck with m4 problem and/or help2man problem.
Suggestion how to fix database is very appreciated.
comment:5 Changed 12 years ago by neverpanic (Clemens Lang)
Resolution: | → duplicate |
---|---|
Status: | new → closed |
comment:6 Changed 12 years ago by vgrebenschikov
Ehh, I've found a way, but now it hard to do this through command line due to unknown collation sequence:
sqlite> SELECT id,name,version,variants,date,requested,state,installtype FROM ports WHERE name LIKE 'm4'; Error: no such collation sequence: VERSION
comment:7 Changed 12 years ago by neverpanic (Clemens Lang)
Locate macports.sqlext (it should be somewhere below /opt/local/var/macports/sources/
) and run
.load /path/to/macports.sqlext
in the SQLite shell.
comment:8 Changed 12 years ago by vgrebenschikov
Thanks, now it works
sqlite3 /opt/local/var/macports/registry/registry.db SQLite version 3.7.11 2012-03-20 11:35:50 Enter ".help" for instructions Enter SQL statements terminated with a ";" sqlite> .load /opt/local/var/macports//sources/rsync.macports.org/release/base/src/cregistry/macports.sqlext sqlite> SELECT id,name,version,variants,date,requested,state,installtype FROM ports WHERE name LIKE 'm4'; 11|m4|1.4.14||1282054187|0|imaged|image 238|m4|1.4.15||1286454187|0|imaged|image 411|m4|1.4.15||1291384065|0|imaged|image 1496|m4|1.4.16||1343051173|0|installed|image sqlite>
I've fixed database, what is strange, in my case fixing query was:
UPDATE dependencies SET id = 686 WHERE id = 1;
same id=686 as in #34482, probably it is magic number?
comment:9 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)
Please remember to use WikiFormatting when writing in Trac. I have fixed your formatting in the comments above.
Please remember to use WikiFormatting.
Can you provide any background about how you got into this situation? The registry is of course not supposed to become corrupt, and it's hard without additional information from you to figure out how it became that way on your system.