From: abenson <abenson@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: [PR PATCH] [RFC] hooks/post-install: check for dangling symlinks
Date: Thu, 05 May 2022 05:09:16 +0200 [thread overview]
Message-ID: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-36983@inbox.vuxu.org> (raw)
[-- 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/*")
+}
next reply other threads:[~2022-05-05 3:09 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-05 3:09 abenson [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-36983@inbox.vuxu.org \
--to=abenson@users.noreply.github.com \
--cc=ml@inbox.vuxu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).