public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] Preventing new versions of gentoo-sources…
@ 2019-06-19 17:07 Grant Taylor
  2019-06-19 17:37 ` Vadim A. Misbakh-Soloviov
  0 siblings, 1 reply; 22+ messages in thread
From: Grant Taylor @ 2019-06-19 17:07 UTC (permalink / raw
  To: Gentoo-Users

Is there a way that I can prevent emerge from wanting to update 
(download / install) gentoo-sources for kernel versions beyond a 
specified value?

I want to stick within a specific version of the kernel / gentoo-sources 
because of dependencies on Open vSwitch.

I'm okay receiving updates to the 4.14.* version, but I don't (yet) want 
anything in the 4.19.* or 5.* versions.

I don't feel the need to be locked at what's currently installed and 
stable, 4.14.120.  I'm happy to receive newer versions in the 4.14.* 
version once they are considered stable.  (It looks like 4.14.127 is 
still ~ (testing/experimental).



-- 
Grant. . . .
unix || die


^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [gentoo-user] Preventing new versions of gentoo-sources…
  2019-06-19 17:07 [gentoo-user] Preventing new versions of gentoo-sources… Grant Taylor
@ 2019-06-19 17:37 ` Vadim A. Misbakh-Soloviov
  2019-06-19 18:27   ` Grant Taylor
  0 siblings, 1 reply; 22+ messages in thread
From: Vadim A. Misbakh-Soloviov @ 2019-06-19 17:37 UTC (permalink / raw
  To: gentoo-user

echo '>sys-kernel/gentoo-sources-4.15' >> /etc/portage/package.mask/kernels





^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [gentoo-user] Preventing new versions of gentoo-sources…
  2019-06-19 17:37 ` Vadim A. Misbakh-Soloviov
@ 2019-06-19 18:27   ` Grant Taylor
  2019-06-20  0:16     ` Daniel Frey
  0 siblings, 1 reply; 22+ messages in thread
From: Grant Taylor @ 2019-06-19 18:27 UTC (permalink / raw
  To: gentoo-user

On 6/19/19 11:37 AM, Vadim A. Misbakh-Soloviov wrote:
> echo '>sys-kernel/gentoo-sources-4.15' >> /etc/portage/package.mask/kernels

Perfect!

Thank you.  :-)

I did name the file /etc/portage/package.mask/gentoo-sources as I like 
to name the file after the package that it's meant to effect.

The testing is even better than I had originally hoped. 
gentoo-sources-4.14.127.ebuild came in since I did my updates a few days 
ago.  So now emerge is telling me there is a new version of 
gentoo-sources, that is within my specified parameters.  :-)



-- 
Grant. . . .
unix || die


^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [gentoo-user] Preventing new versions of gentoo-sources…
  2019-06-19 18:27   ` Grant Taylor
@ 2019-06-20  0:16     ` Daniel Frey
  2019-06-20  2:51       ` Dale
  2019-06-20  7:47       ` Neil Bothwick
  0 siblings, 2 replies; 22+ messages in thread
From: Daniel Frey @ 2019-06-20  0:16 UTC (permalink / raw
  To: gentoo-user

On 6/19/19 11:27 AM, Grant Taylor wrote:
> On 6/19/19 11:37 AM, Vadim A. Misbakh-Soloviov wrote:
>> echo '>sys-kernel/gentoo-sources-4.15' >> 
>> /etc/portage/package.mask/kernels
> 
> Perfect!
> 
> Thank you.  :-)
> 
> I did name the file /etc/portage/package.mask/gentoo-sources as I like 
> to name the file after the package that it's meant to effect.
> 
> The testing is even better than I had originally hoped. 
> gentoo-sources-4.14.127.ebuild came in since I did my updates a few days 
> ago.  So now emerge is telling me there is a new version of 
> gentoo-sources, that is within my specified parameters.  :-)
> 
> 
> 

I was thinking about this for a bit, and thought that maybe adding the 
slot to the package in /var/lib/portage/world would work.

So, using `emerge --select` and `emerge --deselect` I set up my world 
file this way:

# grep -i gentoo-sources /var/lib/portage/world
sys-kernel/gentoo-sources:4.14.105-r1
sys-kernel/gentoo-sources:4.14.114
sys-kernel/gentoo-sources:4.14.83

I removed all other kernel packages manually so only those three are 
installed.

