[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

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



From: "Zeeshan Ali (Khattak)" <zeeshanak 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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]