Fix deps not being passed to pacman properly

This commit is contained in:
morganamilo 2018-01-05 22:12:14 +00:00
parent c0fc086a07
commit 142cb25f95
No known key found for this signature in database
GPG Key ID: 6FE9E7996B0B082E
2 changed files with 10 additions and 13 deletions

4
cmd.go
View File

@ -389,7 +389,7 @@ func handleYay() (err error) {
err = localStatistics()
} else if cmdArgs.existsArg("cleandeps") {
err = cleanDependencies()
} else {
} else if len(cmdArgs.targets) > 0 {
err = handleYogurt()
}
@ -533,7 +533,7 @@ func numberMenu(pkgS []string, flags []string) (err error) {
}
if len(aurI) != 0 {
err = aurInstall(aurI, make([]string,0))
err = aurInstall(aurI, nil)
}
return err

View File

@ -18,7 +18,7 @@ func install(parser *arguments) error {
arguments.delArg("y", "refresh")
arguments.targets = make(stringSet)
arguments.addTarget(repos...)
if len(repos) != 0 {
err := passToPacman(arguments)
if err != nil {
@ -27,7 +27,7 @@ func install(parser *arguments) error {
}
if len(aurs) != 0 {
err := aurInstall(aurs, make([]string,0))
err := aurInstall(aurs, []string{"-S"})
if err != nil {
fmt.Println("Error installing aur packages.")
}
@ -136,18 +136,15 @@ func PkgInstall(a *rpc.Pkg, flags []string) (finalmdeps []string, err error) {
}
}
arguments := cmdArgs.copy()
arguments.addArg("asdeps")
arguments.delArg("asexplicit", "ase", "asex")
arguments.delArg("u", "sysupgrade")
arguments.delArg("y", "refresh")
arguments.targets = make(stringSet)
arguments := makeArguments()
arguments.addArg("S", "asdeps", "noconfirm")
arguments.addTarget(repoDeps...)
var depArgs []string
if config.NoConfirm {
depArgs = []string{"--asdeps", "--noconfirm"}
depArgs = []string{"asdeps", "noconfirm"}
} else {
depArgs = []string{"--asdeps"}
depArgs = []string{"asdeps"}
}
// Repo dependencies