summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doDebian.go2
-rw-r--r--doUpgrade.go2
-rw-r--r--structs.go2
-rw-r--r--tableRepos.go4
4 files changed, 7 insertions, 3 deletions
diff --git a/doDebian.go b/doDebian.go
index 4308d8d..37c0315 100644
--- a/doDebian.go
+++ b/doDebian.go
@@ -13,6 +13,7 @@ import (
)
func doDebian() error {
+ initForge()
// clean out old deb files
globPattern := filepath.Join(me.homedir, "incoming", "*.deb")
files, err := filepath.Glob(globPattern)
@@ -27,7 +28,6 @@ func doDebian() error {
return err
}
- initForge()
// doInstallScan()
found := gitpb.NewRepos()
diff --git a/doUpgrade.go b/doUpgrade.go
index 7a499e9..1cda60d 100644
--- a/doUpgrade.go
+++ b/doUpgrade.go
@@ -29,7 +29,7 @@ func doPackageList(all bool) {
}
func doUpgrade() error {
- me.machine, _ = debian.InitMachine()
+ me.machine = debian.InitMachine()
if argv.Upgrade.List != nil {
if argv.All {
diff --git a/structs.go b/structs.go
index 27da99f..3ef197d 100644
--- a/structs.go
+++ b/structs.go
@@ -33,6 +33,6 @@ func initForge() {
func initMachine() {
if me.machine == nil {
- me.machine, _ = debian.InitMachine()
+ me.machine = debian.InitMachine()
}
}
diff --git a/tableRepos.go b/tableRepos.go
index c15dbd6..863e35c 100644
--- a/tableRepos.go
+++ b/tableRepos.go
@@ -13,10 +13,14 @@ func isPackageOnMirrors(repo *gitpb.Repo) bool {
var found *zoopb.Package
name := me.forge.Config.DebName(repo.Namespace)
for pkg := range me.machine.Wit.IterAll() {
+ // log.Info(pkg)
if name == pkg.Name {
found = pkg
}
}
+ if found == nil {
+ return false
+ }
if found.PkgName == "" {
log.Info("found", found)
}