I had $etcat -v gal [ Results for search key : gal ] [ Candidate applications found : 7 ] Only printing found installed programs. * gnome-extra/gal : [ ] 0.24 (0) [ I] 1.99.10 (2) [ ] 1.99.11 (2) [ ~ ] 2.1.6 (3) OVERLAY [ ~ ] 2.1.7 (3) OVERLAY [ ~ ] 2.1.8 (3) OVERLAY [ ~I] 2.1.9 (3) OVERLAY I then did $ebuild /usr/portage/gnome-extra/gal/gal-1.99.11.ebuild merge which worked fine. (It didn't work doing "emerge -u" or something lika that, but that is another issue.) $ emerge -pv prune gal >>> These are the packages that I would unmerge: gnome-extra/gal selected: 1.99.10 2.1.9 protected: 1.99.11 omitted: none >>> 'Selected' packages are slated for removal. >>> 'Protected' and 'omitted' packages will not be removed. Reproducible: Didn't try Steps to Reproduce: $ emerge prune gal Actual Results: gnome-extra/gal selected: 1.99.10 2.1.9 protected: 1.99.11 omitted: none >>> 'Selected' packages are slated for removal. >>> 'Protected' and 'omitted' packages will not be removed. >>> Waiting 5 seconds before starting... >>> (Control-C to abort)... >>> Unmerging in: 5 4 3 2 1 >>> Unmerging gnome-extra/gal-1.99.10... No package files given... Grabbing a set. <<< obj /usr/share/locale/zh_TW/LC_MESSAGES/gal-1.99.10.mo ....and then later it just continued with removing gal-2.1.9!.... --- !targe sym /usr/lib/libgal-a11y-2.0.so --- !targe sym /usr/lib/libgal-2.0.so >>> Updating Scrollkeeper >>> Unmerging gnome-extra/gal-2.1.9... No package files given... Grabbing a set. <<< obj /usr/share/locale/zh_TW/LC_MESSAGES/gal-2.2.mo <<< obj /usr/share/locale/zh_CN/LC_MESSAGES/gal-2.2.mo ... So now I have: $etcat -v gal [ Results for search key : gal ] [ Candidate applications found : 7 ] Only printing found installed programs. * gnome-extra/gal : [ ] 0.24 (0) [ ] 1.99.10 (2) [ I] 1.99.11 (2) [ ~ ] 2.1.6 (3) OVERLAY [ ~ ] 2.1.7 (3) OVERLAY [ ~ ] 2.1.8 (3) OVERLAY [ ~ ] 2.1.9 (3) OVERLAY Expected Results: Only gal-1.99.10 should have been removed since only SLOT 2 had multiple instances installed. $etcat -v portage [ Results for search key : portage ] [ Candidate applications found : 6 ] Only printing found installed programs. * sys-apps/portage : [ ] 2.0.50-r1 (0) OVERLAY [ ] 2.0.50-r6 (0) [ I] 2.0.50-r7 (0) [M ] 2.0.51_pre7 (0) [M ] 2.0.51_pre9 (0) [M ] 2.0.51_pre10 (0)
Only now I saw the 2.1.9 besides 1.99.10 in the message from 'emerge prune'. Well the behaviour is still not correct, but the "wihout asking" in the summary really wasn't true. And I think it's strange that the questions isn't asked independently.
Prune doesn't handle slots... nor can you specify them yet. This will be handled later when slot specification is possible.
Then change the documentation! From the man page: prune (-P) WARNING: This action can remove important packages! Removes all but the latest versions of matching packages. If there are mul- tiple SLOTs for a package, it leaves the latest version in each SLOT.
Docs changed in wait of us actually fixing the code.
Bug has been fixed and released in stable portages on or before 2.0.51-r2