diff options
| author | Jeff Carr <[email protected]> | 2025-10-14 06:47:20 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-10-14 06:47:43 -0500 |
| commit | 094f1b14e396d09d352f54e9cad50a88fa3e5d43 (patch) | |
| tree | a07e76c185fd77b171a36aacbef14073e74e8404 | |
| parent | 20fb25ed1699a2940181e7f0cb24d0a59f14ddc5 (diff) | |
okay nowv0.0.23
| -rw-r--r-- | argv.go | 2 | ||||
| -rw-r--r-- | doIncoming.go | 11 | ||||
| -rw-r--r-- | doList.go | 2 |
3 files changed, 10 insertions, 5 deletions
@@ -55,7 +55,7 @@ func (args) Appname() string { } func (a args) DoAutoComplete(pb *prep.Auto) { - base := []string{"oldway", "--dry-run", "--force", "incoming", "walk", "list", "everything", "verify", "newest", "--create", "--verbose"} + base := []string{"--dry-run", "--force", "incoming", "walk", "list", "everything", "verify", "newest", "--create", "--verbose"} if pb.Cmd == "" { pb.Autocomplete3(base) diff --git a/doIncoming.go b/doIncoming.go index 283cb64..f1b8cb9 100644 --- a/doIncoming.go +++ b/doIncoming.go @@ -24,13 +24,12 @@ func doIncoming(pb *zoopb.Packages) (string, error) { } if !info.IsDir() && strings.HasSuffix(info.Name(), ".deb") { - counter += 1 if found := me.pb.FindByFilename(path); found != nil { // log.Printf("not new file %s\n", path) - return nil + counter += 1 } newcount += 1 - if strings.HasPrefix(path, "pool/main/incoming") { + if strings.HasPrefix(path, "pool/main") { _, filename := filepath.Split(path) parts := strings.Split(filename, "_") if len(parts) != 3 { @@ -41,6 +40,10 @@ func doIncoming(pb *zoopb.Packages) (string, error) { packageName := parts[0] letteredDir := log.Sprintf("%1.1s", filename) newfilename := filepath.Join("pool/main", letteredDir, packageName, filename) + if newfilename == path { + // the filename is correct + return nil + } destDir := filepath.Dir(newfilename) if err := os.MkdirAll(destDir, 0755); err != nil { log.Printf("%s move incoming oldname %s newname: %s\n", packageName, path, newfilename) @@ -53,6 +56,8 @@ func doIncoming(pb *zoopb.Packages) (string, error) { oldmd5 := md5.Sum(olddata) newmd5 := md5.Sum(newdata) if oldmd5 == newmd5 { + log.Info("OLD FILE", path) + log.Info("NEW FILE", newfilename) log.Printf("files are the same %x %x\n", md5.Sum(olddata), md5.Sum(newdata)) } else { shell.RunVerbose([]string{"dpkg", "-I", path}) @@ -1,7 +1,7 @@ package main func doList() (string, error) { - me.pb.SortFilename() + // me.pb.SortFilename() footer := me.pb.PrintTable() return footer, nil } |
