aboutsummaryrefslogtreecommitdiffhomepage
path: root/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'cmd')
-rw-r--r--cmd/mbf/main.go26
1 files changed, 26 insertions, 0 deletions
diff --git a/cmd/mbf/main.go b/cmd/mbf/main.go
index 7a9864b4..4b2c541f 100644
--- a/cmd/mbf/main.go
+++ b/cmd/mbf/main.go
@@ -10,6 +10,7 @@ import (
"os/signal"
"path/filepath"
"runtime"
+ "strconv"
"syscall"
"time"
"unique"
@@ -129,6 +130,31 @@ func main() {
)
}
+ c.NewCommand("updates", command.UsageInternal, func([]string) error {
+ var n int
+ for i := range rosa.PresetEnd {
+ p := rosa.PArtifact(i)
+ meta := rosa.GetMetadata(p)
+ if meta.ID == 0 {
+ continue
+ }
+
+ if v, err := meta.GetVersions(ctx); err != nil {
+ return err
+ } else if current := rosa.Std.Version(p); v.Latest != current {
+ n++
+ log.Printf("%s %s < %s", meta.Name, current, v.Latest)
+ } else {
+ msg.Verbosef("%s is up to date", meta.Name)
+ }
+ }
+
+ if n > 0 {
+ return errors.New(strconv.Itoa(n) + " packages are out of date")
+ }
+ return nil
+ })
+
{
var (
flagGentoo string