However, portage still wants to install the latest gentoo-sources, even 
though the generic "sys-kernel/gentoo-sources" is absent from the world 
file.

I figured this would be a way to manually update the kernel without 
having to manually add and remove masks. Darn.

That's not how I'd expect portage to handle that situation (or maybe 
it's just me?) Can a dev chime in?

Dan


^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [gentoo-user] Preventing new versions of gentoo-sources…
  2019-06-20  0:16     ` Daniel Frey
@ 2019-06-20  2:51       ` Dale
  2019-06-20  3:13         ` Grant Taylor
  2019-06-20 17:18         ` Kai Peter
  2019-06-20  7:47       ` Neil Bothwick
  1 sibling, 2 replies; 22+ messages in thread
From: Dale @ 2019-06-20  2:51 UTC (permalink / raw
  To: gentoo-user

Daniel Frey wrote:
> On 6/19/19 11:27 AM, Grant Taylor wrote:
>> On 6/19/19 11:37 AM, Vadim A. Misbakh-Soloviov wrote:
>>> echo '>sys-kernel/gentoo-sources-4.15' >>
>>> /etc/portage/package.mask/kernels
>>
>> Perfect!
>>
>> Thank you.  :-)
>>
>> I did name the file /etc/portage/package.mask/gentoo-sources as I
>> like to name the file after the package that it's meant to effect.
>>
>> The testing is even better than I had originally hoped.
>> gentoo-sources-4.14.127.ebuild came in since I did my updates a few
>> days ago.  So now emerge is telling me there is a new version of
>> gentoo-sources, that is within my specified parameters.  :-)
>>
>>
>>
>
> I was thinking about this for a bit, and thought that maybe adding the
> slot to the package in /var/lib/portage/world would work.
>
> So, using `emerge --select` and `emerge --deselect` I set up my world
> file this way:
>
> # grep -i gentoo-sources /var/lib/portage/world
> sys-kernel/gentoo-sources:4.14.105-r1
> sys-kernel/gentoo-sources:4.14.114
> sys-kernel/gentoo-sources:4.14.83
>
> I removed all other kernel packages manually so only those three are
> installed.
>
> However, portage still wants to install the latest gentoo-sources,
> even though the generic "sys-kernel/gentoo-sources" is absent from the
> world file.
>
> I figured this would be a way to manually update the kernel without
> having to manually add and remove masks. Darn.
>
> That's not how I'd expect portage to handle that situation (or maybe
> it's just me?) Can a dev chime in?
>
> Dan
>
>


I don't think my way will be any better but this is how I do it.  I mask
gentoo-sources completely until I want to update.  When I want to
update, I comment out the mask in the mask file and uncomment the entry
in the keyword file.  At that point I can emerge whatever version I want
and then undo the changes when I've emerged it. 

The bad thing about this, sometimes I have to use exclude gentoo-sources
from things such as --depclean.  It's annoying but it's the only way I
could come up with to do this. 

Honestly, I'm not sure there is a easy way to do this.  No matter how it
is done, it causes some other annoying issue to pop up.  I was hoping
someone had a really nifty idea on this which is why I'm also following
this thread.  My way might be a option but then again, you may not like
it for the same reasons I don't.  ;-)

Dale

:-)  :-) 


^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [gentoo-user] Preventing new versions of gentoo-sources…
  2019-06-20  2:51       ` Dale
@ 2019-06-20  3:13         ` Grant Taylor
  2019-06-20  3:51           ` Dale
  2019-06-20 17:18         ` Kai Peter
  1 sibling, 1 reply; 22+ messages in thread
From: Grant Taylor @ 2019-06-20  3:13 UTC (permalink / raw
  To: gentoo-user

On 6/19/19 8:51 PM, Dale wrote:
> Honestly, I'm not sure there is a easy way to do this.

I'm actually happy with what Vadim recommended.

It keeps me within the minor (?) version of the kernel that I want to 
stay within, while still allowing updates to new micro (?) versions.

Is Major, Minor, and Micro versions the proper term?

4.14.120 being
Major:  4
Minor:  14
Micro:  120

# cat /etc/portage/package.mask/gentoo-sources
 >sys-kernel/gentoo-sources-4.15

When I /am/ ready to upgrade to a newer Minor version, I will just 
update my /etc/portage/package.mask/gentoo-sources file.


^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [gentoo-user] Preventing new versions of gentoo-sources…
  2019-06-20  3:13         ` Grant Taylor
@ 2019-06-20  3:51           ` Dale
  2019-06-20  4:14             ` Grant Taylor
  2019-06-20  7:44             ` Neil Bothwick
  0 siblings, 2 replies; 22+ messages in thread
From: Dale @ 2019-06-20  3:51 UTC (permalink / raw
  To: gentoo-user

Grant Taylor wrote:
> On 6/19/19 8:51 PM, Dale wrote:
>> Honestly, I'm not sure there is a easy way to do this.
>
> I'm actually happy with what Vadim recommended.
>
> It keeps me within the minor (?) version of the kernel that I want to
> stay within, while still allowing updates to new micro (?) versions.
>
> Is Major, Minor, and Micro versions the proper term?
>
> 4.14.120 being
> Major:  4
> Minor:  14
> Micro:  120
>
> # cat /etc/portage/package.mask/gentoo-sources
> >sys-kernel/gentoo-sources-4.15
>
> When I /am/ ready to upgrade to a newer Minor version, I will just
> update my /etc/portage/package.mask/gentoo-sources file.
>
>


I admit, it seems to be a cleaner way of doing it than what I'm doing. 
I may even give that a try but for me, I rarely update.  I know,
security fixes.  Heck, if I update every day, there would still be some
security problem with the kernel.  I may even end up with one that is
worse than a older version.  Plus, I keep my system so busy, I just
don't have the time to reboot that much. 

It seems you like that way and it works best for your situation and that
is what matters.  Sometimes there are many ways to do things but some
just work better in certain situations.  Just have to pick what works
best. 

Dale

:-)  :-) 


^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [gentoo-user] Preventing new versions of gentoo-sources…
  2019-06-20  3:51           ` Dale
@ 2019-06-20  4:14             ` Grant Taylor
  2019-06-20  4:33               ` Dale
  2019-06-20  7:44             ` Neil Bothwick
  1 sibling, 1 reply; 22+ messages in thread
From: Grant Taylor @ 2019-06-20  4:14 UTC (permalink / raw
  To: gentoo-user

On 6/19/19 9:51 PM, Dale wrote:
> It seems you like that way and it works best for your situation and that
> is what matters.

Yep.  I'm happy enough, for now.  We'll see if I change my opinion in 
the future.

> Sometimes there are many ways to do things but some just work better 
> in certain situations.  Just have to pick what works best.

Yep.  But you need to know what the options are, understand enough about 
them, so that you can make an informed decision.

Let's not forget that you're always free to change your decisions in the 
future.  ;-)


^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [gentoo-user] Preventing new versions of gentoo-sources…
  2019-06-20  4:14             ` Grant Taylor
@ 2019-06-20  4:33               ` Dale
  0 siblings, 0 replies; 22+ messages in thread
From: Dale @ 2019-06-20  4:33 UTC (permalink / raw
  To: gentoo-user

Grant Taylor wrote:
> On 6/19/19 9:51 PM, Dale wrote:
>> It seems you like that way and it works best for your situation and that
>> is what matters.
>
> Yep.  I'm happy enough, for now.  We'll see if I change my opinion in
> the future.
>
>> Sometimes there are many ways to do things but some just work better
>> in certain situations.  Just have to pick what works best.
>
> Yep.  But you need to know what the options are, understand enough
> about them, so that you can make an informed decision.
>
> Let's not forget that you're always free to change your decisions in
> the future.  ;-)
>
>


Very true.  I'm still playing with my new video splitter setup.  I
suspect there is a better way to do what I'm doing but I've not found it
yet.  May have to ask more questions on this before to long.  Still, the
advice I got at least let me know that the hardware can work.  It's a
start.  I may change it later, sure I will, but for now I'm watching TV
in both my bedroom and living room.  That means I can clean and such and
have some TV noise, even watch when needed.  In your case, you may have
figured out a way to do it but it may not have been ideal.  By asking,
you found a better way that suites your situation. 

I've found that more options lets a person find one that works better
than others.  That's where this list comes in handy. 

Dale

:-)  :-) 


^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [gentoo-user] Preventing new versions of gentoo-sources…
  2019-06-20  3:51           ` Dale
  2019-06-20  4:14             ` Grant Taylor
@ 2019-06-20  7:44             ` Neil Bothwick
  1 sibling, 0 replies; 22+ messages in thread
From: Neil Bothwick @ 2019-06-20  7:44 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 940 bytes --]

