tests/docker/Makefile.include: only force SID to NOCACHE if old
authorAlex Bennée <alex.bennee@linaro.org>
Tue, 12 Jun 2018 20:29:40 +0000 (21:29 +0100)
committerAlex Bennée <alex.bennee@linaro.org>
Wed, 20 Jun 2018 21:13:39 +0000 (22:13 +0100)
Now we can check the age of a docker image we can be a little more
intelligent about re-building Sid images and only force NOCACHE if
it is "old".

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
tests/docker/Makefile.include

index c0f09505bb619c88514c41f338fb6100feaa5dee..91d9665517201abf65311fb007bdc085ec1f67dd 100644 (file)
@@ -75,8 +75,14 @@ docker-image-debian-win64-cross: docker-image-debian8-mxe
 # force a re-build of the base image if we ever need to build one of
 # its children.
 ifndef SKIP_DOCKER_BUILD
+ifeq ($(HAVE_USER_DOCKER),y)
+SID_AGE=$(shell $(DOCKER_SCRIPT) check --checktype=age --olderthan=180 --quiet qemu:debian-sid)
+ifeq ($(SID_AGE),)
+else
 docker-image-debian-sid: NOCACHE=1
 endif
+endif
+endif
 
 docker-image-debian-alpha-cross: docker-image-debian-sid
 docker-image-debian-hppa-cross: docker-image-debian-sid