[Buildroot] [RFCv3 11/15] package/pkg-generic: handle host-fakedate as a regular dependency

Yann E. MORIN yann.morin.1998 at free.fr
Fri Dec 29 15:50:42 UTC 2017


Thomas, All,

On 2017-12-01 21:53 +0100, Thomas Petazzoni spake thusly:
> This commit moves the host-fakedate dependency handling from
> DEPENDENCIES_HOST_PREREQ to a proper regular dependency handled by the
> package infrastructure.
> 
> host-fakedate is added as dependency to all packages, except
> host-skeleton, because we depend on it.
> 
> In addition, we make sure that host-fakedate does not grow a
> dependency on host-{tar,xz,lzip,ccache} to avoid circular
> dependencies. host-fakedate does not need any extraction tool and does
> not need to build C/C++ code (the source code is just a shell script
> available in Buildroot).
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni at free-electrons.com>

Reviewed-by: "Yann E. MORIN" <yann.morin.1998 at free.fr>

But see below...

> ---
> Changes since v2:
>  - New patch
> ---
>  Makefile               |  1 -
>  package/pkg-generic.mk | 14 ++++++++++----
>  2 files changed, 10 insertions(+), 5 deletions(-)
> 
> diff --git a/Makefile b/Makefile
> index 56bf083098..f31834682c 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -255,7 +255,6 @@ export LC_ALL = C
>  export GZIP = -n
>  BR2_VERSION_GIT_EPOCH = $(shell GIT_DIR=$(TOPDIR)/.git $(GIT) log -1 --format=%at)
>  export SOURCE_DATE_EPOCH ?= $(if $(wildcard $(TOPDIR)/.git),$(BR2_VERSION_GIT_EPOCH),$(BR2_VERSION_EPOCH))
> -DEPENDENCIES_HOST_PREREQ += host-fakedate
>  endif
>  
>  # To put more focus on warnings, be less verbose as default
> diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk
> index cb5889c9ef..7c5d951af9 100644
> --- a/package/pkg-generic.mk
> +++ b/package/pkg-generic.mk
> @@ -587,24 +587,30 @@ ifneq ($(1),host-skeleton)
>  $(2)_DEPENDENCIES += host-skeleton
>  endif
>  
> -ifeq ($(filter host-tar host-skeleton,$(1)),)
> +ifeq ($(filter host-tar host-skeleton host-fakedate,$(1)),)
>  $(2)_EXTRACT_DEPENDENCIES += $(BR2_TAR_HOST_DEPENDENCY)
>  endif
>  
> -ifeq ($(filter host-tar host-skeleton host-xz host-lzip,$(1)),)
> +ifeq ($(filter host-tar host-skeleton host-xz host-lzip host-fakedate,$(1)),)
>  $(2)_EXTRACT_DEPENDENCIES += $(BR2_XZCAT_HOST_DEPENDENCY)
>  endif
>  
> -ifeq ($(filter host-tar host-skeleton host-xz host-lzip,$(1)),)
> +ifeq ($(filter host-tar host-skeleton host-xz host-lzip host-fakedate,$(1)),)
>  $(2)_EXTRACT_DEPENDENCIES += $(BR2_LZIP_HOST_DEPENDENCY)
>  endif
>  
>  ifeq ($(BR2_CCACHE),y)
> -ifeq ($(filter host-tar host-skeleton host-xz host-lzip,$(1)),)
> +ifeq ($(filter host-tar host-skeleton host-xz host-lzip host-fakedate,$(1)),)

Those last three conditions are using the exact same list, maybe we can
re-factorise the code to avoid duplicating that list?

Regards,
Yann E. MORIN.

>  $(2)_DEPENDENCIES += host-ccache
>  endif
>  endif
>  
> +ifeq ($(BR2_REPRODUCIBLE),y)
> +ifeq ($(filter host-skeleton,$(1)),)
> +$(2)_DEPENDENCIES += host-fakedate
> +endif
> +endif
> +
>  # Eliminate duplicates in dependencies
>  $(2)_FINAL_DEPENDENCIES = $$(sort $$($(2)_DEPENDENCIES))
>  $(2)_FINAL_EXTRACT_DEPENDENCIES = $$(sort $$($(2)_EXTRACT_DEPENDENCIES))
> -- 
> 2.13.6
> 

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'


More information about the buildroot mailing list