1 |
-----BEGIN PGP SIGNED MESSAGE----- |
2 |
Hash: SHA1 |
3 |
|
4 |
William Hubbs wrote: |
5 |
> I agree here. The eclass should check /proc/config.gz. |
6 |
> Also, another reason to use the eclass is it respects KBUILD_OUTPUT if |
7 |
> it is set. |
8 |
|
9 |
- From the indenting I can't tell if you wrote this or not, however, we |
10 |
need to differentiate between running and build time environments. |
11 |
Ebuilding is a build-time process. That means the running kernel isn't |
12 |
important, since we're not running udev, we're just building it. When |
13 |
the machine is next rebooted, we could be using a completely different |
14 |
kernel (or even one that hasn't been installed yet). We should only |
15 |
care about the build-time kernel when we're building, which the user has |
16 |
to specify (which they do implicitly by using /usr/src/linux, or |
17 |
explicitly by using KBUILD_OUTPUT or another environment variable). |
18 |
|
19 |
If you go by the running kernel, then you're requiring people to reboot |
20 |
their computers before they can build software for a kernel they're |
21 |
about to run. That simply ensures downtime on a potentially critical |
22 |
service, and moreover it's an unnecessary constraint. The existing udev |
23 |
can continue running until the machine is rebooted without a problem. |
24 |
When the machine restarts *any* kernel could be chosen, and build time |
25 |
checks won't help prevent a bad kernel from being booted. That's why |
26 |
the linux-info.eclass does the checks it currently does, and *doesn't* |
27 |
check /proc/config.gz and *doesn't* check /$(uname -r)/ directories... |
28 |
|
29 |
So in summary: |
30 |
|
31 |
* Check the running kernel if you're about to run. |
32 |
* Check the kernel the user's chosen to build against if you're about to |
33 |
build, using linux-info. |
34 |
|
35 |
If the ebuild restarts the service (causing a reread off disk, rather |
36 |
than just a reread of the rules) then fine, use the check to disable the |
37 |
restart, and/or warn the user, but don't stop the user from building the |
38 |
software. |
39 |
|
40 |
You can also put a check in the init.d, but it just creates the |
41 |
possibility that the check is wrong when udev could potentially still |
42 |
run. I'd simply try running udev and check if it exits or errors as |
43 |
expected. Only if it doesn't exit or error when it should would I add |
44 |
checks to the initscript, and even then I'd suggest fixing the code to |
45 |
error correctly, over adding our own checks in... |
46 |
|
47 |
Mike 5:) |
48 |
-----BEGIN PGP SIGNATURE----- |
49 |
Version: GnuPG v2.0.11 (GNU/Linux) |
50 |
|
51 |
iEYEARECAAYFAkqapk4ACgkQu7rWomwgFXqDbACgtYdXtmlgo6JA49o9on111XPE |
52 |
Y/QAnROtzEhAUg0ML9J+nd6rTvKfZeFz |
53 |
=pbOj |
54 |
-----END PGP SIGNATURE----- |