usbutils: avoid dependency on bash

By virtue of having #!/bin/bash, the usb-devices script declared that it
requires bash, however manual examination, checkbashisms and tests with
dash and busybox show that it doesn't contain any bashisms, so change
the script's header and remove the RDEPENDS on bash.

Additionally, update-usbids.sh was manually checked for bashisms, run
through checkbashisms and tested with busybox (although it did not have
a bash-specific header).

(From OE-Core rev: 651b223c5fc93c7504e304e954b9ae4640ed47c6)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Paul Eggleton 2012-07-26 11:51:28 +01:00 committed by Richard Purdie
parent e95738004f
commit 0565ae44d9
2 changed files with 34 additions and 3 deletions

View File

@ -0,0 +1,30 @@
From 333d5fbbc03481f1aa222bd68c2609db168ae3e0 Mon Sep 17 00:00:00 2001
From: Paul Eggleton <paul.eggleton@linux.intel.com>
Date: Thu, 26 Jul 2012 10:37:32 +0100
Subject: [PATCH] usb-devices: avoid dependency on bash
By virtue of having #!/bin/bash this script declared that it requires
bash, however manual examination, checkbashisms and tests with dash
and busybox show that it doesn't contain any bashisms, so change the
header to avoid the dependency.
Upstream-Status: Pending
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
usb-devices | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/usb-devices b/usb-devices
index b2052e2..14a5358 100755
--- a/usb-devices
+++ b/usb-devices
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
# Copyright: 2009 Greg Kroah-Hartman <greg@kroah.com>
# 2009 Randy Dunlap <rdunlap@xenotime.net>
--
1.7.9.5

View File

@ -7,9 +7,10 @@ LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
DEPENDS = "libusb zlib"
PR = "r3"
PR = "r4"
SRC_URI = "${KERNELORG_MIRROR}/linux/utils/usb/usbutils/usbutils-${PV}.tar.gz"
SRC_URI = "${KERNELORG_MIRROR}/linux/utils/usb/usbutils/usbutils-${PV}.tar.gz \
file://usb-devices-avoid-dependency-on-bash.patch"
SRC_URI[md5sum] = "49de2403b40bf3a9863faaa8d3858deb"
SRC_URI[sha256sum] = "c122346b0225121bcf159abf804116f826a4a3462c94ce7b8871f7559e6b3a46"
@ -26,4 +27,4 @@ PACKAGES += "${PN}-ids"
FILES_${PN}-dev += "${datadir}/pkgconfig"
FILES_${PN}-ids = "${datadir}/usb*"
RDEPENDS_${PN} = "${PN}-ids bash"
RDEPENDS_${PN} = "${PN}-ids"