1 |
Zac Medico schreef: |
2 |
> Holly Bostick wrote: |
3 |
> |
4 |
>> I said that the situation of upgrading a kernel with the 'symlink' |
5 |
>> USE flag active occurring at the same time as a (particular) |
6 |
>> program needing to compile against a configured kernel was not |
7 |
>> likely to occur all that often, but I was wrong. It's happened |
8 |
>> again today, but with a different program than the ones I normally |
9 |
>> keep an eye on. |
10 |
>> |
11 |
>> The good thing is that I (think I) see what the problem is. |
12 |
>> |
13 |
>> The problem is that Portage emerges the new kernel before (almost) |
14 |
>> everything else, without regard for whether the 'symlink' USE flag |
15 |
>> is active, and whether or not any of the other programs proposed |
16 |
>> to emerge need to compile against a configured kernel source-- or |
17 |
>> rather, the currently-running kernel, which the symlink most likely |
18 |
>> pointed to before Portage changed it via a previous emerge. |
19 |
>> |
20 |
<snip> |
21 |
> |
22 |
> The portage developers will not add a special case for kernel |
23 |
> packages, so any reordering/prioritization would have to be done in a |
24 |
> generic way that is usable for any type of package. Also, it seems |
25 |
> desireable to compile against the latest kernel that is installed. |
26 |
|
27 |
..... OK, I understand this to some extent (meaning I get it that |
28 |
Portage is not going to be revised in this way), but I must question |
29 |
that last statement, "it seems desirable to compile against the latest |
30 |
kernel that is installed." |
31 |
|
32 |
The latest kernel that is *installed* (as opposed to the latest kernel |
33 |
whose source is emerged, regardless of whether it's configured, |
34 |
compiled, or installed) is the one I'm booted into, and while I |
35 |
presumably intend/want to upgrade to the newly emerged kernel at |
36 |
some reasonably soon point, I don't necessarily want to do it *right |
37 |
that minute*, nor am I necessarily going to avoid rebooting until such |
38 |
time as I have installed the upgraded kernel. |
39 |
|
40 |
> |
41 |
> Perhaps it would make sense to have a default kernel config that is |
42 |
> used to configure the kernel sources automatically (make oldconfig; |
43 |
> make modules_prepare) after a new kernel is installed? Something |
44 |
> like this could be done ebuild postinst phase (when symlink is |
45 |
> created). It is planned for future versions of portage to have |
46 |
> pre/post phase hooks, which will allow users to define actions such |
47 |
> as this via /etc/portage/bashrc: |
48 |
|
49 |
This sounds great, but what about the kernel I'm booted into, against |
50 |
which the module will *not* be compiled, if I have to reboot before |
51 |
actually configuring/compiling/installing the new kernel? |
52 |
|
53 |
The kernel modules will not be upgraded for that kernel (because the |
54 |
upgrades compiled only against the future kernel), and while that won't |
55 |
precisely break the old kernel (hopefully, since the old modules should |
56 |
still be good, though I cannot vouch for all circumstances), it means I |
57 |
don't have the upgraded modules for the currently-running kernel. |
58 |
|
59 |
After all, module-rebuild will re-build all the modules against a |
60 |
newly-compiled kernel; I don't need to build some limited subset of said |
61 |
modules against the new kernel source at the time I emerge the new |
62 |
kernel source, since I will build all of them at the end of the |
63 |
operations which make the new kernel actually available for use. What I |
64 |
do want is to build the upgraded modules against the currently-running |
65 |
kernel, which I expect to be using for some short additional period of |
66 |
time (until I compile and install the new kernel, which may be hours or |
67 |
days in the future). It would be nice to then have the future kernel |
68 |
source prepared for compilation and installation automatically (by |
69 |
redirecting the symlink), so that said compilation and installation goes |
70 |
on a "next-to-do, asap" list of sorts, but I'm not essentially forced to |
71 |
drop everything in order to compile the new kernel source *right now* in |
72 |
order to use the upgraded modules, which may be mission-critical in some |
73 |
respect (if the upgrade fixes functionality that I need working). |
74 |
|
75 |
Maybe the issue is really that the 'symlink' USE flag is obsolete in |
76 |
some respect, since it appears that automatic redirection of the |
77 |
/usr/src/linux symlink can often cause more problems than it solves, |
78 |
since the user cannot really know ahead of time whether a kernel module |
79 |
is going to upgrade in the same operation as a new kernel source is |
80 |
going to be emerged (which is not the same as installing a new kernel, |
81 |
of course). |
82 |
|
83 |
I guess I'll turn off the USE flag and manage the symlink directly, but |
84 |
it seems like there ought to be a better way. |
85 |
|
86 |
> |
87 |
> http://thread.gmane.org/gmane.linux.gentoo.portage.devel/1107 |
88 |
|
89 |
Thanks for the link. |
90 |
|
91 |
Holly |
92 |
-- |
93 |
gentoo-user@g.o mailing list |