From 15989c6956565eff5b0e8592ee247c09e2120ee1 Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Fri, 9 Jun 2023 15:32:15 -0400 Subject: sbopkglint: only check for $TMP/package-*, eliminates a lot of false positives. --- sbopkglint.d/70-tmp_path.t.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sbopkglint.d/70-tmp_path.t.sh b/sbopkglint.d/70-tmp_path.t.sh index 4bf9218..933cf77 100644 --- a/sbopkglint.d/70-tmp_path.t.sh +++ b/sbopkglint.d/70-tmp_path.t.sh @@ -6,13 +6,13 @@ # directory is the root of the installed package tree. ####################################################################### -# checks for /tmp/SBo (or the environment TMP) hardcoded in files. -# don't check the SlackBuild in the doc dir, since it's guaranteed to match. -# also don't check kernel modules (they include the full path to the source, -# for debug messages). +# checks for $TMP/package-* hardcoded in files. uses the environment +# TMP, defaults to /tmp/SBo. this means that if you set TMP when +# building the package, you have to set it to the same thing for this +# check to work properly. If you don't ever set it, it'll be fine. -found="$(find . -type f | grep -v '^\./usr/doc/.*\.SlackBuild$' | grep -v '^\./lib/modules/' | xargs fgrep -l "$TMP")" +found="$(find . -type f | xargs fgrep -l "$TMP/package-")" if [ -n "$found" ]; then - warn "found files with TMP ($TMP) baked in:" + warn "found files with TMP ($TMP/package-*) baked in:" echo "$found" 1>&2 fi -- cgit v1.2.3