diff options
Diffstat (limited to 'internal/rosa/state.go')
| -rw-r--r-- | internal/rosa/state.go | 43 |
1 files changed, 31 insertions, 12 deletions
diff --git a/internal/rosa/state.go b/internal/rosa/state.go index 767038ba..73a40b6e 100644 --- a/internal/rosa/state.go +++ b/internal/rosa/state.go @@ -811,14 +811,17 @@ func (s *S) getFrame() azalea.Frame { args azalea.FArgs, ) (v any, set bool, err error) { var attr GenericHelper + chdir := true if err = args.Apply(map[unique.Handle[azalea.Ident]]any{ - k("inPlace"): &attr.InPlace, + k("chdir"): &chdir, k("build"): &attr.Build, k("check"): &attr.Check, k("install"): &attr.Install, }); err != nil { return } + attr.InPlace = !chdir + v = &attr set = true return @@ -828,28 +831,33 @@ func (s *S) getFrame() azalea.Frame { args azalea.FArgs, ) (v any, set bool, err error) { var attr MakeHelper + defaults, chdir, checkEarly := true, true, true + attr.Configure, attr.Check = []KV{}, []string{} if err = args.Apply(map[unique.Handle[azalea.Ident]]any{ - k("omitDefaults"): &attr.OmitDefaults, + k("defaults"): &defaults, k("generate"): &attr.Generate, k("preMake"): &attr.ScriptMakeEarly, k("preCheck"): &attr.ScriptCheckEarly, k("postInstall"): &attr.Script, - k("inPlace"): &attr.InPlace, - k("skipConfigure"): &attr.SkipConfigure, + k("chdir"): &chdir, k("configureName"): &attr.ConfigureName, k("forceAutoconf"): &attr.ForceAutoconf, k("configure"): &attr.Configure, k("host"): &attr.Host, k("build"): &attr.Build, k("make"): &attr.Make, - k("skipCheck"): &attr.SkipCheck, k("check"): &attr.Check, k("install"): &attr.Install, - k("skipEarlyStageCheck"): &attr.SkipCheckEarly, + k("checkEarly"): &checkEarly, }); err != nil { return } + attr.OmitDefaults, attr.InPlace = !defaults, !chdir + attr.SkipConfigure = attr.Configure == nil + attr.SkipCheck = attr.Check == nil + attr.SkipCheckEarly = !checkEarly + v = &attr set = true return @@ -859,17 +867,20 @@ func (s *S) getFrame() azalea.Frame { args azalea.FArgs, ) (v any, set bool, err error) { var attr CMakeHelper + var test azalea.AString if err = args.Apply(map[unique.Handle[azalea.Ident]]any{ k("append"): &attr.Append, k("buildType"): &attr.BuildType, k("cache"): &attr.Cache, k("postInstall"): &attr.Script, - k("test"): &attr.Test, - k("skipTest"): &attr.SkipTest, + k("test"): &test, k("make"): &attr.Make, }); err != nil { return } + attr.Test = test.V + attr.SkipTest = test.Nil + v = &attr set = true return @@ -879,18 +890,21 @@ func (s *S) getFrame() azalea.Frame { args azalea.FArgs, ) (v any, set bool, err error) { var attr MesonHelper + test := true if err = args.Apply(map[unique.Handle[azalea.Ident]]any{ k("muon"): &attr.Muon, k("preCompile"): &attr.ScriptCompileEarly, k("postCompile"): &attr.ScriptCompiled, k("postInstall"): &attr.Script, k("setup"): &attr.Setup, - k("skipTest"): &attr.SkipTest, + k("test"): &test, k("skipTests"): &attr.SkipTests, k("interactiveTest"): &attr.InteractiveTest, }); err != nil { return } + attr.SkipTest = !test + v = &attr set = true return @@ -900,11 +914,13 @@ func (s *S) getFrame() azalea.Frame { args azalea.FArgs, ) (v any, set bool, err error) { var attr MakeMakerHelper + doCheck := true if err = args.Apply(map[unique.Handle[azalea.Ident]]any{ - k("skipCheck"): &attr.SkipCheck, + k("check"): &doCheck, }); err != nil { return } + attr.SkipCheck = !doCheck v = &attr set = true return @@ -914,17 +930,20 @@ func (s *S) getFrame() azalea.Frame { args azalea.FArgs, ) (v any, set bool, err error) { var attr PipHelper + var scriptCheck azalea.AString if err = args.Apply(map[unique.Handle[azalea.Ident]]any{ k("append"): &attr.Append, k("buildIsolation"): &attr.BuildIsolation, k("enterSource"): &attr.EnterSource, k("install"): &attr.Install, - k("skipCheck"): &attr.SkipCheck, - k("check"): &attr.Check, + k("check"): &scriptCheck, k("postInstall"): &attr.Script, }); err != nil { return } + attr.Check = scriptCheck.V + attr.SkipCheck = scriptCheck.Nil + v = &attr set = true return |