On Wed, 19 Jun 2019 22:51:15 -0500, Dale wrote:

> > When I /am/ ready to upgrade to a newer Minor version, I will just
> > update my /etc/portage/package.mask/gentoo-sources file.

> I admit, it seems to be a cleaner way of doing it than what I'm doing. 
> I may even give that a try but for me, I rarely update.  I know,
> security fixes.  Heck, if I update every day, there would still be some
> security problem with the kernel.  I may even end up with one that is
> worse than a older version.  Plus, I keep my system so busy, I just
> don't have the time to reboot that much. 

It's exactly how I do it. I have some hardware that won't run on anything
later than the 4.9 series, so I simply mask everything newer. It seems
the cleanest and simplest way of doing it.


-- 
Neil Bothwick

C: (n.) the language following A and B. The world still awaits D and
   E. By Z, it may be acceptable for general use.

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [gentoo-user] Preventing new versions of gentoo-sources…
  2019-06-20  0:16     ` Daniel Frey
  2019-06-20  2:51       ` Dale
@ 2019-06-20  7:47       ` Neil Bothwick
  2019-06-20 14:18         ` Daniel Frey
  1 sibling, 1 reply; 22+ messages in thread
From: Neil Bothwick @ 2019-06-20  7:47 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 1108 bytes --]

