ca-certificates: remove Debianism in run-parts invocation

ca-certificates comes from Debian but not all distros (i.e. Fedora) have a
leaner run-parts that doesn't support the -- separator between options and
paths, which causes this error:

| Running hooks in [...]/rootfs/etc/ca-certificates/update.d...
| [...]/usr/sbin/update-ca-certificates: line 194: Not: command not found

(From OE-Core rev: db2116e7a06c6a35d1d24d9f28ec60926d59b9d7)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Ross Burton
2015-07-06 15:19:41 +01:00
committed by Richard Purdie
parent 9238984340
commit 21bdccb23e
2 changed files with 34 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
ca-certificates is a package from Debian, but some host distros such as Fedora
have a leaner run-parts provided by cron which doesn't support --verbose or the
-- separator between arguments and paths.
This solves errors such as
| Running hooks in [...]/rootfs/etc/ca-certificates/update.d...
| [...]/usr/sbin/update-ca-certificates: line 194: Not: command not found
Upstream-Status: Inappropriate
Signed-off-by: Ross Burton <ross.burton@intel.com>
---
sbin/update-ca-certificates | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/sbin/update-ca-certificates b/sbin/update-ca-certificates
index fed9c25..29ecc69 100755
--- a/sbin/update-ca-certificates
+++ b/sbin/update-ca-certificates
@@ -186,9 +186,7 @@ echo "$ADDED_CNT added, $REMOVED_CNT removed; done."
HOOKSDIR=$SYSROOT/etc/ca-certificates/update.d
echo -n "Running hooks in $HOOKSDIR...."
-VERBOSE_ARG=
-[ "$verbose" = 0 ] || VERBOSE_ARG=--verbose
-eval run-parts $VERBOSE_ARG --test -- $HOOKSDIR | while read hook
+eval run-parts --test $HOOKSDIR | while read hook
do
( cat $ADDED
cat $REMOVED ) | $hook || echo E: $hook exited with code $?.
--
2.1.4

View File

@@ -17,6 +17,7 @@ SRCREV = "2b8a047c78aadbecd90bf8e49ccf68898a211610"
SRC_URI = "git://anonscm.debian.org/collab-maint/ca-certificates.git \
file://0001-update-ca-certificates-remove-c-rehash.patch \
file://0002-update-ca-certificates-use-SYSROOT.patch \
file://0001-update-ca-certificates-don-t-use-Debianisms-in-run-p.patch \
file://default-sysroot.patch \
file://sbindir.patch"