diff options
author | rillig <rillig@pkgsrc.org> | 2005-12-08 09:01:08 +0000 |
---|---|---|
committer | rillig <rillig@pkgsrc.org> | 2005-12-08 09:01:08 +0000 |
commit | ebba7b0a8cd4537bffa6b490c1a334751e928d48 (patch) | |
tree | 1d6f49c582b4d14ab4d81f5d01d1df6309d5d056 /pkgtools | |
parent | 6e3c5c5a341fe734ac5c9bc30d9ced9e0ab31e2e (diff) | |
download | pkgsrc-ebba7b0a8cd4537bffa6b490c1a334751e928d48.tar.gz |
- Added a warning that prevents the quoting issues from the recent
"pkglint --autofix" change. Added a long and detailed explanation for it.
Diffstat (limited to 'pkgtools')
-rw-r--r-- | pkgtools/pkglint/files/pkglint.pl | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/pkgtools/pkglint/files/pkglint.pl b/pkgtools/pkglint/files/pkglint.pl index d159436c2cc..934cdf9c35f 100644 --- a/pkgtools/pkglint/files/pkglint.pl +++ b/pkgtools/pkglint/files/pkglint.pl @@ -11,7 +11,7 @@ # Freely redistributable. Absolutely no warranty. # # From Id: portlint.pl,v 1.64 1998/02/28 02:34:05 itojun Exp -# $NetBSD: pkglint.pl,v 1.431 2005/12/07 21:39:59 rillig Exp $ +# $NetBSD: pkglint.pl,v 1.432 2005/12/08 09:01:08 rillig Exp $ # # This version contains lots of changes necessary for NetBSD packages # done by: @@ -2182,6 +2182,21 @@ sub checkline_mk_varassign($$$$$) { if (exists(get_deprecated_map()->{$varname})) { $line->log_warning("Definition of ${varname} is deprecated. ".get_deprecated_map()->{$varname}); } + + if ($value =~ qr"^[^=]\@comment") { + $line->log_warning("Please don't use \@comment in variables."); + $line->explain( + "Here you are defining a variable containing \@comment. As this value", + "typically includes a space as the last character you probably also used", + "quotes around the variable. This can lead to confusion when adding this", + "variable to PLIST_SUBST, as all other variables are quoted using the :Q", + "operator when they are appended. As it is hard to check whether a", + "variable that is appended to PLIST_SUBST is already quoted or not, you", + "should not have pre-quoted variables at all. To solve this, you should", + "directly use SUBST_PLIST+= ${varname}=${value} or use any other", + "variable for collecting the list of PLIST substitutions and later", + "append that variable with SUBST_PLIST+= \${MY_SUBST_PLIST}."); + } } # |