Github messages for voidlinux
 help / color / mirror / Atom feed
From: abenson <abenson@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] [RFC] hooks/post-install: check for dangling symlinks
Date: Thu, 05 May 2022 05:11:26 +0200	[thread overview]
Message-ID: <20220505031126.lEPJrzgAlQRupM5DIPzYEFKfxa2oZp3I8cHjD1wop80@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-36983@inbox.vuxu.org>

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

There is an updated 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: 964 bytes --]

From d926f217a7843c6745cbbe0190b34d7e3bf1b288 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 | 10 ++++++++++
 1 file changed, 10 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..b4bb29e19f43
--- /dev/null
+++ b/common/hooks/post-install/10-check-symlinks.sh
@@ -0,0 +1,10 @@
+# This hook checks for broken symlinks.
+
+hook() {
+	local dest target f
+	dest=$(readlink -f ${PKGDESTDIR})
+	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/*")
+}

  reply	other threads:[~2022-05-05  3:11 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-05  3:09 [PR PATCH] " abenson
2022-05-05  3:11 ` abenson [this message]
2022-05-05 15:49 ` [PR PATCH] [Updated] " 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=20220505031126.lEPJrzgAlQRupM5DIPzYEFKfxa2oZp3I8cHjD1wop80@z \
    --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).