feat(new_engine): add support for noDeps and noCheckDeps (#1861)

* feat(new engine): add support for noDeps and noCheckDeps

* test(new engine): Add tests for -dd and normal split package resolution
This commit is contained in:
Jo
2022-12-18 20:14:41 +00:00
committed by GitHub
parent 0b1ae938a3
commit 3eb9eb0d3d
12 changed files with 295 additions and 36 deletions

View File

@@ -6,6 +6,7 @@ import (
"context"
"os"
"path/filepath"
"strings"
"github.com/Jguer/yay/v11/pkg/db"
"github.com/Jguer/yay/v11/pkg/dep"
@@ -27,12 +28,13 @@ func installLocalPKGBUILD(
dbExecutor db.Executor,
) error {
aurCache := config.Runtime.AURCache
noCheck := strings.Contains(config.MFlags, "--nocheck")
if len(cmdArgs.Targets) < 1 {
return errors.New(gotext.Get("no target directories specified"))
}
grapher := dep.NewGrapher(dbExecutor, aurCache, false, settings.NoConfirm, os.Stdout)
grapher := dep.NewGrapher(dbExecutor, aurCache, false, settings.NoConfirm, os.Stdout, cmdArgs.ExistsDouble("d", "nodeps"), noCheck)
graph := topo.New[string, *dep.InstallInfo]()
for _, target := range cmdArgs.Targets {
var errG error