On Wed, 19 Jun 2019 17:16:21 -0700, Daniel Frey wrote:

> I was thinking about this for a bit, and thought that maybe adding the 
> slot to the package in /var/lib/portage/world would work.

Every release has a separate slot, so this would never offer updates, no
matter how minor. However, you may find emerge world wanting to downgrade
if your chosen versions are no longer in the tree.

> So, using `emerge --select` and `emerge --deselect` I set up my world 
> file this way:
> 
> # grep -i gentoo-sources /var/lib/portage/world
> sys-kernel/gentoo-sources:4.14.105-r1
> sys-kernel/gentoo-sources:4.14.114
> sys-kernel/gentoo-sources:4.14.83
> 
> I removed all other kernel packages manually so only those three are 
> installed.
> 
> However, portage still wants to install the latest gentoo-sources, even 
> though the generic "sys-kernel/gentoo-sources" is absent from the world 
> file.

Do you have anything depending on virtual/linux-sources? That pulls in
gentoo-sources with no version limits.


-- 
Neil Bothwick

Hm..what's this red button fo|'\xBB\x7f.'NO CARRIER

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [gentoo-user] Preventing new versions of gentoo-sources…
  2019-06-20  7:47       ` Neil Bothwick
@ 2019-06-20 14:18         ` Daniel Frey
  0 siblings, 0 replies; 22+ messages in thread
