* [gentoo-user] Can I exclude a package from --depclean's consideration?
@ 2009-06-11 16:22 Paul Hartman
2009-06-11 16:45 ` Mike Kazantsev
2009-06-11 17:04 ` [gentoo-user] " Nikos Chantziaras
0 siblings, 2 replies; 10+ messages in thread
From: Paul Hartman @ 2009-06-11 16:22 UTC (permalink / raw
To: gentoo-user
"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.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-user] Can I exclude a package from --depclean's consideration?
2009-06-11 16:22 [gentoo-user] Can I exclude a package from --depclean's consideration? Paul Hartman
@ 2009-06-11 16:45 ` Mike Kazantsev
2009-06-11 17:03 ` Boris Fersing
2009-06-11 18:36 ` Paul Hartman
2009-06-11 17:04 ` [gentoo-user] " Nikos Chantziaras
1 sibling, 2 replies; 10+ messages in thread
From: Mike Kazantsev @ 2009-06-11 16:45 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 1138 bytes --]
On Thu, 11 Jun 2009 11:22:41 -0500
Paul Hartman <paul.hartman+gentoo@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
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-user] Can I exclude a package from --depclean's consideration?
2009-06-11 16:45 ` Mike Kazantsev
@ 2009-06-11 17:03 ` Boris Fersing
2009-06-11 17:06 ` Mike Kazantsev
2009-06-11 18:36 ` Paul Hartman
1 sibling, 1 reply; 10+ messages in thread
From: Boris Fersing @ 2009-06-11 17:03 UTC (permalink / raw
To: gentoo-user
On Thu, Jun 11, 2009 at 18:45, Mike Kazantsev<mk.fraggod@gmail.com> wrote:
> On Thu, 11 Jun 2009 11:22:41 -0500
> Paul Hartman <paul.hartman+gentoo@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
^ permalink raw reply [flat|nested] 10+ messages in thread
* [gentoo-user] Re: Can I exclude a package from --depclean's consideration?
2009-06-11 16:22 [gentoo-user] Can I exclude a package from --depclean's consideration? Paul Hartman
2009-06-11 16:45 ` Mike Kazantsev
@ 2009-06-11 17:04 ` Nikos Chantziaras
2009-06-11 18:28 ` Paul Hartman
1 sibling, 1 reply; 10+ messages in thread
From: Nikos Chantziaras @ 2009-06-11 17:04 UTC (permalink / raw
To: gentoo-user
On 06/11/2009 07:22 PM, Paul Hartman 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."
If you read the man page (man emerge) you'll arrive at:
emerge --noreplace =gentoo-sources-1.2.3-r4
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-user] Can I exclude a package from --depclean's consideration?
2009-06-11 17:03 ` Boris Fersing
@ 2009-06-11 17:06 ` Mike Kazantsev
0 siblings, 0 replies; 10+ messages in thread
From: Mike Kazantsev @ 2009-06-11 17:06 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 594 bytes --]
On Thu, 11 Jun 2009 19:03:31 +0200
Boris Fersing <kernelsensei@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
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-user] Re: Can I exclude a package from --depclean's consideration?
2009-06-11 17:04 ` [gentoo-user] " Nikos Chantziaras
@ 2009-06-11 18:28 ` Paul Hartman
0 siblings, 0 replies; 10+ messages in thread
From: Paul Hartman @ 2009-06-11 18:28 UTC (permalink / raw
To: gentoo-user
On Thu, Jun 11, 2009 at 12:04 PM, Nikos Chantziaras<realnc@arcor.de> wrote:
> On 06/11/2009 07:22 PM, Paul Hartman 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."
>
> If you read the man page (man emerge) you'll arrive at:
>
> emerge --noreplace =gentoo-sources-1.2.3-r4
That is what I'm already doing (recording version-specific atom in my
world file). I was trying to find a more generic way, that will
prevent me from the need to specify exact versions. Thanks :)
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-user] Can I exclude a package from --depclean's consideration?
2009-06-11 16:45 ` Mike Kazantsev
2009-06-11 17:03 ` Boris Fersing
@ 2009-06-11 18:36 ` Paul Hartman
2009-06-12 19:11 ` David
1 sibling, 1 reply; 10+ messages in thread
From: Paul Hartman @ 2009-06-11 18:36 UTC (permalink / raw
To: gentoo-user
On Thu, Jun 11, 2009 at 11:45 AM, Mike Kazantsev<mk.fraggod@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!
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-user] Can I exclude a package from --depclean's consideration?
2009-06-11 18:36 ` Paul Hartman
@ 2009-06-12 19:11 ` David
2009-06-12 20:28 ` Mike Kazantsev
0 siblings, 1 reply; 10+ messages in thread
From: David @ 2009-06-12 19:11 UTC (permalink / raw
To: gentoo-user
Paul Hartman wrote:
> On Thu, Jun 11, 2009 at 11:45 AM, Mike Kazantsev<mk.fraggod@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
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-user] Can I exclude a package from --depclean's consideration?
2009-06-12 19:11 ` David
@ 2009-06-12 20:28 ` Mike Kazantsev
2009-06-12 20:54 ` David
0 siblings, 1 reply; 10+ messages in thread
From: Mike Kazantsev @ 2009-06-12 20:28 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 802 bytes --]
On Fri, 12 Jun 2009 15:11:07 -0400
David <david@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.
--
Mike Kazantsev // fraggod.net
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-user] Can I exclude a package from --depclean's consideration?
2009-06-12 20:28 ` Mike Kazantsev
@ 2009-06-12 20:54 ` David
0 siblings, 0 replies; 10+ messages in thread
From: David @ 2009-06-12 20:54 UTC (permalink / raw
To: gentoo-user
Mike Kazantsev wrote:
> On Fri, 12 Jun 2009 15:11:07 -0400
> David <david@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
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2009-06-12 20:54 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-11 16:22 [gentoo-user] Can I exclude a package from --depclean's consideration? Paul Hartman
2009-06-11 16:45 ` Mike Kazantsev
2009-06-11 17:03 ` Boris Fersing
2009-06-11 17:06 ` Mike Kazantsev
2009-06-11 18:36 ` Paul Hartman
2009-06-12 19:11 ` David
2009-06-12 20:28 ` Mike Kazantsev
2009-06-12 20:54 ` David
2009-06-11 17:04 ` [gentoo-user] " Nikos Chantziaras
2009-06-11 18:28 ` Paul Hartman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox