yay/srcinfo.go
Jo 9f67d10d5c
feat(v12): add group install (#1835)
v12engine: add group install
2022-11-20 02:47:23 +00:00

33 lines
735 B
Go

package main
import (
"github.com/Jguer/yay/v11/pkg/db"
"github.com/Jguer/yay/v11/pkg/pgp"
"github.com/Jguer/yay/v11/pkg/settings"
gosrc "github.com/Morganamilo/go-srcinfo"
)
type srcinfoOperator struct {
dbExecutor db.Executor
}
func (s *srcinfoOperator) Run(pkgbuildDirs map[string]string) (map[string]*gosrc.Srcinfo, error) {
srcinfos, err := parseSrcinfoFiles(pkgbuildDirs, true)
if err != nil {
return nil, err
}
if err := confirmIncompatibleInstall(srcinfos, s.dbExecutor); err != nil {
return nil, err
}
if config.PGPFetch {
if _, errCPK := pgp.CheckPgpKeys(pkgbuildDirs, srcinfos, config.GpgBin, config.GpgFlags, settings.NoConfirm); errCPK != nil {
return nil, errCPK
}
}
return srcinfos, nil
}