summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz93@gmail.com>2024-02-01 22:01:00 -0500
committerSam James <sam@gentoo.org>2024-02-02 04:33:18 +0000
commit7faa918e54130698215f6c8230a174005462a8af (patch)
treefbfa0799443d3fcb0d9f020cba82b787322e8ea5 /app-misc
parentdev-util/aruba: Keyword 2.2.0 sparc, #916520 (diff)
downloadgentoo-7faa918e54130698215f6c8230a174005462a8af.tar.gz
gentoo-7faa918e54130698215f6c8230a174005462a8af.tar.bz2
gentoo-7faa918e54130698215f6c8230a174005462a8af.zip
app-misc/ca-certificates: fix ewwy gross warning when no hooks exist
In the previous patch to update-ca-certificates, a continuation was omitted for the case where no hooks exist, and POSIX sh expanded the glob to "*". Bash has nullglob for this, but the POSIX solution is to check if it is a file and skip otherwise. The result: running update-ca-certificates logged an exit 127 of the hook, then blithely continued and returned overall success since hooks aren't defined as required to succeed. Instead, we avoid running nonexistent hooks, which avoids logging any return values and still continues while returning overall success, so, no actual difference. But it does look nicer. Signed-off-by: Eli Schwartz <eschwartz93@gmail.com> Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'app-misc')
-rw-r--r--app-misc/ca-certificates/ca-certificates-20230311.3.96.1-r2.ebuild (renamed from app-misc/ca-certificates/ca-certificates-20230311.3.96.1-r1.ebuild)0
-rw-r--r--app-misc/ca-certificates/files/0001-update-ca-certificates-drop-pointless-dependency-on-.patch12
2 files changed, 7 insertions, 5 deletions
diff --git a/app-misc/ca-certificates/ca-certificates-20230311.3.96.1-r1.ebuild b/app-misc/ca-certificates/ca-certificates-20230311.3.96.1-r2.ebuild
index 677373ebda39..677373ebda39 100644
--- a/app-misc/ca-certificates/ca-certificates-20230311.3.96.1-r1.ebuild
+++ b/app-misc/ca-certificates/ca-certificates-20230311.3.96.1-r2.ebuild
diff --git a/app-misc/ca-certificates/files/0001-update-ca-certificates-drop-pointless-dependency-on-.patch b/app-misc/ca-certificates/files/0001-update-ca-certificates-drop-pointless-dependency-on-.patch
index e64a42808552..bdcb9ce631db 100644
--- a/app-misc/ca-certificates/files/0001-update-ca-certificates-drop-pointless-dependency-on-.patch
+++ b/app-misc/ca-certificates/files/0001-update-ca-certificates-drop-pointless-dependency-on-.patch
@@ -1,4 +1,4 @@
-From 0d5077f59b12bcf64a0489c884e6715cb98ae4b3 Mon Sep 17 00:00:00 2001
+From c33e85bc2fe61e66e2fa5c2ab0efc4277b7cef5e Mon Sep 17 00:00:00 2001
From: Eli Schwartz <eschwartz93@gmail.com>
Date: Mon, 29 Jan 2024 21:54:04 -0500
Subject: [PATCH] update-ca-certificates: drop pointless dependency on external
@@ -25,22 +25,24 @@ It's very easy to replace with `printf %s\\n *`, so do so. Even if it
wasn't easy to replace with printf, it would be easy to replace with
`for x in *; "$x"; done` instead.
---
- image/usr/sbin/update-ca-certificates | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
+ image/usr/sbin/update-ca-certificates | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/image/usr/sbin/update-ca-certificates b/image/usr/sbin/update-ca-certificates
-index bb5aa54..7abffc9 100755
+index bb5aa54..fbf1ee2 100755
--- a/image/usr/sbin/update-ca-certificates
+++ b/image/usr/sbin/update-ca-certificates
-@@ -218,7 +218,7 @@ then
+@@ -218,8 +218,9 @@ then
echo "Running hooks in $HOOKSDIR..."
VERBOSE_ARG=
[ "$verbose" = 0 ] || VERBOSE_ARG="--verbose"
- eval run-parts "$VERBOSE_ARG" --test -- "$HOOKSDIR" | while read hook
+ ( LC_ALL=C; printf %s\\n "$HOOKSDIR"/* ) | while read hook
do
++ [ -f "$hook" ] || continue
( cat "$ADDED"
cat "$REMOVED" ) | "$hook" || echo "E: $hook exited with code $?."
+ done
--
2.43.0