Install repo deps for aur packages after questions

This commit is contained in:
morganamilo 2018-02-16 15:33:17 +00:00
parent cdaee7d1d4
commit 03295c3f3f
No known key found for this signature in database
GPG key ID: 6FE9E7996B0B082E

View file

@ -82,26 +82,6 @@ func install(parser *arguments) error {
return fmt.Errorf("Aborting due to user")
}
if len(dc.Repo) > 0 {
arguments := parser.copy()
arguments.delArg("u", "sysupgrade")
arguments.delArg("y", "refresh")
arguments.op = "S"
arguments.targets = make(stringSet)
arguments.addArg("needed", "asdeps")
for _, pkg := range dc.Repo {
arguments.addTarget(pkg.Name())
}
oldConfirm := config.NoConfirm
config.NoConfirm = true
passToPacman(arguments)
config.NoConfirm = oldConfirm
if err != nil {
return err
}
}
// if !continueTask("Proceed with download?", "nN") {
// return fmt.Errorf("Aborting due to user")
// }
@ -123,6 +103,27 @@ func install(parser *arguments) error {
return err
}
if len(dc.Repo) > 0 {
arguments := parser.copy()
arguments.delArg("u", "sysupgrade")
arguments.delArg("y", "refresh")
arguments.op = "S"
arguments.targets = make(stringSet)
arguments.addArg("needed", "asdeps")
for _, pkg := range dc.Repo {
arguments.addTarget(pkg.Name())
}
oldConfirm := config.NoConfirm
config.NoConfirm = true
passToPacman(arguments)
config.NoConfirm = oldConfirm
if err != nil {
return err
}
}
if _, ok := arguments.options["gendb"]; ok {
fmt.Println("GenDB finished. No packages were installed")
return nil