Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 53505 - 'emerge prune' removed latest package
Summary: 'emerge prune' removed latest package
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2004-06-10 04:08 UTC by Mårten Svantesson
Modified: 2004-10-22 08:48 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mårten Svantesson 2004-06-10 04:08:47 UTC
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)
Comment 1 Mårten Svantesson 2004-06-10 04:13:21 UTC
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.
Comment 2 Nicholas Jones (RETIRED) gentoo-dev 2004-06-21 03:32:35 UTC
Prune doesn't handle slots... nor can you specify them yet.
This will be handled later when slot specification is possible.
Comment 3 Mårten Svantesson 2004-06-21 04:40:09 UTC
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. 
Comment 4 Nicholas Jones (RETIRED) gentoo-dev 2004-10-09 21:38:52 UTC
Docs changed in wait of us actually fixing the code.
Comment 5 Nicholas Jones (RETIRED) gentoo-dev 2004-10-22 08:48:07 UTC
Bug has been fixed and released in stable portages on or before 2.0.51-r2