summaryrefslogtreecommitdiff
path: root/doUpgrade.go
diff options
context:
space:
mode:
Diffstat (limited to 'doUpgrade.go')
-rw-r--r--doUpgrade.go16
1 files changed, 8 insertions, 8 deletions
diff --git a/doUpgrade.go b/doUpgrade.go
index 1cda60d..6405f83 100644
--- a/doUpgrade.go
+++ b/doUpgrade.go
@@ -13,11 +13,11 @@ import (
func doPackageList(all bool) {
installed := zoopb.NewPackages()
- for p := range me.machine.Wit.IterByName() {
+ for p := range me.machine.Wit.IterByPackage() {
if all {
installed.Append(p)
} else {
- found := me.machine.FindInstalledByName(p.Name)
+ found := me.machine.FindInstalledByName(p.Package)
if found == nil {
continue
}
@@ -54,24 +54,24 @@ func doUpgrade() error {
if argv.Force {
// force remove the packages. can be used if binaries change but versions didn't
- for p := range me.machine.Wit.IterByName() {
- if me.machine.IsInstalled(p.Name) {
- debian.AptRemove(p.Name)
+ for p := range me.machine.Wit.IterByPackage() {
+ if me.machine.IsInstalled(p.Package) {
+ debian.AptRemove(p.Package)
}
}
}
- for p := range me.machine.Wit.IterByName() {
+ for p := range me.machine.Wit.IterByPackage() {
if me.machine.WillUpgrade(p) {
if argv.DryRun {
log.Info("Would install here without --dry-run")
continue
}
if argv.Force {
- debian.AptInstall(p.Name)
+ debian.AptInstall(p.Package)
continue
}
- if _, err := debian.AptInstall(p.Name); err != nil {
+ if _, err := debian.AptInstall(p.Package); err != nil {
me.sh.BadExit("damn it", err)
}
}