diff options
Diffstat (limited to 'control.read.go')
| -rw-r--r-- | control.read.go | 45 |
1 files changed, 2 insertions, 43 deletions
diff --git a/control.read.go b/control.read.go index d6a4c0d..ee0673a 100644 --- a/control.read.go +++ b/control.read.go @@ -35,7 +35,7 @@ func readControlFile(repo *gitpb.Repo) error { log.Warn("readControlFile() could not find the file") // return errors.New("'control': file not found") // if this happens, make up a fake control file - pairs["Architecture"] = "amd64" // TODO: figure this out + pairs["Architecture"] = argv.Arch pairs["Recommends"] = "" pairs["Source"] = "notsure" if me.repo == nil { @@ -93,49 +93,8 @@ func readControlFile(repo *gitpb.Repo) error { } for key, value := range pairs { repo.Control[key] = value - /* - switch key { - case "Source": - c.Source.SetText(value) - case "Build-Depends": - c.BuildDepends.SetText(value) - case "Description": - c.Description.SetText(value) - case "Maintainer": - c.Maintainer.SetText(value) - case "Packager": - c.Packager.SetText(value) - case "GoPath": - c.GoPath.SetText(value) - case "URL": - c.URL.SetText(value) - case "Depends": - c.Depends.SetText(value) - case "Recommends": - c.Recommends.SetText(value) - case "Conflicts": - c.Conflicts.SetText(value) - case "Version": - c.Version.SetText(value) - case "Package": - c.Package.SetText(value) - // if c.Package.String() != value { - // log.Warn("not sure what to do with Package", c.Package.String(), value) - // } - case "Architecture": - // todo: add logic to find OS arch - if c.Architecture.String() != value { - log.Warn("attempting to set arch to", value) - c.Architecture.SetText(value) - - } - default: - log.Warn("the 'control' file has a value I don't know about") - log.Warn("error unknown key", key, "value:", value) - } - */ } - pairs["Architecture"] = "amd64" // TODO: figure this out + pairs["Architecture"] = argv.Arch if err := scanner.Err(); err != nil { return err |
