[Libosinfo] [libosinfo 2/2] build: Make sure $(pkgdatadir)/db exists
Christophe Fergeau
cfergeau at redhat.com
Thu Apr 4 08:26:05 UTC 2013
When creating symlinks to usb.ids/pci.ids, we assume the
destination directory already exists. However, this assumption
could very well break during parallel builds if we try to create
the symlinks before anything create the db/ directory. This commit
creates it explicitly as part of the symlink rule to avoid any
potential issue.
Issue pointed out by Samuli Suominen <ssuominen at gentoo.org>
---
data/Makefile.am | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/data/Makefile.am b/data/Makefile.am
index fa51571..0d9e959 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -11,7 +11,10 @@ usb.ids:
-wget -q -O $@ http://www.linux-usb.org/usb.ids
else
usb_ids_install:
- (cd $(DESTDIR)$(pkgdatadir)/db/ && rm -f usb.ids && $(LN_S) $(USB_IDS) usb.ids)
+ ($(MKDIR_P) $(DESTDIR)$(pkgdatadir)/db && \
+ cd $(DESTDIR)$(pkgdatadir)/db/ && \
+ rm -f usb.ids && \
+ $(LN_S) $(USB_IDS) usb.ids)
INSTALL_DATA_HOOK_DEPS += usb_ids_install
endif
@@ -22,7 +25,10 @@ pci.ids:
-wget -q -O $@ http://pciids.sourceforge.net/v2.2/pci.ids
else
pci_ids_install:
- (cd $(DESTDIR)$(pkgdatadir)/db/ && rm -f pci.ids && $(LN_S) $(PCI_IDS) pci.ids)
+ ($(MKDIR_P) $(DESTDIR)$(pkgdatadir)/db && \
+ cd $(DESTDIR)$(pkgdatadir)/db/ && \
+ rm -f pci.ids && \
+ $(LN_S) $(PCI_IDS) pci.ids)
INSTALL_DATA_HOOK_DEPS += pci_ids_install
endif
--
1.8.1.4
More information about the Libosinfo
mailing list