diff options
| author | Jeff Carr <[email protected]> | 2024-11-18 20:13:22 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-11-18 20:13:22 -0600 |
| commit | 0ad4ffd0c6f4554fcbec9fb510513784e297fd2a (patch) | |
| tree | 997d2471a57352e98226decc3cf613a7a3538774 /apt.go | |
| parent | 82c559e6579f950b11e2fae1afc67660a14c0629 (diff) | |
stuffv0.0.5
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'apt.go')
| -rw-r--r-- | apt.go | 34 |
1 files changed, 0 insertions, 34 deletions
@@ -37,37 +37,3 @@ func addNew(name string, version string) bool { new1.Version = version return me.packages.Append(new1) } - -func updatePackagesOld() { - // Get the list of installed packages for the detected distro - newP, err := getPackageList(me.distro) - if err != nil { - fmt.Println("Error:", err) - return - } - - var newCounter, changeCounter int - // Print the installed packages and their versions - for pkg, version := range newP { - found := me.packages.FindByName(pkg) - if found == nil { - log.Info("adding new", pkg, version) - addNew(pkg, version) - newCounter += 1 - } else { - found.Version = version - if me.packages.Update(found) { - changeCounter += 1 - } - } - } - - footer := fmt.Sprintf("%s has distro %s with %d packages installed", me.hostname, me.distro, me.packages.Len()) - if changeCounter != 0 { - footer += fmt.Sprintf(" (%d changed)", changeCounter) - } - if newCounter != 0 { - footer += fmt.Sprintf(" (%d new)", newCounter) - } - log.Info(footer) -} |
