mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH] template-src-linux-driver: Fix condition for kernel.targetinstall.post
@ 2019-01-24 10:34 Ian Abbott
  0 siblings, 0 replies; only message in thread
From: Ian Abbott @ 2019-01-24 10:34 UTC (permalink / raw)
  To: ptxdist; +Cc: Michael Olbrich, Ian Abbott

From: Michael Olbrich <m.olbrich@pengutronix.de>

The condition for including the rule to make
$(STATEDIR)/kernel.targetinstall.post depend on
$(STATEDIR)/@package@.targetinstall is broken because it uses
PTX_PACKAGES_SELECTED, which is always empty at the time this condition
is evaluated.

If PTX_COLLECTION is 'y', the rule should be included if
PTXCONF_@PACKAGE@ is 'y'.  If PTX_COLLECTION is unset, the rule should
be included if PTXCONF_@PACKAGE@ is either 'y' or 'm'.

Reported-by: Ian Abbott <abbotti@mev.co.uk>
---
See <https://www.mail-archive.com/ptxdist@pengutronix.de/msg13982.html>.
I credited the patch to Michael as he explained the cause of the problem
and came up with the most elegant fix. -- Ian Abbott

 rules/templates/template-src-linux-driver-make | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rules/templates/template-src-linux-driver-make b/rules/templates/template-src-linux-driver-make
index c13857924..de1be78b2 100644
--- a/rules/templates/template-src-linux-driver-make
+++ b/rules/templates/template-src-linux-driver-make
@@ -22,7 +22,7 @@ PACKAGES-$(PTXCONF_@PACKAGE@) += @package@
 @PACKAGE@_DIR		:= $(BUILDDIR)/$(@PACKAGE@)
 @PACKAGE@_LICENSE	:= unknown
 
-ifneq ($(filter @package@,$(PTX_PACKAGES_SELECTED)),)
+ifneq ($(filter $(if $(PTX_COLLECTION),y,y m),$(PTXCONF_@PACKAGE@)),)
 $(STATEDIR)/kernel.targetinstall.post: $(STATEDIR)/@package@.targetinstall
 endif
 
-- 
2.20.1


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-01-24 10:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-24 10:34 [ptxdist] [PATCH] template-src-linux-driver: Fix condition for kernel.targetinstall.post Ian Abbott

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox