Re: [gentoo-user] Can I exclude a package from --depclean's consideration?

2009-06-12 Thread David

Paul Hartman wrote:

On Thu, Jun 11, 2009 at 11:45 AM, Mike Kazantsevmk.frag...@gmail.com wrote:
  

So, my question: Is there a way to tell depclean to never remove *any*
version of gentoo-sources?
  

That's where portage-2.2 sets find another use.
Just add following set to /usr/share/portage/config/sets.conf:

 [kernels]
 class = portage.sets.dbapi.OwnerSet
 world-candidate = False
 files = /usr/src

And append @kernels line to /var/lib/portage/world_sets
Now any installed (even with -1) kernel should be safe from ravenous
depclean.



Perfect! It does exactly what I wanted. I created sets.conf in
/etc/portage/ as Boris pointed out.

Thank you very much for your help!


  

What would I add to /etc/portage/sets.conf to exclude gcc from depclean?
thanks
-david

--
Powered by Gentoo GNU/Linux
http://linuxcrazy.com




Re: [gentoo-user] Can I exclude a package from --depclean's consideration?

2009-06-12 Thread David

Mike Kazantsev wrote:

On Fri, 12 Jun 2009 15:11:07 -0400
David da...@pythontoo.com wrote:

  

What would I add to /etc/portage/sets.conf to exclude gcc from depclean?
thanks



I'd add these to sets:

  [gcc-preserve]
  class = portage.sets.shell.CommandOutputSet
  command = /usr/local/sbin/gcc-list

This to /usr/local/sbin/gcc-list:

  #!/bin/sh
  for PKG in `ls -1 /var/db/pkg/sys-devel | grep -E '^gcc-[[:digit:].]+(-r.)?$'`
  do echo '=sys-devel/'${i}
  done

And '@gcc-preserve' to /var/lib/portage/world_sets


Alternatively, you can define set as files in /usr/libexec/gcc:

  [gcc-preserve]
  class = portage.sets.dbapi.OwnerSet
  world-candidate = False
  files = /usr/libexec/gcc

Looks simplier, but somewhat dirty and probably a bit slower.

  

Thanks Mike,
I was hoping it was as simple as the kernel-sources example. I got 
caught a few months back by dep cleaning gcc :( I did not want to 
rebuild everything with the latest gcc at that time but my hand was 
forced at that point.

-david

--
Powered by Gentoo GNU/Linux
http://linuxcrazy.com




[gentoo-user] Can I exclude a package from --depclean's consideration?

2009-06-11 Thread Paul Hartman
emerge --depclean always wants to remove all but the most recent
version of gentoo-sources. I read the manpage and can't figure out how
to exclude this package. The manpage states:

Packages that are part of the world set will always be kept.

However, if I have sys-kernel/gentoo-sources in world, it still wants
to remove all but the most recent version of that package, which I
think is the correct behavior... just not what I desire.

For now I am working around this by placing version-specific package
atoms into my world file, but I am just curious if there is a
different way of masking them from depclean -- one that does not
require me to manually edit my world file every time a new kernel
revision is installed.

So, my question: Is there a way to tell depclean to never remove *any*
version of gentoo-sources?

Thanks.



Re: [gentoo-user] Can I exclude a package from --depclean's consideration?

2009-06-11 Thread Mike Kazantsev
On Thu, 11 Jun 2009 11:22:41 -0500
Paul Hartman paul.hartman+gen...@gmail.com wrote:

 emerge --depclean always wants to remove all but the most recent
 version of gentoo-sources. I read the manpage and can't figure out how
 to exclude this package. The manpage states:
 
 Packages that are part of the world set will always be kept.
 
 However, if I have sys-kernel/gentoo-sources in world, it still wants
 to remove all but the most recent version of that package, which I
 think is the correct behavior... just not what I desire.

It's kinda case of italian strike - doing the job to the letter ;)


 So, my question: Is there a way to tell depclean to never remove *any*
 version of gentoo-sources?

That's where portage-2.2 sets find another use.
Just add following set to /usr/share/portage/config/sets.conf:

  [kernels]
  class = portage.sets.dbapi.OwnerSet
  world-candidate = False
  files = /usr/src

And append @kernels line to /var/lib/portage/world_sets
Now any installed (even with -1) kernel should be safe from ravenous
depclean.


-- 
Mike Kazantsev // fraggod.net


signature.asc
Description: PGP signature


Re: [gentoo-user] Can I exclude a package from --depclean's consideration?

2009-06-11 Thread Boris Fersing
On Thu, Jun 11, 2009 at 18:45, Mike Kazantsevmk.frag...@gmail.com wrote:
 On Thu, 11 Jun 2009 11:22:41 -0500
 Paul Hartman paul.hartman+gen...@gmail.com wrote:

 emerge --depclean always wants to remove all but the most recent
 version of gentoo-sources. I read the manpage and can't figure out how
 to exclude this package. The manpage states:

 Packages that are part of the world set will always be kept.

 However, if I have sys-kernel/gentoo-sources in world, it still wants
 to remove all but the most recent version of that package, which I
 think is the correct behavior... just not what I desire.

 It's kinda case of italian strike - doing the job to the letter ;)


 So, my question: Is there a way to tell depclean to never remove *any*
 version of gentoo-sources?

 That's where portage-2.2 sets find another use.
 Just add following set to /usr/share/portage/config/sets.conf:

  [kernels]
  class = portage.sets.dbapi.OwnerSet
  world-candidate = False
  files = /usr/src

Hi,

did you read the first lines of this file ?

# WARNING: default set configuration, DO NOT CHANGE.
# If you want to change anything redefine the relevant section in
# /etc/portage/sets.conf. Any changes to this file will be lost on the next
# portage update, and configuration errors here might upset portage in
# unexpected ways.

Please make all the changes in /etc/portage/

regards,

Boris

 And append @kernels line to /var/lib/portage/world_sets
 Now any installed (even with -1) kernel should be safe from ravenous
 depclean.


 --
 Mike Kazantsev // fraggod.net




-- 
42



Re: [gentoo-user] Can I exclude a package from --depclean's consideration?

2009-06-11 Thread Mike Kazantsev
On Thu, 11 Jun 2009 19:03:31 +0200
Boris Fersing kernelsen...@gentoo.org wrote:

 did you read the first lines of this file ?
 
 # WARNING: default set configuration, DO NOT CHANGE.
 # If you want to change anything redefine the relevant section in
 # /etc/portage/sets.conf. Any changes to this file will be lost on the next
 # portage update, and configuration errors here might upset portage in
 # unexpected ways.

Guess it's some kind of mind-habit of avoiding uppercase text in the
head of important configuration files, sorry.

-- 
Mike Kazantsev // fraggod.net


signature.asc
Description: PGP signature


Re: [gentoo-user] Can I exclude a package from --depclean's consideration?

2009-06-11 Thread Paul Hartman
On Thu, Jun 11, 2009 at 11:45 AM, Mike Kazantsevmk.frag...@gmail.com wrote:
 So, my question: Is there a way to tell depclean to never remove *any*
 version of gentoo-sources?

 That's where portage-2.2 sets find another use.
 Just add following set to /usr/share/portage/config/sets.conf:

  [kernels]
  class = portage.sets.dbapi.OwnerSet
  world-candidate = False
  files = /usr/src

 And append @kernels line to /var/lib/portage/world_sets
 Now any installed (even with -1) kernel should be safe from ravenous
 depclean.

Perfect! It does exactly what I wanted. I created sets.conf in
/etc/portage/ as Boris pointed out.

Thank you very much for your help!