From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail.thorsis.com ([92.198.35.195]) by metis.ext.pengutronix.de with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1j7KPF-00083Z-Hv for ptxdist@pengutronix.de; Thu, 27 Feb 2020 15:44:55 +0100 Received: from localhost (localhost [127.0.0.1]) by mail.thorsis.com (Postfix) with ESMTP id 87B1D3248 for ; Thu, 27 Feb 2020 15:44:52 +0100 (CET) Received: from mail.thorsis.com ([127.0.0.1]) by localhost (mail.thorsis.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id qwxn5b6KSNPr for ; Thu, 27 Feb 2020 15:44:52 +0100 (CET) Received: from adahl by ada.ifak-system.com with local (Exim 4.89) (envelope-from ) id 1j7KPB-0007k7-L7 for ptxdist@pengutronix.de; Thu, 27 Feb 2020 15:44:49 +0100 From: Alexander Dahl Date: Thu, 27 Feb 2020 15:44:47 +0100 Message-Id: <20200227144449.29660-2-ada@thorsis.com> In-Reply-To: <20200227144449.29660-1-ada@thorsis.com> References: <20200227144449.29660-1-ada@thorsis.com> Subject: [ptxdist] [PATCH 1/3] opkg: Regenerate config after input variable changes List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ptxdist-bounces@pengutronix.de Sender: "ptxdist" To: ptxdist@pengutronix.de 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. 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 --- 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 ptxdist@pengutronix.de