On Thu, Feb 27, 2020 at 03:44:47PM +0100, Alexander Dahl wrote:
> Some values in `/etc/opkg/opkg.conf` are replaced by 'install_replace'
> in targetinstall stage. Especially PTXCONF_OPKG_OPKG_CONF_URL can
> contain other variables which might change frequently when developing.

Right, this is a problem for other packages as well. The more general fix
ist to hash the evaluated PTXCONF_* variables instead. I've implemented
this here. It should hit master once all my test have passed. But maybe
only for the April release.

Michael

> The default for example contains PTXCONF_PROJECT_VERSION which changes
> with every git commit. The place where opkg packages are put to on the
> dev host would differ then from the opkg.conf on the target. Trigger a
> rebuild of the targetinstall stage keeps that in sync.
> 
> Signed-off-by: Alexander Dahl <[email protected]>
> ---
>  rules/opkg.make | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)
> 
> diff --git a/rules/opkg.make b/rules/opkg.make
> index 23390ce0f..2396853fe 100644
> --- a/rules/opkg.make
> +++ b/rules/opkg.make
> @@ -53,6 +53,17 @@ OPKG_CONF_OPT      := \
>  # Target-Install
>  # 
> ----------------------------------------------------------------------------
>  
> +ifdef PTXCONF_OPKG_OPKG_CONF
> +OPKG_STAMP := $(call remove_quotes, \
> +     $(PTXCONF_OPKG_OPKG_CONF_URL) \
> +     $(PTXDIST_IPKG_ARCH_STRING) \
> +     $(PTXCONF_OPKG_OPKG_CONF_CHECKSIG))
> +
> +ifneq ($(strip $(OPKG_STAMP)),$(strip $(call ptx/force-sh cat 
> $(STATEDIR)/opkg.stamp 2>/dev/null)))
> +PHONY += $(STATEDIR)/opkg.targetinstall
> +endif
> +endif
> +
>  $(STATEDIR)/opkg.targetinstall:
>       @$(call targetinfo)
>  
> @@ -104,6 +115,9 @@ endif
>  
>       @$(call install_finish, opkg)
>  
> +ifdef PTXCONF_OPKG_OPKG_CONF
> +     @echo "$(OPKG_STAMP)" > $(STATEDIR)/opkg.stamp
> +endif
>       @$(call touch)
>  
>  # vim: syntax=make
> -- 
> 2.20.1
> 
> 
> _______________________________________________
> ptxdist mailing list
> [email protected]
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
ptxdist mailing list
[email protected]

Reply via email to