[virt-tools-list] [libosinfo] Don't worry on failure to install udev rule file

Zeeshan Ali (Khattak) zeeshanak at gnome.org
Mon Sep 12 17:56:54 UTC 2011


From: "Zeeshan Ali (Khattak)" <zeeshanak at gnome.org>

This can easily fail (e.g if `make install` is run unprivileged) and its
not a big deal if it does.
---
 data/Makefile.am |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/data/Makefile.am b/data/Makefile.am
index bd7ff20..e0cea20 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -7,12 +7,17 @@ databasedir = $(pkgdatadir)/data/
 database_DATA = usb.ids pci.ids
 
 if WITH_UDEV
-udevdir = /lib/udev/rules.d/
-udev_DATA = 95-osinfo.rules
 BUILT_SOURCES = 95-osinfo.rules
 
 95-osinfo.rules: 95-osinfo.rules.in
 	sed 's,\@bindir\@,$(exec_prefix)/bin,' $< > $@
+
+# Now copy the rules file to where it needs to be but don't worry if it fails
+# since it can easily fail (e.g if `make install` is run unprivileged) and its
+# not a big deal if it does.
+install-data-hook: 95-osinfo.rules
+	-cp 95-osinfo.rules /lib/udev/rules.d/
+
 endif
 
 CLEANFILES = usb.ids pci.ids
-- 
1.7.6




More information about the virt-tools-list mailing list