From: Daniel Frey @ 2019-06-20 14:18 UTC (permalink / raw
  To: gentoo-user

On 6/20/19 12:47 AM, Neil Bothwick wrote:
> On Wed, 19 Jun 2019 17:16:21 -0700, Daniel Frey wrote:
> 
>> I was thinking about this for a bit, and thought that maybe adding the
>> slot to the package in /var/lib/portage/world would work.
> 
> Every release has a separate slot, so this would never offer updates, no
> matter how minor. However, you may find emerge world wanting to downgrade
> if your chosen versions are no longer in the tree.

I guess I'll find out when that happens. I was just seeing if this would 
work.

> 
>> So, using `emerge --select` and `emerge --deselect` I set up my world
>> file this way:
>>
>> # grep -i gentoo-sources /var/lib/portage/world
>> sys-kernel/gentoo-sources:4.14.105-r1
>> sys-kernel/gentoo-sources:4.14.114
>> sys-kernel/gentoo-sources:4.14.83
>>
>> I removed all other kernel packages manually so only those three are
>> installed.
>>
>> However, portage still wants to install the latest gentoo-sources, even
>> though the generic "sys-kernel/gentoo-sources" is absent from the world
>> file.
> 
> Do you have anything depending on virtual/linux-sources? That pulls in
> gentoo-sources with no version limits.
> 
> 

Ah-ha! Thanks for the tip! nvidia-drivers does indeed depend on 
virtual/linux-sources. I've put "virtual/linux-sources-3" in 
/etc/portage/profile/package.provided as a test and now it will not pull 
in the newest version.

I always have a kernel installed with a valid symlink so that's not an 
issue putting it in package.provided.

So the above does work. You can specify a slot in the world file and 
remove the generic "sys-kernel/gentoo-sources" and it won't pull in a 
newer kernel.

I check regularly with eshowkw to see what's been stabilized for 
gentoo-sources anyway, now I don't have to worry about portage 
installing a kernel version I don't need.

This way it'll only pull in a kernel version when I ask it to. Excellent.

Dan


^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [gentoo-user] Preventing new versions of gentoo-sources…
  2019-06-20  2:51       ` Dale
  2019-06-20  3:13         ` Grant Taylor
@ 2019-06-20 17:18         ` Kai Peter
  2019-06-20 18:10           ` Dale
  2019-06-20 20:18           ` [gentoo-user] " Neil Bothwick
  1 sibling, 2 replies; 22+ messages in thread
From: Kai Peter @ 2019-06-20 17:18 UTC (permalink / raw
  To: gentoo-user

> 
> The bad thing about this, sometimes I have to use exclude 
> gentoo-sources
> from things such as --depclean.  It's annoying but it's the only way I
> could come up with to do this. 
> 
You can do an 'emerge --noreplace' - one time.

-- 
Sent with eQmail-1.10.1 beta - a fork of djb's famous qmail


^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [gentoo-user] Preventing new versions of gentoo-sources…
  2019-06-20 17:18         ` Kai Peter
@ 2019-06-20 18:10           ` Dale
  2019-06-20 19:07             ` Kai Peter
  2019-06-20 19:40             ` Daniel Frey
  2019-06-20 20:18           ` [gentoo-user] " Neil Bothwick
  1 sibling, 2 replies; 22+ messages in thread
From: Dale @ 2019-06-20 18:10 UTC (permalink / raw
  To: gentoo-user

Kai Peter wrote:
>>
>> The bad thing about this, sometimes I have to use exclude gentoo-sources
>> from things such as --depclean.  It's annoying but it's the only way I
>> could come up with to do this. 
>>
> You can do an 'emerge --noreplace' - one time.
>


I read the man page for this option, I'm not sure how it would help. 
All that does is prevent it from recording that it is installed in the
world file.  Since I have -1 set as a default, it does that when I
emerge single packages already.  If I want to keep it and it not be
--depcleaned, then I use -n --select y to add it to the world file. 
Thing is, some packages require some sort of kernel to be installed as a
dependency last I checked. 

Or am I missing something?

Dale

:-)  :-) 


^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [gentoo-user] Preventing new versions of gentoo-sources…
  2019-06-20 18:10           ` Dale
@ 2019-06-20 19:07             ` Kai Peter
  2019-06-20 19:18               ` Dale
  2019-06-20 19:40             ` Daniel Frey
  1 sibling, 1 reply; 22+ messages in thread
From: Kai Peter @ 2019-06-20 19:07 UTC (permalink / raw
  To: gentoo-user

On 2019-06-20 20:10, Dale wrote:
> Kai Peter wrote:
>>> 
>>> The bad thing about this, sometimes I have to use exclude 
>>> gentoo-sources
>>> from things such as --depclean.  It's annoying but it's the only way 
>>> I
>>> could come up with to do this. 
>>> 
>> You can do an 'emerge --noreplace' - one time.
>> 
> 
> 
> I read the man page for this option, I'm not sure how it would help. 
> All that does is prevent it from recording that it is installed in the
> world file.  Since I have -1 set as a default, it does that when I
> emerge single packages already.  If I want to keep it and it not be
> --depcleaned, then I use -n --select y to add it to the world file. 
> Thing is, some packages require some sort of kernel to be installed as 
> a
> dependency last I checked. 
> 
> Or am I missing something?
> 
> Dale
> 
> :-)  :-) 
It is just to exclude a gentoo-sources version from depclean. I assumed 
you do something like this:

$> emerge -c --exclude=gentoo-sources:4.14.83

and may be multiple times. With --noreplace the corresponding version 
will be omitted, so a simple 'emerge -c' would be enough.

Anyway, I did struggle with this gentoo-sources thing a long time ago. I 
want to have the latest stable (minor) version (patch) of the running 
kernel installed as well the newest stable one. As long as it is not 
compiled and booted is uses only some disk space. If I have compiled the 
kernel I use e.g. 'emerge --noreplace gentoo-sources:4.14.83' to keep 
it.

To get the latest patch version I have ...package.mask/gentoo-sources. 
For the latest stable sources I remove the file and re-create it 
afterwards. This is done by a cron job automatically. A little bit like 
this ('gentoo-sources' contains: ">=sys-kernel/gentoo-sources-4.15")

