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

View File

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