From 32d097405950217bf0597e4ec23d22160f0a2b22 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Thu, 9 Oct 2025 20:01:03 -0500 Subject: need to fix this in the future --- update.go | 2 +- wit.go | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/update.go b/update.go index e61c38f..7ff9594 100644 --- a/update.go +++ b/update.go @@ -89,7 +89,7 @@ func UpdatePackages(me *zoopb.Machine) error { // Print the installed packages and their versions for pname, version := range newP { - found := me.Packages.FindByPackage(pname) + found := me.FindInstalledByName(pname) if found == nil { log.Info("adding new", pname, version) new1 := new(zoopb.Package) diff --git a/wit.go b/wit.go index 222731b..1b562a6 100644 --- a/wit.go +++ b/wit.go @@ -21,7 +21,10 @@ func InitWitMirrors(m *zoopb.Machine) error { // 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) { - check := all.FindByPackage(p.Package) + check, err := all.FindByPackageName(p.Package) + if err != nil { + panic("dup package names") + } if check == nil { all.Append(p) return -- cgit v1.2.3