On 04/01/2018 08:40, Wols Lists wrote:
> On 03/01/18 22:09, Alan McKinnon wrote:
>> On 04/01/2018 00:02, Stroller wrote:
>>>
>>>> On 3 Jan 2018, at 21:55, Wols Lists <antli...@youngman.org.uk> wrote:
>>>>  
>>>> What would be nice, would be if "emerge --depclean" had the smarts to
>>>> recognise that /usr/src/linux pointed to the current active kernel, and
>>>> didn't wipe that when it cleaned out everything else :-) That way, at
>>>> most you could have the current and latest kernel sources available
>>>> pretty easily.
>>>
>>> You've jogged a long-hibernating memory - the accidental removal of the 
>>> current sources tree in an accident like this may be the exact reason why I 
>>> refuse to allow kernel versions to be actively emerged.
>>
>> I think that's a mountain and a molehill. You still have the image in
>> /boot, config in /boot or in the running kernel, libs in /lib/modules
>> and the bootloader is intact.
>>
>> Delete the sources?
>> - Re-emerge them. 90 seconds.
>> - Re-compile using existing config. 20 minutes
>>
>> So deleting the sources for the running kernel is a doh! moment. But no
>> biggie, and certainly not cause for changing your routine (all in my own
>> not at all humble opinion, of course)
>>
> But it's a royal pain, especially if you don't realise that's what's
> happened, because a general emerge is likely to have a lot of grief.

Yes there is that

> 
> Dunno how many ebuilds actually refer to /usr/src/linux for some of
> their header files, but I doubt it's negligible. It's certainly caused
> me grief in the past.

It's a decidedly non-trivial number of ebuilds.

On Gentoo /usr/src is a symlink to the *configured* kernel sources, on
binary distros the same dir usually contains headers for the running kernel

> (Yes I think they're not supposed to, but what's that saying about
> theory and practice?)

I don't know of any documentation in Gentoo that says ebuilds shouldn't
do that but I can't think of any realistic alternatives. Gentoo needs
access to the kernel config not just the sources and we can't rely on a
config being present in /boot like binary distros can

> 
> I don't like it when well-known problems cause general breakage that is
> likely to cause havoc for unsuspecting users...

Gentoo has always had a fallback excuse position for devs:

By running Gentoo you give up all right to claiming to be an
"unsuspecting user"

Harsh I know, and sucky when it hits you, but it is what it is.
Gentoo is not for the faint-hearted



-- 
Alan McKinnon
alan.mckin...@gmail.com


Reply via email to