Here is a patch that add support support for a reslotting command to /usr/portage/profile/updates files. I suggest this patch as a solution to several issues I've noted on my box, and that I've already somehow reported in a recent post on gentoo-dev mailing list: http://article.gmane.org/gmane.linux.gentoo.devel/11630 To summarize: 1) old unslotted package will never get cleaned. 2) there is from time to time some reslottings in the tree when new slots are not really needed, often for cosmetic purpose. But each time a maintainer decide that "2" sounds better than "2.0", the user gets a ghost package in its db that will never get cleaned. 3) there are some real slot bugs in portage, like bug #26460, and currently no clean way to solve them. I think all this issues are somehow blocking for deeper improvements like the Masatomo "update in slots" patch (bug #4698), which currently produce strange results on a messy db. The following patch allows to explicit some reslottings in portage updates. In an update file, the command "slot >=foo/bar-0.9 <foo/bar-1.9 1" will force the SLOT files of installed foo/bar packages in versions between 0.9 and 1.9 to the value "1". This would allow to correct the above three types of issues: 1) we could generate once for all an update file for the whole tree, this is very scriptable. Sure, it would be a huge update, but it would only have to be applied once to get ride of all this old unslotted packages. 2) when a maintainer decide to change slot "2.0" into slot "2", then he should also add "slot >=foo/bar-x.x.x <=foo/bar-y.y.y 2", with x.x.x being the first slot 2.0 version that has ever exist in portage tree and y.y.y being the last one, to the current update file, so that users' package db will reflect his mind after the next sync. 3) if you take the example of the above cited bug, it would be easy to fix it by adding a "slot sys-kernel/linux-headers sys-kernel/linux-headers 0" entry to an update (plus definitly fixing all ebuilds to slot 0). I also think this extension of the updates files is backward compatible because old portage versions will ignore the commands it doesn't know. Reproducible: Always Steps to Reproduce:
Created attachment 17091 [details, diff] slot_updates.patch This patch is against portage.py from portage-2.0.49-r3.
I didn't know this bug and I made a patch on bug 32526. And the patch I made is included in the latest portage which doesn't exist in portage tree yet. I just compared 2 patches. They are very alike :) My patch would also fix 3 issues you showed here. I'm sorry to not find this bug before I made patch. If you are ok, I'll close this bug. Thanks, Masatomo
Sure you can close this bug :) What is important is that the feature made it into portage, but I don't care about which patch has been used... (and mine is probably less complete, and is also outdated) Thanks for your work, TGL.
OK :) *** This bug has been marked as a duplicate of 32526 ***