Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How to stop depclean from cleaning vanilla-sources ?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
pa4wdh
l33t
l33t


Joined: 16 Dec 2005
Posts: 812

PostPosted: Thu Dec 04, 2008 1:58 am    Post subject: How to stop depclean from cleaning vanilla-sources ? Reply with quote

Hi All,

Every once in a while i run emerge -p --depclean to see what might be removed from my system to keep it clean. I use vanilla-sources for my kernel, and because of the nature of the package (slotted) i always have multiple versions installed.
Now depclean always only wants to keep the latest version, but besides that i usually agree with depclean's plans for removals (for the other packages).

My question is: Is there a way to prevent depclean from removing any version of vanilla sources without constantly updating world to include the new version ?

I have one idea about this, but i don't know if it's possible this way:
As far as i can see, ebuilds seem to be shell scripts which define a few specified functions. If that is true, that isn't is possible to create some kind of "virtual" which (by means of scripting) depends on all installed versions ? The source for this information could be the /usr/src/linux directory or /var/db/pkg. As far as i understand depclean's functioning, a package depending on the vanilla-sources will effectively stop it from removing it.
Is this worth a try ?

Best regards,
pa4wdh

PS: Same problem is valid for GCC 3.x and 4.x, but since that doesn't change that much it's easier to handle :-)
_________________
The gentoo way of bringing peace to the world:
USE="-war" emerge --newuse @world

My shared code repository: https://code.pa4wdh.nl.eu.org
Music, Free as in Freedom: https://www.jamendo.com
Back to top
View user's profile Send private message
zyko
l33t
l33t


Joined: 01 Jun 2008
Posts: 620
Location: Munich, Germany

PostPosted: Thu Dec 04, 2008 2:02 pm    Post subject: Reply with quote

I think you can add multiple (slotted) versions to your world file, like so:

Code:
sys-devel/gcc:4.3
sys-devel/gcc:3.4
sys-kernel/vanilla-sources:2.6.27.7
sys-kernel/vanilla-sources:2.6.26.8
sys-kernel/vanilla-sources:2.6.25.20


To find out about an installed package's slot logic, you can look in /var/db/pkg/package-category/package-name/SLOT.
Back to top
View user's profile Send private message
pa4wdh
l33t
l33t


Joined: 16 Dec 2005
Posts: 812

PostPosted: Thu Dec 04, 2008 8:49 pm    Post subject: Reply with quote

HI Zyko,

Thanks for your reply. I'm aware of the solution you gave, but that's exactly what i'm trying to avoid doing :-) I don't want to edit the world file, i just want every version (or slot) that has been installed to stay there until i unmerge it.

Unfortunately i'm not familiar with writing ebuilds to see if my proposed solution would work. I know the information should be here somewhere, so ill just search for it :-)

Best regards,
pa4wdh
_________________
The gentoo way of bringing peace to the world:
USE="-war" emerge --newuse @world

My shared code repository: https://code.pa4wdh.nl.eu.org
Music, Free as in Freedom: https://www.jamendo.com
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum