The current vesion of portage has a serious bug that can leave your system in unusable state. In fact, removing the old version of a package and replacing it for a newer one is not handled in a safe way, since it may happend that you end with no version of the package installed. For example, I had version 1.0.37 of gentoolkit installed. I've updated to version 1.0.38 and I had end with no version installed. The worst of it, is that this happend to me with portage itself, so I had to reinstall it by hand (from a .tar.bz2 file) To see the problem I'm sending to you the output of emerge -b gentoolkit when gentoolkit 1.0.38 was alredy installed. As you can see, the same files that are installed, get removed after that, so you end with no file installled. Please FIX THIS SERIOUS BUG SOON or many Gentoo users will end up with a system in unsable state and will have to reinstall it from scratch. Reproducible: Always Steps to Reproduce: 1.emerge -b gentoolkit 2.(when gentoolkit is already installed) 3. Actual Results: You end up with no gentoolkit installed Expected Results: It should recompile and install gentoolkit
Created attachment 23566 [details] emerge -b gentoolkit output
try /usr/lib/portage/bin/fix-db.py or fix-db.pl and see if that fixes it.
Created attachment 23569 [details] fix-db.pl output
Created attachment 23570 [details] fix-db.py output
Using fix-db.pl and fix-db.py as suggested did NOT fix the problem. fix-db.pl ran with out errors. On the other hand fix-db.py output some anoying messages saying the counter is corrupt (I don't understand what do they mean) What are these scripts supposed to do? What is the difference between them? Is there some documentation about the portage internals? (for example: what are these counters?)
Here's my current solution. This will end up on 2.0.50's next pre. http://gentoo.twobit.net/portage/portage.py-counterfix-040111.diff
The patch in comment #6 did fixed this problem. Thank you ! I've test it against portage-2.0.50_pre12. However hunk #7 was rejected by patch
Created attachment 23650 [details] rejected hunk from patch
Now that portage-2.0.50 is stable, we can close this bug (since the bug-fix is included)