mirror of
https://github.com/Jguer/yay
synced 2024-10-31 13:42:27 +00:00
Install repo deps for aur packages after questions
This commit is contained in:
parent
cdaee7d1d4
commit
03295c3f3f
1 changed files with 22 additions and 21 deletions
43
install.go
43
install.go
|
@ -81,27 +81,7 @@ func install(parser *arguments) error {
|
|||
if !continueTask("Proceed with install?", "nN") {
|
||||
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")
|
||||
// }
|
||||
|
@ -122,6 +102,27 @@ func install(parser *arguments) error {
|
|||
if err != nil {
|
||||
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")
|
||||
|
|
Loading…
Reference in a new issue