]> Cypherpunks.ru repositories - goredo.git/commitdiff
Fix wrong OOD cache value of the source file
authorSergey Matveev <stargrave@stargrave.org>
Wed, 18 Jan 2023 12:09:37 +0000 (15:09 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Wed, 18 Jan 2023 12:09:37 +0000 (15:09 +0300)
doc/news.texi
ood.go
usage.go

index 769c37501516bb3abb625cbcae03d534fad19a6f..d519c7d3d3443673fe08b6a4c7769f8fc61b2617 100644 (file)
@@ -2,6 +2,14 @@
 @cindex news
 @unnumbered News
 
+@anchor{Release 1_30_0}
+@section Release 1.30.0
+@itemize
+@item
+    Fixed wrong OOD-cache value of source file dependency.
+    Targets could be rebuilt without any reason.
+@end itemize
+
 @anchor{Release 1_29_0}
 @section Release 1.29.0
 @itemize
diff --git a/ood.go b/ood.go
index 25253ced2eaac52a57f49ba23f47fac50c91de35..b46ea63ee8d6a076090c6255caf2c311795397a3 100644 (file)
--- a/ood.go
+++ b/ood.go
@@ -137,9 +137,15 @@ func isOOD(cwd, tgtOrig string, level int, seen map[string]struct{}) (bool, erro
        depPath := path.Join(cwd, RedoDir, tgt+DepSuffix)
        fdDep, err := os.Open(depPath)
        if err != nil {
-               tracef(CDebug, "ood: %s%s -> no dep: %s", indent, tgtOrig, depPath)
-               OODCache[path.Join(cwd, tgt)] = true
-               return true, nil
+               if isSrc(cwd, tgt) {
+                       ood = false
+                       tracef(CDebug, "ood: %s%s -> is source", indent, tgtOrig)
+               } else {
+                       ood = true
+                       tracef(CDebug, "ood: %s%s -> no dep: %s", indent, tgtOrig, depPath)
+               }
+               OODCache[path.Join(cwd, tgt)] = ood
+               return ood, nil
        }
        depInfo, err := depRead(fdDep)
        fdDep.Close()
index ec46d58e84f911e8259d2a21a9b90ad4eab99dd7..e67077fdfd40c6a8c5bab6e376ed9301c92fd17f 100644 (file)
--- a/usage.go
+++ b/usage.go
@@ -24,7 +24,7 @@ import (
 )
 
 const (
-       Version  = "1.29.0"
+       Version  = "1.30.0"
        Warranty = `Copyright (C) 2020-2023 Sergey Matveev
 
 This program is free software: you can redistribute it and/or modify