FN="${PORTAGE_CONFIGROOT}/etc/portage/package.mask/gentoo-sources"
emerge -u gentoo-sources
TMP=`cat $FN`
rm -f $FN
emerge -u gentoo-sources
echo $TMP > $FN

Just my way. To me it is important to have a high level of automation. 
With automation it is unimportant how many gentoo-sources kernels are 
installed. I remove obsolete ones periodically by hand.

Kai
-- 
Sent with eQmail-1.10.2 - a fork of djb's famous qmail


^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [gentoo-user] Preventing new versions of gentoo-sources…
  2019-06-20 19:07             ` Kai Peter
@ 2019-06-20 19:18               ` Dale
  0 siblings, 0 replies; 22+ messages in thread
From: Dale @ 2019-06-20 19:18 UTC (permalink / raw
  To: gentoo-user

Kai Peter wrote:
> On 2019-06-20 20:10, Dale wrote:
>> Kai Peter wrote:
>>>>
>>>> The bad thing about this, sometimes I have to use exclude
>>>> gentoo-sources
>>>> from things such as --depclean.  It's annoying but it's the only way I
>>>> could come up with to do this. 
>>>>
>>> You can do an 'emerge --noreplace' - one time.
>>>
>>
>>
>> I read the man page for this option, I'm not sure how it would help. 
>> All that does is prevent it from recording that it is installed in the
>> world file.  Since I have -1 set as a default, it does that when I
>> emerge single packages already.  If I want to keep it and it not be
>> --depcleaned, then I use -n --select y to add it to the world file. 
>> Thing is, some packages require some sort of kernel to be installed as a
>> dependency last I checked. 
>>
>> Or am I missing something?
>>
>> Dale
>>
>> :-)  :-) 
> It is just to exclude a gentoo-sources version from depclean. I
> assumed you do something like this:
>
> $> emerge -c --exclude=gentoo-sources:4.14.83
>
> and may be multiple times. With --noreplace the corresponding version
> will be omitted, so a simple 'emerge -c' would be enough.
>
> Anyway, I did struggle with this gentoo-sources thing a long time ago.
> I want to have the latest stable (minor) version (patch) of the
> running kernel installed as well the newest stable one. As long as it
> is not compiled and booted is uses only some disk space. If I have
> compiled the kernel I use e.g. 'emerge --noreplace
> gentoo-sources:4.14.83' to keep it.
>
> To get the latest patch version I have ...package.mask/gentoo-sources.
> For the latest stable sources I remove the file and re-create it
> afterwards. This is done by a cron job automatically. A little bit
> like this ('gentoo-sources' contains: ">=sys-kernel/gentoo-sources-4.15")
>
> FN="${PORTAGE_CONFIGROOT}/etc/portage/package.mask/gentoo-sources"
> emerge -u gentoo-sources
> TMP=`cat $FN`
> rm -f $FN
> emerge -u gentoo-sources
> echo $TMP > $FN
>
> Just my way. To me it is important to have a high level of automation.
> With automation it is unimportant how many gentoo-sources kernels are
> installed. I remove obsolete ones periodically by hand.
>
> Kai


When I do --depclean, I just add --exclude gentoo-sources and it ignores
all versions of it.  I only have to type it once that way.  I do have a
few versions installed, one running plus a couple backups that are well
tested.  At the moment, I have one that I haven't booted yet.  I thought
a storm last night might give me that opportunity but the power held up
fine. 

It sounds like you do something similar to me but you just automate it
more.  Since I do update only a couple times a year at most, it's not a
big deal.  I generally only run --depclean after a major KDE upgrade,
about once every 4 to 6 weeks. 

Dale

:-)  :-) 


^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [gentoo-user] Preventing new versions of gentoo-sources…
  2019-06-20 18:10           ` Dale
  2019-06-20 19:07             ` Kai Peter
@ 2019-06-20 19:40             ` Daniel Frey
  2019-06-21  3:08               ` Dale
  1 sibling, 1 reply; 22+ messages in thread
