summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-10-14 06:47:20 -0500
committerJeff Carr <[email protected]>2025-10-14 06:47:43 -0500
commit094f1b14e396d09d352f54e9cad50a88fa3e5d43 (patch)
treea07e76c185fd77b171a36aacbef14073e74e8404
parent20fb25ed1699a2940181e7f0cb24d0a59f14ddc5 (diff)
okay nowv0.0.23
-rw-r--r--argv.go2
-rw-r--r--doIncoming.go11
-rw-r--r--doList.go2
3 files changed, 10 insertions, 5 deletions
diff --git a/argv.go b/argv.go
index a3d3532..f84b26b 100644
--- a/argv.go
+++ b/argv.go
@@ -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})
diff --git a/doList.go b/doList.go
index 2aa8205..4a4e26e 100644
--- a/doList.go
+++ b/doList.go
@@ -1,7 +1,7 @@
package main
func doList() (string, error) {
- me.pb.SortFilename()
+ // me.pb.SortFilename()
footer := me.pb.PrintTable()
return footer, nil
}