-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

William Hubbs wrote:
>  I agree here.  The eclass should check /proc/config.gz.
>  Also, another reason to use the eclass is it respects KBUILD_OUTPUT if
>  it is set.

- From the indenting I can't tell if you wrote this or not, however, we
need to differentiate between running and build time environments.
Ebuilding is a build-time process.  That means the running kernel isn't
 important, since we're not running udev, we're just building it.  When
the machine is next rebooted, we could be using a completely different
kernel (or even one that hasn't been installed yet).  We should only
care about the build-time kernel when we're building, which the user has
to specify (which they do implicitly by using /usr/src/linux, or
explicitly by using KBUILD_OUTPUT or another environment variable).

If you go by the running kernel, then you're requiring people to reboot
their computers before they can build software for a kernel they're
about to run.  That simply ensures downtime on a potentially critical
service, and moreover it's an unnecessary constraint.  The existing udev
can continue running until the machine is rebooted without a problem.
When the machine restarts *any* kernel could be chosen, and build time
checks won't help prevent a bad kernel from being booted.  That's why
the linux-info.eclass does the checks it currently does, and *doesn't*
check /proc/config.gz and *doesn't* check /$(uname -r)/ directories...

So in summary:

* Check the running kernel if you're about to run.
* Check the kernel the user's chosen to build against if you're about to
build, using linux-info.

If the ebuild restarts the service (causing a reread off disk, rather
than just a reread of the rules) then fine, use the check to disable the
restart, and/or warn the user, but don't stop the user from building the
software.

You can also put a check in the init.d, but it just creates the
possibility that the check is wrong when udev could potentially still
run.  I'd simply try running udev and check if it exits or errors as
expected.  Only if it doesn't exit or error when it should would I add
checks to the initscript, and even then I'd suggest fixing the code to
error correctly, over adding our own checks in...

Mike  5:)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.11 (GNU/Linux)

iEYEARECAAYFAkqapk4ACgkQu7rWomwgFXqDbACgtYdXtmlgo6JA49o9on111XPE
Y/QAnROtzEhAUg0ML9J+nd6rTvKfZeFz
=pbOj
-----END PGP SIGNATURE-----

Reply via email to