build: skip download for host build with AUTOREMOVE if already compiled
authorChristian Marangi <ansuelsmth@gmail.com>
Fri, 11 Nov 2022 15:40:45 +0000 (16:40 +0100)
committerChristian Marangi <ansuelsmth@gmail.com>
Fri, 11 Nov 2022 15:40:45 +0000 (16:40 +0100)
commit3e7b5096c09d55a8ff57b282f53a8a59d168426a
tree135b602eea1eff272781954d57a6f055be308e30
parent573b4165651fe16abfc4446e67dd2cc2b216b0ac
build: skip download for host build with AUTOREMOVE if already compiled

Packages in general use 4 check to trigger a recompile:
- timestamp for the build_dir
- timestamp for the staging stamp dir
- depends hash for the build_dir prepared file
- presence of package archieve in dl

If host tools are prebuilt and shipped in a container or manually
installed from an archieve, it would be ideal to skip including the
package archieve and just provide the build_dir prepared files and the
staging stamp file (and the actualy prebuilt tools).

Add some logic to skip dl download for host tools if AUTOREMOVE is
selected and checks for the presence of staging dir stamp file and build
dir stamp file.

If one of these requirements are not met, the package is redownloaded
and rebuilt.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
include/host-build.mk