emaint in 2.1_pre2 has a few problems. I also disagree with some of the things it does. First off, the helpful message for how to fix masking problems is printed improperly due to errors being a list and += acting oddly with strings. Secondly, the dbapi.match call to find masked packages is broken, erronously given a match-visible even though that is implied with match, I assume that was a typo for xmatch ;) Thirdly and majorly, packages in world with no ebuilds, or only masked ebuilds are NOT purely indicative of a corrupt world file. They should NOT removed ( by default anyway ) from the world file. So this was changed also, in the patch. Obviously invalid atoms and things not installed can be easily culled. The only other class of package I can see are missing packages from the world file. These packages are. 1. Installed 2. Not in anything's DEPEND 3. Not in world These packages are currently cleaned by DEPCLEAN, so I don't see why we need to add checks here for them. I think many people will find this app helpful, but in it's current state I think it will hurt more than help as people randomly try to emaint --fix world and find that their world file was murdered by masked ebuilds and such. Especially true in the 2.1_pre2 case where all packages were reported masked ;)
Created attachment 75662 [details, diff] spacing stuff, comments, list fixes, and other things stated below.
This is what I get with portage-2.0.53. # emaint --check world Checking world for problems 'net-ftp/glftpd' has no ebuilds available # esearch glftpd * net-ftp/glftpd [ Masked ] Latest version available: 2.00 Latest version installed: 1.32 Size of downloaded files: 2,540 kB Homepage: http://www.glftpd.com/ Description: a HIGHLY configurable ftp server License: freedist >=net-ftp/glftpd-1.32-r2 in /etc/portage/package.mask (manually patched to 1.32-r2 and no intention to upgrade, as it's a PITA) emaint --fix world removes net-ftp/glftpd from world. This is apparently broken behaviour, it's still installed. :(
*** Bug 117224 has been marked as a duplicate of this bug. ***
Released in portage-2.1_pre3
*** Bug 117729 has been marked as a duplicate of this bug. ***
*** Bug 117895 has been marked as a duplicate of this bug. ***
Released in 2.1_pre4