mirror of
https://github.com/Jguer/yay
synced 2024-10-31 13:42:27 +00:00
Split .SRCINFO parsing to its own function
This commit is contained in:
parent
ad898b2d33
commit
83491069d3
1 changed files with 18 additions and 3 deletions
19
install.go
19
install.go
|
@ -110,6 +110,15 @@ func install(parser *arguments) error {
|
|||
return err
|
||||
}
|
||||
|
||||
err = parseSRCINFOs(dc.AurMake)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = parseSRCINFOs(dc.Aur)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if _, ok := arguments.options["gendb"]; ok {
|
||||
fmt.Println("GenDB finished. No packages were installed")
|
||||
return nil
|
||||
|
@ -271,7 +280,14 @@ func askEditPkgBuilds(pkgs []*rpc.Pkg) (error) {
|
|||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func parseSRCINFOs(pkgs []*rpc.Pkg) error {
|
||||
for _, pkg := range pkgs {
|
||||
dir := config.BuildDir + pkg.PackageBase + "/"
|
||||
|
||||
pkgbuild, err := gopkg.ParseSRCINFO(dir + ".SRCINFO")
|
||||
if err == nil {
|
||||
|
@ -280,12 +296,11 @@ func askEditPkgBuilds(pkgs []*rpc.Pkg) (error) {
|
|||
if owner != "" && repo != "" {
|
||||
err = branchInfo(pkg.Name, owner, repo)
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return nil
|
||||
|
|
Loading…
Reference in a new issue