aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsbolint9
1 files changed, 8 insertions, 1 deletions
diff --git a/sbolint b/sbolint
index 65bd0bd..f96f365 100755
--- a/sbolint
+++ b/sbolint
@@ -322,6 +322,9 @@ to config() or preserve_perms() must end with a B<.new> suffix.
If doinst.sh calls B<gtk-update-icon-cache>, the existence of the
cache must be checked before this command is run.
++=item -
++doinst.sh must not use chmod or refer to the build-time $PKG directory.
+
=back
=item -
@@ -1823,7 +1826,11 @@ sub check_doinst {
s,\s*$,,;
next unless /./;
- if(/^config\(\)/) {
+ if(/chmod/) {
+ log_error("$file:$lineno: doinst.sh must not use chmod; set file permissions while building the package.");
+ } elsif(/\$\{?PKG\}?/ || /"\$PKG"/) {
+ log_error("$file:$lineno: doinst.sh must not use \$PKG; package root is the current directory.");
+ } elsif(/^config\(\)/) {
$config_defined = $lineno;
} elsif(/^config\s+/) {
# the [\@\$] is intended to skip stuff like $NEW, or a for loop variable,