mirror of
https://github.com/Jguer/yay
synced 2024-07-18 16:33:38 +00:00
Simplfy upgrade skipping
This commit is contained in:
parent
e76f978d63
commit
7a1e2de6cd
20
install.go
20
install.go
|
@ -41,16 +41,6 @@ func install(parser *arguments) error {
|
|||
remoteNamesCache := sliceToStringSet(remoteNames)
|
||||
localNamesCache := sliceToStringSet(localNames)
|
||||
|
||||
//if we are doing -u also request all packages needing update
|
||||
if parser.existsArg("u", "sysupgrade") {
|
||||
aurUp, repoUp, err = upList(warnings)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
warnings.print()
|
||||
}
|
||||
|
||||
//create the arguments to pass for the repo install
|
||||
arguments := parser.copy()
|
||||
arguments.delArg("y", "refresh")
|
||||
|
@ -59,13 +49,19 @@ func install(parser *arguments) error {
|
|||
arguments.op = "S"
|
||||
arguments.targets = make(stringSet)
|
||||
|
||||
//if we are doing -u also request all packages needing update
|
||||
if parser.existsArg("u", "sysupgrade") {
|
||||
ignore, aurUp, err := upgradePkgs(aurUp, repoUp)
|
||||
aurUp, repoUp, err = upList(warnings)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
requestTargets = parser.targets.toSlice()
|
||||
warnings.print()
|
||||
|
||||
ignore, aurUp, err := upgradePkgs(aurUp, repoUp)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
for _, up := range repoUp {
|
||||
if !ignore.get(up.Name) {
|
||||
|
|
Loading…
Reference in a new issue