[FS#3360] make with source files in package does not always rebuild
OpenWrt Bugs
openwrt-bugs at lists.openwrt.org
Thu Sep 24 09:08:07 EDT 2020
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
A new Flyspray task has been opened. Details are below.
User who did this - johnbeckettn2e (johnbeckettn2e)
Attached to Project - OpenWrt/LEDE Project
Summary - make with source files in package does not always rebuild
Task Type - Bug Report
Category - Base system
Status - Unconfirmed
Assigned To -
Operating System - All
Severity - Low
Priority - Very Low
Reported Version - All
Due in Version - Undecided
Due Date - Undecided
Details - 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 : https://github.com/openwrt/openwrt/pull/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
More information can be found at the following URL:
https://bugs.openwrt.org/index.php?do=details&task_id=3360
You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.
More information about the openwrt-bugs
mailing list