Skip to content

Commit 7044aec

Browse files
committed
docs: add warning about output nested in repo_path
Signed-off-by: AtomicFS <vojtech.vesely@9elements.com>
1 parent 5296cfe commit 7044aec

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

docs/src/firmware-action/change_detection.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,40 @@ Each module type has then additional source files. For example `coreboot`, where
3232

3333
When a module is successfully built, a file containing time stamp is saved to `.firmware-action/timestamps/` directory.
3434

35+
```admonish note
36+
The saved time stamp is the time of the check (when was the check performed), and not the time when module is successfully built.
37+
```
38+
3539
On next run, this file (if exists) is loaded with time stamp of last successful run. Then all sources are recursively checked for any file that was modified since the last successful run. If no file was modified since the loaded time stamp, module is considered up-to-date and build is skipped. If any of the files has newer modified time, module is re-built.
3640

3741

42+
### False positives
43+
44+
```admonish warning
45+
As mentioned in [configuration section](config.md#common), you should avoid nested outputs (placing output of one module into output of another module).
46+
47+
However you should also avoid nesting output inside of `repo_path`.
48+
```
49+
50+
When `firmware-action` is checking for modification time, it checks the entirety of the `repo_path` (except `.git` directory), and any single file newer than the saved time stamp will trigger rebuild.
51+
52+
This means that if the output is inside `repo_path`, it will always rebuild because the output artifacts will always be newer that the saved time stamp, and the output in this case is always searched as part of `repo_path`.
53+
54+
```text
55+
Ideal setup:
56+
.
57+
├── repo_path/
58+
└── output-uroot/
59+
└── uroot.bin
60+
61+
Will always rebuild:
62+
.
63+
└── repo_path/
64+
└── output-uroot/
65+
└── uroot.bin
66+
```
67+
68+
3869
## Configuration file changes
3970

4071
`firmware-action` can also detect changes in the configuration file. For each module, on each successful build, it stores a copy of the configuration in `.firmware-action/configs/` directory.

0 commit comments

Comments
 (0)