How to recover a corrupt darwinports db

Bob Harris me13013 at gmail.com
Wed Feb 21 06:25:34 PST 2007


I wrote:
>> ... hoping that this would force darwin ports to redownload and
>> rebuild on my next installation attempt ...

and Elias replied:
> to make sure the port is no longer "installed":
>     sudo port uninstall -f hugs98
> to make sure it is redownloaded (whatever reason for):
>	sudo port clean --all hugs98

Those fail for me:

$ sudo port -d uninstall -f hugs98DEBUG: Registry error: hugs98 not
registered as installed.
    while executing
"registry::installed $portname $v"
    (procedure "portuninstall::uninstall" line 5)
    invoked from within
"portuninstall::uninstall $portname [composite_version $portversion
[array get variations]] [array get options]"
Error: port uninstall failed: Registry error: hugs98 not registered as
installed.

sudo port -d clean --all hugs98 gives me an equivalent message.

So, it says it's "not registered as installed".  Yet if I try to
install it, it fails this way:

$ sudo port -d install hugs98
DEBUG: Found port in
file:///opt/local/var/db/dports/sources/rsync.rsync.darwinports.org_dpupdate_dports/lang/hugs98
DEBUG: Changing to port directory:
/opt/local/var/db/dports/sources/rsync.rsync.darwinports.org_dpupdate_dports/lang/hugs98
DEBUG: couldn't change working directory to
"/opt/local/var/db/dports/sources/rsync.rsync.darwinports.org_dpupdate_dports/lang/hugs98":
no such file or directory
    while executing
"cd $portdir"
    (procedure "dportopen" line 28)
    invoked from within
"dportopen $porturl [array get options] [array get variations]"
Error: Unable to open port: couldn't change working directory to
"/opt/local/var/db/dports/sources/rsync.rsync.darwinports.org_dpupdate_dports/lang/hugs98":
no such file or directory

The directory /opt/local/var/db/dports/.../lang/hugs98 doesn't exist
(that's one of the directories I foolishly deleted).  Darwinports is
obviously getting that info from some other file.  If I could remove
that info from whatever file that is, perhaps I would be OK, but am
not sure where it is and I don't want to spread the corruption further
by making additional stupid mistakes.

I should mention that I did the darwinports selfupdate yesterday
(version 1.320) before my first attempt to fetch/install hugs98.  And
I have successfully used darwinports on other occasions.  I think I
have darwinports set up properly in general, it's just its db for
hugs98 that I've managed to screw up.

Thanks,
Bob H



More information about the macports-users mailing list