Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] xbps-triggers: exit kernel hook on error
@ 2023-05-12  9:06 g4s8
  2023-05-19  8:36 ` g4s8
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: g4s8 @ 2023-05-12  9:06 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 667 bytes --]

There is a new pull request by g4s8 against master on the void-packages repository

https://github.com/g4s8/void-packages exit-trigger-kernel-hook
https://github.com/void-linux/void-packages/pull/43852

xbps-triggers: exit kernel hook on error
Exit kernel-hook scripts with error in case of error in hook.

Ticket: #42047

<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES**

#### Local build testing
- I built this PR locally for my native architecture, (x86_64)



A patch file from https://github.com/void-linux/void-packages/pull/43852.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-exit-trigger-kernel-hook-43852.patch --]
[-- Type: text/x-diff, Size: 1558 bytes --]

From 7f37157f24c8e9f150ae747efaa4cf8c9e9518e2 Mon Sep 17 00:00:00 2001
From: Kirill <g4s8.public@gmail.com>
Date: Fri, 12 May 2023 12:55:03 +0400
Subject: [PATCH] xbps-triggers: exit kernel hook on error

Exit kernel-hook scripts with error in case of error in hook.
Ticket: 42047
---
 srcpkgs/xbps-triggers/files/kernel-hooks | 7 +++----
 srcpkgs/xbps-triggers/template           | 2 +-
 2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/srcpkgs/xbps-triggers/files/kernel-hooks b/srcpkgs/xbps-triggers/files/kernel-hooks
index 61574e90843e..8741e14ddb97 100755
--- a/srcpkgs/xbps-triggers/files/kernel-hooks
+++ b/srcpkgs/xbps-triggers/files/kernel-hooks
@@ -38,11 +38,10 @@ run)
 
 		# A package may export "kernel_hooks_version" as a hint
 		# to pass this version to the hooks.
-		if [ -n "${kernel_hooks_version}" ]; then
-			env ROOTDIR="." ${_file_} ${PKGNAME} ${kernel_hooks_version}
-		else
-			env ROOTDIR="." ${_file_} ${PKGNAME} ${VERSION}
+		if [ -z "${kernel_hooks_version}" ]; then
+			kernel_hooks_version="${VERSION}"
 		fi
+		env ROOTDIR="." ${_file_} ${PKGNAME} ${kernel_hooks_version} || exit 1
 	done
 	;;
 *)
diff --git a/srcpkgs/xbps-triggers/template b/srcpkgs/xbps-triggers/template
index aa62e0902528..b3ebff2be147 100644
--- a/srcpkgs/xbps-triggers/template
+++ b/srcpkgs/xbps-triggers/template
@@ -1,7 +1,7 @@
 # Template file for 'xbps-triggers'
 pkgname=xbps-triggers
 version=0.124
-revision=1
+revision=2
 bootstrap=yes
 short_desc="XBPS triggers for Void Linux"
 maintainer="Enno Boland <gottox@voidlinux.org>"

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-06-27 23:26 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-12  9:06 [PR PATCH] xbps-triggers: exit kernel hook on error g4s8
2023-05-19  8:36 ` g4s8
2023-05-25 18:40 ` ahesford
2023-06-27 22:27 ` classabbyamp
2023-06-27 23:26 ` [PR PATCH] [Closed]: " ahesford

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).