summaryrefslogtreecommitdiff
path: root/wit.go
diff options
context:
space:
mode:
Diffstat (limited to 'wit.go')
-rw-r--r--wit.go18
1 files changed, 3 insertions, 15 deletions
diff --git a/wit.go b/wit.go
index 1b562a6..d5ac252 100644
--- a/wit.go
+++ b/wit.go
@@ -5,7 +5,6 @@ import (
"os"
"strings"
- "go.wit.com/lib/fhelp"
"go.wit.com/lib/protobuf/zoopb"
"go.wit.com/log"
)
@@ -18,6 +17,7 @@ func InitWitMirrors(m *zoopb.Machine) error {
return err
}
+/*
// adds the package if the name isn't there
// if it's newer, remove the old package and use the new one
func AddIfNewer(all *zoopb.Packages, p *zoopb.Package) {
@@ -29,20 +29,8 @@ func AddIfNewer(all *zoopb.Packages, p *zoopb.Package) {
all.Append(p)
return
}
- v1, _ := fhelp.NewDebVersion(check.Version)
- v2, _ := fhelp.NewDebVersion(p.Version)
- if v1.Equal(v2) {
- // log.Info("do nothing", v1, v2)
- return
- }
- if v1.LessThan(v2) {
- // log.Info("removing", v1, "using", v2)
- all.Delete(check)
- all.Append(p)
- } else {
- // log.Info("keeping", v1, "got:", v2)
- }
}
+*/
func fillPB(p *zoopb.Package, namemap map[string]string) error {
for varname, s := range namemap {
@@ -92,7 +80,7 @@ func scanPackageListFile(m *zoopb.Machine, filename string) error {
p, namemap := parsePackageInfo(debInfo)
_ = namemap
fillPB(p, namemap)
- AddIfNewer(m.Wit, p)
+ m.Wit.Clone(p)
debInfo = ""
}
debInfo += line + "\n"