mirror of
https://github.com/Jguer/yay
synced 2024-08-31 21:58:39 +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)
|
remoteNamesCache := sliceToStringSet(remoteNames)
|
||||||
localNamesCache := sliceToStringSet(localNames)
|
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
|
//create the arguments to pass for the repo install
|
||||||
arguments := parser.copy()
|
arguments := parser.copy()
|
||||||
arguments.delArg("y", "refresh")
|
arguments.delArg("y", "refresh")
|
||||||
|
@ -59,13 +49,19 @@ func install(parser *arguments) error {
|
||||||
arguments.op = "S"
|
arguments.op = "S"
|
||||||
arguments.targets = make(stringSet)
|
arguments.targets = make(stringSet)
|
||||||
|
|
||||||
|
//if we are doing -u also request all packages needing update
|
||||||
if parser.existsArg("u", "sysupgrade") {
|
if parser.existsArg("u", "sysupgrade") {
|
||||||
ignore, aurUp, err := upgradePkgs(aurUp, repoUp)
|
aurUp, repoUp, err = upList(warnings)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
requestTargets = parser.targets.toSlice()
|
warnings.print()
|
||||||
|
|
||||||
|
ignore, aurUp, err := upgradePkgs(aurUp, repoUp)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
for _, up := range repoUp {
|
for _, up := range repoUp {
|
||||||
if !ignore.get(up.Name) {
|
if !ignore.get(up.Name) {
|
||||||
|
|
Loading…
Reference in a new issue