On Wed, Aug 02, 2023 at 10:18:16AM +0200, Omar Polo wrote:
> On 2023/08/02 09:56:07 +0200, Omar Polo <[email protected]> wrote:
> > On 2023/07/31 19:37:44 -0400, Thomas Frohwein <[email protected]>
> > wrote:
> > > I am attaching a tarball with the above changes. ok?
> >
> > you could consider changing the hardcoded /usr/local/ with ${PREFIX}
> > to please portcheck.
>
> err, i meant LOCALBASE :-)
Thanks, I committed it with /usr/local/ still. There have been
discussions around this topic and the value (or lack thereof) on
changing the hardcode paths.
As we seem to be in a state of limbo about this, let me offer a step in
the direction of relaxing about /usr/local/ by calming portcheck:
Index: portcheck
===================================================================
RCS file: /cvs/ports/infrastructure/bin/portcheck,v
retrieving revision 1.144
diff -u -p -r1.144 portcheck
--- portcheck 24 Apr 2023 11:44:20 -0000 1.144
+++ portcheck 2 Aug 2023 22:13:06 -0000
@@ -1715,13 +1715,12 @@ check_pkg_dir() {
}
# Checks made:
-# * There are no hardcoded /usr/local or /var paths in file.
+# * There are no hardcoded /var paths in file.
# /var/log, /var/run and /var/tmp are perfectly fine, though.
check_hardcoded() {
$debugging && echo "CALLED: check_hardcoded($*)" >&2
perl -n -e 'BEGIN { $ec=0; }
- if (m,/usr/local\b,o) { $ec=1; close ARGV; }
if (m,/var((?:/+[^/\s]+)*)(?:\s.*)?$,o) {
unless ($1 =~ m,^/+(?:log|run|tmp),o) {
$ec=1; close ARGV;
@@ -1729,7 +1728,7 @@ check_hardcoded() {
}
END { $? = $ec; }' \
"$1" || err "hardcoded paths detected in $1, consider using" \
- "SUBST_VARS and TRUEPREFIX/LOCALBASE/LOCALSTATEDIR/VARBASE"
+ "SUBST_VARS and LOCALSTATEDIR/VARBASE"
}
# Checks made: