mirror of
https://github.com/Jguer/yay
synced 2024-10-31 04:12:51 +00:00
Install repo deps for aur packages at the start
Install all deps for aur packages after the user confirms they want to continue installing. This takes most of the load off of makepkg -s but the -s is still left in for some edge cases with split packages.
This commit is contained in:
parent
f58421953b
commit
e61263ff96
1 changed files with 24 additions and 0 deletions
24
install.go
24
install.go
|
@ -84,6 +84,30 @@ func install(parser *arguments) error {
|
|||
if !continueTask("Proceed with install?", "nN") {
|
||||
return fmt.Errorf("Aborting due to user")
|
||||
}
|
||||
|
||||
if len(dc.RepoMake) + 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())
|
||||
}
|
||||
for _, pkg := range dc.RepoMake {
|
||||
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")
|
||||
// }
|
||||
|
|
Loading…
Reference in a new issue