Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FS#3360 - make with source files in package does not always rebuild #8215

Open
openwrt-bot opened this issue Sep 24, 2020 · 0 comments
Open
Labels

Comments

@openwrt-bot
Copy link

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:

  • Device problem occurs on
  • Software versions of OpenWrt/LEDE release, packages, etc.
  • Steps to reproduce
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant