Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] [RFC] hooks/post-install: check for dangling symlinks
@ 2022-05-05  3:09 abenson
  2022-05-05  3:11 ` [PR PATCH] [Updated] " abenson
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: abenson @ 2022-05-05  3:09 UTC (permalink / raw)
  To: ml

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

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

https://github.com/abenson/void-packages nh_checksymlinks
https://github.com/void-linux/void-packages/pull/36983

[RFC] hooks/post-install: check for dangling symlinks
None

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-nh_checksymlinks-36983.patch --]
[-- Type: text/x-diff, Size: 1004 bytes --]

From c5e4f83eb5cad8dd663c7f9f3fc37041dd267a42 Mon Sep 17 00:00:00 2001
From: Andrew Benson <abenson+void@gmail.com>
Date: Wed, 4 May 2022 22:06:14 -0500
Subject: [PATCH] hooks/post-install: check for dangling symlinks

---
 common/hooks/post-install/10-check-symlinks.sh | 11 +++++++++++
 1 file changed, 11 insertions(+)
 create mode 100644 common/hooks/post-install/10-check-symlinks.sh

diff --git a/common/hooks/post-install/10-check-symlinks.sh b/common/hooks/post-install/10-check-symlinks.sh
new file mode 100644
index 000000000000..9edbf082fe2b
--- /dev/null
+++ b/common/hooks/post-install/10-check-symlinks.sh
@@ -0,0 +1,11 @@
+# This hook checks for broken symlinks.
+
+hook() {
+	local dest target f
+	dest=$(readlink -f ${PKGDESTDIR})
+	msg_normal "${PKGDESTDIR} ${dest}\n"
+	while read -r f; do
+		target=$(readlink -m $f)
+		printf "   Symlink missing target: ${f#${PKGDESTDIR}} -> ${target#${dest}}\n"
+	done < <(find ${PKGDESTDIR} -type l -follow -not -path "${PKGDESTDIR}/etc/sv/*")
+}

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

end of thread, other threads:[~2023-09-13  1:45 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-05  3:09 [PR PATCH] [RFC] hooks/post-install: check for dangling symlinks abenson
2022-05-05  3:11 ` [PR PATCH] [Updated] " abenson
2022-05-05 15:49 ` abenson
2022-08-07  2:14 ` github-actions
2022-08-21  2:16 ` [PR PATCH] [Closed]: " github-actions
2022-11-20  2:12 ` github-actions
2023-02-19  2:01 ` github-actions
2023-05-21  1:56 ` github-actions
2023-08-29  1:45 ` github-actions
2023-09-13  1:45 ` [PR PATCH] [Closed]: " github-actions

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).