Hello, I think this is a rather common issue but I could not find the answer myself. My receipts database is crashed due to canceling a "port -f upgrade outdated" inadvertently. I found a nice script in trac that seems to deal with this situation - it is called repairfilemap.tcl, but unhappily it does not play nice with the current version of macports. There probably has to be some function inside macports that can reconstruct the information of installed software be- cause all data is still there inside the tree structure and it would probably safe me some Gigabytes of downloads and many hours of compile time because I have archive mode set active. I already tried to remove the file_map.db from /opt/local/var/db/dports/receipts/, hoping it would be rebuilt automagically upon issuing the next port command but no, it did not! Damn me. How did it come to this situation? When I had only a limited number of ports installed, I used to update outdated ports by resolving dependencies manually, uninstalling dependents, upgrading, then reinstalling dependents manually again. This tends to become impossible with such ports as zlib, freetype or openssl sooner then later. Deactivating depen- dents is for uninstalling deps and uninstalling inactive ports does not work either giving the old version number only without variants. Putting everything together manually is errorprone and tedious. port -R upgrade xyz was not capable to run updates in a sensible order as well. Actually, I dont want to update all installed ports always, but I came to a point where I tried to do so, forcing upgrades but forgetting to make this recursive. This took hours and messed up everthing. This is where I stopped it. Now I just want all my archived ports reinstalled or even better the database reconstructed. using port -b install all did not help, and as port installed does not list any ports as installed any more, targets such as unarchive installed or inactive does not help either. Any help appreciated, Christian
Hello, I posted this question yesterday, but maybe it was more detailed as needed. I try to explain it with less words: [cvoelker:~] cvoelker% port installed Error: port installed failed: Registry error: zlib 1.2.3_1 not registered as installed. No ports are installed. I cant agree with this entirely: [cvoelker:~] cvoelker% sudo du -h -d 0 /opt 4.2G /opt I believe that this file is broken: /opt/local/var/db/dports/receipts/ /opt/local/var/db/dports/ tmp_from_receipts/file_map.db /opt/local/etc/ports/ports.conf contains these lines among others: portdbpath /opt/local/var/db/dports portdbformat flat portinstalltype image portarchivemode yes portarchivetype tbz2 In short, all information required to recreate the database is there, all the software I use is there and works fine, only issue is that I cant maintain and upgrade installed ports any longer using macports. How to recover from this situation? Is there any flag I might change to cause port to build it again from scratch? Is there a working script that does this for me (there is one from 2003 that does not work with the current version of macports)? Is there any other way to reinstall all archived software, avoiding download and built times? Do I really have to rm -R /opt/local/ and start over? Thanks for any suggestions, Christian
participants (1)
-
Christian Voelker