linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* make glib optional
@ 2009-08-22  3:36 Marco d'Itri
  2009-08-22 11:51 ` Kay Sievers
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Marco d'Itri @ 2009-08-22  3:36 UTC (permalink / raw)
  To: linux-hotplug


[-- Attachment #1.1: Type: text/plain, Size: 438 bytes --]

I do not know how other distributions feel about this, but I fully
expect to be flamed if I suggested to add 2 MB of glib to the Debian
base system just to support ConsoleKit's ACLs.

The attached patch checks that glib is actually installed before trying
to run udev-acl.
Also, at boot time glib may be missing anyway since it is in /usr/lib/.

IMO udev-acl should be distributed with ConsoleKit, not udev.

-- 
ciao,
Marco

[-- Attachment #1.2: test_for_glib --]
[-- Type: text/plain, Size: 716 bytes --]

--- a/extras/udev-acl/70-acl.rules
+++ b/extras/udev-acl/70-acl.rules
@@ -47,8 +47,16 @@ ENV{ID_SMARTCARD_READER}=="*?", ENV{ACL_
 # joysticks
 SUBSYSTEM=="input", ENV{ID_CLASS}=="joystick", ENV{ACL_MANAGE}="1"
 
+LABEL="acl_apply"
+
+ENV{ACL_MANAGE}!="?*", GOTO="acl_end"
+
+# Glib is not declared as a package dependency, so check that it is actually
+# installed before running udev-acl.
+TEST!="/usr/lib/libglib-2.0.so.0", GOTO="acl_end"
+
 # apply ACL for all locally logged in users
-LABEL="acl_apply", ENV{ACL_MANAGE}=="?*", TEST=="/var/run/ConsoleKit/database", \
+TEST=="/var/run/ConsoleKit/database", \
   RUN+="udev-acl --action=$env{ACTION} --device=$env{DEVNAME}"
 
 LABEL="acl_end"

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

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

end of thread, other threads:[~2009-08-23 16:52 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-22  3:36 make glib optional Marco d'Itri
2009-08-22 11:51 ` Kay Sievers
2009-08-22 12:02 ` Marco d'Itri
2009-08-22 12:09 ` Kay Sievers
2009-08-23 13:42 ` Lennart Poettering
2009-08-23 16:52 ` Marco d'Itri

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).