summaryrefslogtreecommitdiff
path: root/apt.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-12-02 10:44:03 -0600
committerJeff Carr <[email protected]>2024-12-02 10:44:03 -0600
commitba5c32d24465b1d958b20d9dba62fd2b7b2d0df1 (patch)
tree4eeffa2cfc7d426b0937d1fc8f9849a50aa02991 /apt.go
parent0be7da7cea8fa3e6cad5fbb36922ec589d26c2c4 (diff)
try macos build to see if it works
Diffstat (limited to 'apt.go')
-rw-r--r--apt.go37
1 files changed, 0 insertions, 37 deletions
diff --git a/apt.go b/apt.go
index 5b213e9..020a3e2 100644
--- a/apt.go
+++ b/apt.go
@@ -40,40 +40,3 @@ func (me *Machine) addNew(name string, version string) bool {
new1.Version = version
return me.Packages.Append(new1)
}
-
-/*
-func (me *Machine) UpdatePackages() string {
- // Get the list of installed packages for the detected distro
- newP, err := getPackageList(me.Distro)
- if err != nil {
- fmt.Println("Error:", err)
- return fmt.Sprintln("getPackageList()", err)
- }
-
- 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)
- me.addNew(pkg, version)
- newCounter += 1
- } else {
- found.Version = version
- panic("redo this. broken after autogenpb. was never right anyway")
- //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)
- }
- return footer
-}
-*/