diff options
Diffstat (limited to 'main.go')
| -rw-r--r-- | main.go | 20 |
1 files changed, 14 insertions, 6 deletions
@@ -26,6 +26,7 @@ var argv args func main() { me = new(mainType) me.sh = prep.Autocomplete(&argv) // adds shell auto complete to go-args + me.pb = new(zoopb.Package) wd, err := os.Getwd() if err != nil { @@ -49,13 +50,20 @@ func main() { log.Info("INITIAL PARSE:") log.Info(string(data)) - dpkgPB := new(zoopb.Package) - debian.ParseDpkgOutputIntoPB(dpkgPB, string(data)) + debian.ParseDpkgOutputIntoPB(me.pb, string(data)) + if argv.Arch == "" { + me.pb.Architecture = "amd64" + } else { + me.pb.Architecture = argv.Arch + } + me.pb.Version = trimNonNumericPrefix(me.repo.GetCurrentVersion()) + me.pb.DebInfo.URL = me.repo.URL + me.pb.DebInfo.Homepage = me.repo.URL // deprecate this usage (?) log.Info("INITIAL PARSE RESULT:") - controlfile := debian.MakeControlFile(dpkgPB) + controlfile := debian.MakeControlFile(me.pb) log.Info(controlfile) log.Info("INITIAL PARSE END") - me.sh.GoodExit("rewriting this app") + // me.sh.GoodExit("rewriting this app") // build() if argv.Show != nil { @@ -77,7 +85,7 @@ func main() { debpath = me.repo.GetFullPath() } _, basename := filepath.Split(debpath) - me.goPath = basename + me.repo.Namespace = basename os.Chdir(debpath) // look for a 'config' file in the repo @@ -86,7 +94,7 @@ func main() { } else { log.Warn("scan failed") } - computeControlValues(me.repo) + // computeControlValues(me.repo) if argv.Dump != nil { for v := range me.repo.Control { |
