mrrl

Minimal Reliable Reproducible Linux
git clone https://ccx.te2000.cz/git/mrrl
Log | Files | Refs | Submodules | README

commit 82e3d277d2678f7072dbd3778fb6961e24298ae9
parent 4e5fd0f30b2ca11c74c18f572b5968a9f72a2882
Author: Jan Pobříslo <ccx@te2000.cz>
Date:   Fri, 23 Feb 2024 19:23:58 +0100

Do not generate enviroments for @pragma nopath

Diffstat:
Mcommand/pthbs-makegen | 14+++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/command/pthbs-makegen b/command/pthbs-makegen @@ -23,7 +23,8 @@ BEGIN { } close("downloadlist.sha256") - sandbox = 1 + settings["sandbox"] = 1 + settings["set_path"] = 1 dep_count = 0 env_count = 0 is_envfile = ENVIRON["script"] ~ /\.environment$/ @@ -96,7 +97,7 @@ function make_envfile( n, envfile, envhash) { /^#!/ { next } /^#\+/ { if($0 == "#+*") { - sandbox = 0 + settings["sandbox"] = 0 } else { have_envdep(substr($0, 3)) } @@ -106,6 +107,13 @@ function make_envfile( n, envfile, envhash) { if($1 == "#@git") { next } else if($1 == "#@pragma") { + if($2 == "nosandbox") { + settings["sandbox"] = 0 + } else if($2 == "nopath") { + settings["set_path"] = 0 + } else { + fatal("unrecognized @pragma:") + } next } else if($1 == "#@sha256") { if(match($0, "^#@sha256:[0-9a-f]+:") == 0) { @@ -123,7 +131,7 @@ function make_envfile( n, envfile, envhash) { next } /^$/ && !is_envfile { - if(env_count) { + if(env_count && settings["set_path"]) { make_envfile() } printf "%s", "$(VERSIONS)/"ENVIRON["package"]"/.install-links:"