aboutsummaryrefslogtreecommitdiffstats
path: root/Mk
diff options
context:
space:
mode:
authormat <mat@FreeBSD.org>2016-06-30 17:59:27 +0800
committermat <mat@FreeBSD.org>2016-06-30 17:59:27 +0800
commit50e9d8eec96163a29dee8eeee9d15f3172014f12 (patch)
tree9abdb6f821790adc7ebe1585e793f204b006642f /Mk
parenta2fdad87d3eb82eef6658de0c9572f4936a90d01 (diff)
downloadfreebsd-ports-gnome-50e9d8eec96163a29dee8eeee9d15f3172014f12.tar.gz
freebsd-ports-gnome-50e9d8eec96163a29dee8eeee9d15f3172014f12.tar.zst
freebsd-ports-gnome-50e9d8eec96163a29dee8eeee9d15f3172014f12.zip
Only warn about symlinks that exist in the stage directory, or that
exist nowhere. Sponsored by: Absolight
Diffstat (limited to 'Mk')
-rw-r--r--Mk/Scripts/qa.sh9
1 files changed, 8 insertions, 1 deletions
diff --git a/Mk/Scripts/qa.sh b/Mk/Scripts/qa.sh
index dfcd80c16ea3..30e228c787ca 100644
--- a/Mk/Scripts/qa.sh
+++ b/Mk/Scripts/qa.sh
@@ -144,7 +144,14 @@ symlinks() {
rc=1
;;
/*)
- warn "Bad symlink '${l#${STAGEDIR}}' pointing to an absolute pathname '${link}'"
+ # Only warn for symlinks within the package.
+ if [ -e "${STAGEDIR}${link}" ]; then
+ warn "Bad symlink '${l#${STAGEDIR}}' pointing to an absolute pathname '${link}'"
+ fi
+ # Also warn if the symlink exists nowhere.
+ if [ ! -e "${STAGEDIR}${link}" -a ! -e "${link}" ]; then
+ warn "Symlink '${l#${STAGEDIR}}' pointing to '${link}' which does not exist in the stage directory or in localbase"
+ fi
;;
esac
# Use heredoc to avoid losing rc from find|while subshell.