You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Whilst working on a custom build it has been observed that if I have an openwrt package that includes a build/Prepare step which copies sourcecode from the packagedir to the build dir this does not always happen if the sourcecode has been modified.
I've tracked it down to the find_mds step which uses the find command to make a list of all the files in the package directory.
This list is passed to the mkhash utility on stdin, which produces the hash part of the .prepared file.
If the contents of the list change then the build/Prepare step is re-ran, which copies the source code from package dir to build dir.
However if the contents of the list have not changed then the build/Prepare step is not run leaving the old stale files in the build dir.
There are a few issues with the list method
The order of files is undefined, the list can change order resulting in a different hash causing false rebuild
If a file is modified it may not go to the end of the list, resulting in same list with same hash so no build when required.
By adding modified time after the filename, then sorting the list both the above two issues can be resolved.
johnbeckettn2e:
Whilst working on a custom build it has been observed that if I have an openwrt package that includes a build/Prepare step which copies sourcecode from the packagedir to the build dir this does not always happen if the sourcecode has been modified.
I've tracked it down to the find_mds step which uses the find command to make a list of all the files in the package directory.
This list is passed to the mkhash utility on stdin, which produces the hash part of the .prepared file.
If the contents of the list change then the build/Prepare step is re-ran, which copies the source code from package dir to build dir.
However if the contents of the list have not changed then the build/Prepare step is not run leaving the old stale files in the build dir.
There are a few issues with the list method
The order of files is undefined, the list can change order resulting in a different hash causing false rebuild
If a file is modified it may not go to the end of the list, resulting in same list with same hash so no build when required.
By adding modified time after the filename, then sorting the list both the above two issues can be resolved.
I've made a potential fix here : #3445
I've tested my fix locally and I can see rebuilds only when I modify source.
Supply the following if possible:
The text was updated successfully, but these errors were encountered: