From d3a62e91f5e91b03cd08877d884d1b220adbbb46 Mon Sep 17 00:00:00 2001 From: Cabbie Team Date: Tue, 23 Jan 2024 13:12:39 -0800 Subject: [PATCH] Modify cabbie to explicitly not search for hidden updates during default and aukera update timers. PiperOrigin-RevId: 600885286 --- cabbie.go | 6 +++--- install.go | 9 +++------ 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/cabbie.go b/cabbie.go index 1feb55d..f7788a0 100644 --- a/cabbie.go +++ b/cabbie.go @@ -362,7 +362,7 @@ func runMainLoop() error { for { select { case <-t.Default.C: - i := installCmd{Interactive: false, visibleUpdates: true} + i := installCmd{Interactive: false} err := i.installUpdates() if e := updateInstallSuccess.Set(err == nil); e != nil { deck.ErrorfA("Error posting metric:\n%v", e).With(eventID(cablib.EvtErrMetricReport)).Go() @@ -385,7 +385,7 @@ func runMainLoop() error { break } if s[0].State == "open" { - i := installCmd{Interactive: false, visibleUpdates: true} + i := installCmd{Interactive: false} err := i.installUpdates() if e := updateInstallSuccess.Set(err == nil); e != nil { deck.ErrorfA("Error posting updateInstallSuccess metric:\n%v", e).With(eventID(cablib.EvtErrMetricReport)).Go() @@ -427,7 +427,7 @@ func runMainLoop() error { } if config.Deadline != 0 { - i := installCmd{Interactive: false, deadlineOnly: true, visibleUpdates: true} + i := installCmd{Interactive: false, deadlineOnly: true} if err := i.installUpdates(); err != nil { deck.ErrorfA("Error installing system updates:\n%v", err).With(eventID(cablib.EvtErrInstallFailure)).Go() } diff --git a/install.go b/install.go index d9157fe..f687ebd 100644 --- a/install.go +++ b/install.go @@ -37,8 +37,8 @@ import ( // Available flags type installCmd struct { - all, drivers, deadlineOnly, Interactive, virusDef, visibleUpdates bool - kbs string + all, drivers, deadlineOnly, Interactive, virusDef bool + kbs string } type installRsp struct { @@ -122,13 +122,10 @@ func (i *installCmd) criteria() (string, []string) { case i.kbs != "": c = search.BasicSearch deck.InfofA("Starting search for KB's %q:\n%s", i.kbs, c).With(eventID(cablib.EvtSearch)).Go() - case i.visibleUpdates: - c = search.BasicSearch + " and IsHidden=0" - deck.InfofA("Starting search for updates which aren't hidden: %s", c).With(eventID(cablib.EvtSearch)).Go() default: c = search.BasicSearch rc = config.RequiredCategories - deck.InfofA("Starting search for all general updates: %s", c).With(eventID(cablib.EvtSearch)).Go() + deck.InfofA("Starting search for general updates: %s", c).With(eventID(cablib.EvtSearch)).Go() } return c, rc }