From: Daniel Frey @ 2019-06-20 19:40 UTC (permalink / raw
  To: gentoo-user

On 6/20/19 11:10 AM, Dale wrote:
> Kai Peter wrote:
>>>
>>> The bad thing about this, sometimes I have to use exclude gentoo-sources
>>> from things such as --depclean.  It's annoying but it's the only way I
>>> could come up with to do this.
>>>
>> You can do an 'emerge --noreplace' - one time.
>>
> 
> 
> I read the man page for this option, I'm not sure how it would help.
> All that does is prevent it from recording that it is installed in the
> world file.  Since I have -1 set as a default, it does that when I
> emerge single packages already.  If I want to keep it and it not be
> --depcleaned, then I use -n --select y to add it to the world file.
> Thing is, some packages require some sort of kernel to be installed as a
> dependency last I checked.
> 
> Or am I missing something?
> 

Yep. --select and --noreplace both record the package specified in the 
world file. The difference is you use --noreplace when the package 
specified is already installed, this prevents it from being reinstalled 
(it will record it in the world file without reinstalling the package.)

If you know you want to keep it (as in: have --oneshot as a default 
option) and you use --select, it will record it in the world file and 
install the package.

Dan


^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [gentoo-user] Preventing new versions of gentoo-sources…
  2019-06-20 17:18         ` Kai Peter
  2019-06-20 18:10           ` Dale
@ 2019-06-20 20:18           ` Neil Bothwick
  1 sibling, 0 replies; 22+ messages in thread
From: Neil Bothwick @ 2019-06-20 20:18 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 1004 bytes --]

On Thu, 20 Jun 2019 19:18:22 +0200, Kai Peter wrote:

> > The bad thing about this, sometimes I have to use exclude 
> > gentoo-sources
> > from things such as --depclean.  It's annoying but it's the only way I
> > could come up with to do this. 
> >   
> You can do an 'emerge --noreplace' - one time.

You can create a kernels set that means portage will never depclean them.
Add this to /etc/portage/sets.conf

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

Then add @kernels to /var/lib/portage/word_sets. This is a one-ff
operation, no need to remember to add options to commands or edit files.
Just unmerge the kernels manually when you want.

I use the same approach to keep multiple copies of gcc around:

[gcc]
class = portage.sets.dbapi.OwnerSet
world-candidate = False
files = /usr/x86_64-pc-linux-gnu/gcc-bin


-- 
Neil Bothwick

Vital papers will demonstrate their vitality by moving to where you
can't find them.

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [gentoo-user] Preventing new versions of gentoo-sources…
  2019-06-20 19:40             ` Daniel Frey
@ 2019-06-21  3:08               ` Dale
  2019-06-21  9:10                 ` Peter Humphrey
  2019-06-21 12:17                 ` [gentoo-user] " »Q«
  0 siblings, 2 replies; 22+ messages in thread
From: Dale @ 2019-06-21  3:08 UTC (permalink / raw
  To: gentoo-user

Daniel Frey wrote:
> On 6/20/19 11:10 AM, Dale wrote:
>> Kai Peter wrote:
>>>>
>>>> The bad thing about this, sometimes I have to use exclude
>>>> gentoo-sources
>>>> from things such as --depclean.  It's annoying but it's the only way I
>>>> could come up with to do this.
>>>>
>>> You can do an 'emerge --noreplace' - one time.
>>>
>>
>>
>> I read the man page for this option, I'm not sure how it would help.
>> All that does is prevent it from recording that it is installed in the
>> world file.  Since I have -1 set as a default, it does that when I
>> emerge single packages already.  If I want to keep it and it not be
>> --depcleaned, then I use -n --select y to add it to the world file.
>> Thing is, some packages require some sort of kernel to be installed as a
>> dependency last I checked.
>>
>> Or am I missing something?
>>
>
> Yep. --select and --noreplace both record the package specified in the
> world file. The difference is you use --noreplace when the package
> specified is already installed, this prevents it from being
> reinstalled (it will record it in the world file without reinstalling
> the package.)
>
> If you know you want to keep it (as in: have --oneshot as a default
> option) and you use --select, it will record it in the world file and
> install the package.
>
> Dan
>
>


That's what I do now tho.  I'm trying to figure out how this is
different since it ends with the same result.  The reason I have to add
--exclude gentoo-sources to --depclean is so that it won't remove
kernels I still have installed and may even be using or keeping as a
fall back.  I've tried different ways to accomplish this, except for the
one Neil posted, and any of them has some sort of issue that has to be
addressed in one way or another. 

Me confused.  :/

Dale

:-)  :-) 


^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [gentoo-user] Preventing new versions of gentoo-sources…
  2019-06-21  3:08               ` Dale
@ 2019-06-21  9:10                 ` Peter Humphrey
  2019-06-21 16:18                   ` Dale
  2019-06-21 12:17                 ` [gentoo-user] " »Q«
  1 sibling, 1 reply; 22+ messages in thread
From: Peter Humphrey @ 2019-06-21  9:10 UTC (permalink / raw
  To: gentoo-user

On Friday, 21 June 2019 04:08:03 BST Dale wrote:

> The reason I have to add --exclude gentoo-sources to --depclean is so that
> it won't remove kernels I still have installed and may even be using or
> keeping as a fall back.

Depclean won't remove your kernels - only the sources to build them from.

-- 
Regards,
Peter.





^ permalink raw reply	[flat|nested] 22+ messages in thread

* [gentoo-user] Re:  Preventing new versions of gentoo-sources…
  2019-06-21  3:08               ` Dale
  2019-06-21  9:10                 ` Peter Humphrey
@ 2019-06-21 12:17                 ` »Q«
  1 sibling, 0 replies; 22+ messages in thread
From: »Q« @ 2019-06-21 12:17 UTC (permalink / raw
  To: gentoo-user

On Thu, 20 Jun 2019 22:08:03 -0500
Dale <rdalek1967@gmail.com> wrote:

> Daniel Frey wrote:

> > Yep. --select and --noreplace both record the package specified in
> > the world file. The difference is you use --noreplace when the
> > package specified is already installed, this prevents it from being
> > reinstalled (it will record it in the world file without
> > reinstalling the package.)
> >
> > If you know you want to keep it (as in: have --oneshot as a default
> > option) and you use --select, it will record it in the world file
> > and install the package.
 
> That's what I do now tho.  I'm trying to figure out how this is
> different since it ends with the same result.  The reason I have to
> add --exclude gentoo-sources to --depclean is so that it won't remove
> kernels I still have installed and may even be using or keeping as a
> fall back.  I've tried different ways to accomplish this, except for
> the one Neil posted, and any of them has some sort of issue that has
> to be addressed in one way or another. 

Putting the kernel versions you want to keep into @world by slot will
keep them from being depcleaned.  E.g., if depclean wants to get rid of
gentoo-sources-4.19.44 but you want to keep it, use

# emerge --noreplace sys-kernel/gentoo-sources:4.19.44

Note the colon.

Neil's method is better, as once you implement it you never have to do
anything again.




^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [gentoo-user] Preventing new versions of gentoo-sources…
  2019-06-21  9:10                 ` Peter Humphrey
@ 2019-06-21 16:18                   ` Dale
  0 siblings, 0 replies; 22+ messages in thread
From: Dale @ 2019-06-21 16:18 UTC (permalink / raw
  To: gentoo-user

Peter Humphrey wrote:
> On Friday, 21 June 2019 04:08:03 BST Dale wrote:
>
>> The reason I have to add --exclude gentoo-sources to --depclean is so that
>> it won't remove kernels I still have installed and may even be using or
>> keeping as a fall back.
> Depclean won't remove your kernels - only the sources to build them from.
>


Yes but I want to keep the sources.  That's what I meant but it wasn't
clear in the text. 

Dale

:-)  :-) 


^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2019-06-21 16:18 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-19 17:07 [gentoo-user] Preventing new versions of gentoo-sources… Grant Taylor
2019-06-19 17:37 ` Vadim A. Misbakh-Soloviov
2019-06-19 18:27   ` Grant Taylor
2019-06-20  0:16     ` Daniel Frey
2019-06-20  2:51       ` Dale
2019-06-20  3:13         ` Grant Taylor
2019-06-20  3:51           ` Dale
2019-06-20  4:14             ` Grant Taylor
2019-06-20  4:33               ` Dale
2019-06-20  7:44             ` Neil Bothwick
2019-06-20 17:18         ` Kai Peter
2019-06-20 18:10           ` Dale
2019-06-20 19:07             ` Kai Peter
2019-06-20 19:18               ` Dale
2019-06-20 19:40             ` Daniel Frey
2019-06-21  3:08               ` Dale
2019-06-21  9:10                 ` Peter Humphrey
2019-06-21 16:18                   ` Dale
2019-06-21 12:17                 ` [gentoo-user] " »Q«
2019-06-20 20:18           ` [gentoo-user] " Neil Bothwick
2019-06-20  7:47       ` Neil Bothwick
2019-06-20 14:18         ` Daniel Frey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox