From 11281ed4d46bbfa8ffe65b760b2a8ca6b2250e41 Mon Sep 17 00:00:00 2001 From: Stephen Walker Date: Thu, 21 Jan 2010 12:58:33 +0000 Subject: [PATCH] pciutils: Revert r19252's postinst changes, make $DEST a relative path SVN-Revision: 19255 --- utils/pciutils/Makefile | 3 ++- ...102-zcat-pciids.patch => 102-compressed-ids.patch} | 5 +++-- utils/pciutils/patches/103-relative-path-ids.patch | 11 +++++++++++ 3 files changed, 16 insertions(+), 3 deletions(-) rename utils/pciutils/patches/{102-zcat-pciids.patch => 102-compressed-ids.patch} (89%) create mode 100644 utils/pciutils/patches/103-relative-path-ids.patch diff --git a/utils/pciutils/Makefile b/utils/pciutils/Makefile index db7cd308a..a219d68b3 100644 --- a/utils/pciutils/Makefile +++ b/utils/pciutils/Makefile @@ -34,7 +34,8 @@ endef define Package/pciutils/postinst #!/bin/sh -$${IPKG_INSTROOT}/usr/sbin/update-pciids +(cd $${IPKG_INSTROOT}/usr/share; $${IPKG_INSTROOT}/usr/sbin/update-pciids) +exit 0 endef MAKE_FLAGS += \ diff --git a/utils/pciutils/patches/102-zcat-pciids.patch b/utils/pciutils/patches/102-compressed-ids.patch similarity index 89% rename from utils/pciutils/patches/102-zcat-pciids.patch rename to utils/pciutils/patches/102-compressed-ids.patch index c4850973e..b252603f9 100644 --- a/utils/pciutils/patches/102-zcat-pciids.patch +++ b/utils/pciutils/patches/102-compressed-ids.patch @@ -11,15 +11,16 @@ # then just skip this whole process. if ! touch ${DEST} >/dev/null 2>&1 ; then ${quiet} || echo "${DEST} is read-only, exiting." 1>&2 -@@ -18,7 +17,6 @@ fi +@@ -18,7 +17,7 @@ fi if [ -n "$PCI_COMPRESSED_IDS" ] ; then DECOMP="cat" SRC="$SRC.gz" - GREP=zgrep ++ DEST="$DEST.gz" elif which bzip2 >/dev/null 2>&1 ; then DECOMP="bzip2 -d" SRC="$SRC.bz2" -@@ -53,7 +51,7 @@ if ! $DECOMP <$DEST.new >$DEST.neww ; th +@@ -53,7 +52,7 @@ if ! $DECOMP <$DEST.new >$DEST.neww ; th exit 1 fi diff --git a/utils/pciutils/patches/103-relative-path-ids.patch b/utils/pciutils/patches/103-relative-path-ids.patch new file mode 100644 index 000000000..6ccea292b --- /dev/null +++ b/utils/pciutils/patches/103-relative-path-ids.patch @@ -0,0 +1,11 @@ +--- a/Makefile ++++ b/Makefile +@@ -78,7 +78,7 @@ setpci.o: setpci.c pciutils.h $(PCIINC) + common.o: common.c pciutils.h $(PCIINC) + + update-pciids: update-pciids.sh +- sed <$< >$@ "s@^DEST=.*@DEST=$(IDSDIR)/$(PCI_IDS)@;s@^PCI_COMPRESSED_IDS=.*@PCI_COMPRESSED_IDS=$(PCI_COMPRESSED_IDS)@" ++ sed <$< >$@ "s@^PCI_COMPRESSED_IDS=.*@PCI_COMPRESSED_IDS=$(PCI_COMPRESSED_IDS)@" + chmod +x $@ + + # The example of use of libpci -- 2.30.2