All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [git commit] package/{pkg-generic, python, python3}: rename .py file exclusion variable to not conflict
@ 2019-12-01 20:55 Peter Korsgaard
  2019-12-05 21:47 ` Peter Korsgaard
  0 siblings, 1 reply; 2+ messages in thread
From: Peter Korsgaard @ 2019-12-01 20:55 UTC (permalink / raw)
  To: buildroot

commit: https://git.buildroot.net/buildroot/commit/?id=0f5ac40374c91e44af8c3806e848f8e62c42b140
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master

Fixes:
http://autobuild.buildroot.net/results/3b6/3b6280b0b7a9634b747db2865b21c6266007c725/

The PYTHON_KEEP_PY_FILES global variable conflicts with the per-package
<pkg>_KEEP_PY_FILES variable for the python package, causing make to
complain:

package/zlib/zlib.mk:7: *** Recursive variable 'PYTHON_KEEP_PY_FILES' references itself (eventually).  Stop.

As a workaround, rename the global variable to KEEP_PYTHON_PY_FILES so it
cannot conflict with the per-package variable.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
---
 package/pkg-generic.mk     | 2 +-
 package/python/python.mk   | 2 +-
 package/python3/python3.mk | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk
index 1709660ef2..635040c2a0 100644
--- a/package/pkg-generic.mk
+++ b/package/pkg-generic.mk
@@ -1060,7 +1060,7 @@ PACKAGES_USERS += $$($(2)_USERS)$$(sep)
 endif
 TARGET_FINALIZE_HOOKS += $$($(2)_TARGET_FINALIZE_HOOKS)
 ROOTFS_PRE_CMD_HOOKS += $$($(2)_ROOTFS_PRE_CMD_HOOKS)
-PYTHON_KEEP_PY_FILES += $$($(2)_KEEP_PY_FILES)
+KEEP_PYTHON_PY_FILES += $$($(2)_KEEP_PY_FILES)
 
 ifeq ($$($(2)_SITE_METHOD),svn)
 DL_TOOLS_DEPENDENCIES += svn
diff --git a/package/python/python.mk b/package/python/python.mk
index a3f5ce2113..41a981e3d3 100644
--- a/package/python/python.mk
+++ b/package/python/python.mk
@@ -268,7 +268,7 @@ endif
 ifeq ($(BR2_PACKAGE_PYTHON_PYC_ONLY),y)
 define PYTHON_REMOVE_PY_FILES
 	find $(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR) -name '*.py' \
-		$(if $(strip $(PYTHON_KEEP_PY_FILES)),-not \( $(call finddirclauses,$(TARGET_DIR),$(PYTHON_KEEP_PY_FILES)) \) ) \
+		$(if $(strip $(KEEP_PYTHON_PY_FILES)),-not \( $(call finddirclauses,$(TARGET_DIR),$(KEEP_PYTHON_PY_FILES)) \) ) \
 		-print0 | \
 		xargs -0 --no-run-if-empty rm -f
 endef
diff --git a/package/python3/python3.mk b/package/python3/python3.mk
index a8a5464149..a6692c5257 100644
--- a/package/python3/python3.mk
+++ b/package/python3/python3.mk
@@ -286,7 +286,7 @@ endif
 ifeq ($(BR2_PACKAGE_PYTHON3_PYC_ONLY),y)
 define PYTHON3_REMOVE_PY_FILES
 	find $(TARGET_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR) -name '*.py' \
-		$(if $(strip $(PYTHON_KEEP_PY_FILES)),-not \( $(call finddirclauses,$(TARGET_DIR),$(PYTHON_KEEP_PY_FILES)) \) ) \
+		$(if $(strip $(KEEP_PYTHON_PY_FILES)),-not \( $(call finddirclauses,$(TARGET_DIR),$(KEEP_PYTHON_PY_FILES)) \) ) \
 		-print0 | \
 		xargs -0 --no-run-if-empty rm -f
 endef

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [Buildroot] [git commit] package/{pkg-generic, python, python3}: rename .py file exclusion variable to not conflict
  2019-12-01 20:55 [Buildroot] [git commit] package/{pkg-generic, python, python3}: rename .py file exclusion variable to not conflict Peter Korsgaard
@ 2019-12-05 21:47 ` Peter Korsgaard
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Korsgaard @ 2019-12-05 21:47 UTC (permalink / raw)
  To: buildroot

>>>>> "Peter" == Peter Korsgaard <peter@korsgaard.com> writes:

 > commit: https://git.buildroot.net/buildroot/commit/?id=0f5ac40374c91e44af8c3806e848f8e62c42b140
 > branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master

 > Fixes:
 > http://autobuild.buildroot.net/results/3b6/3b6280b0b7a9634b747db2865b21c6266007c725/

 > The PYTHON_KEEP_PY_FILES global variable conflicts with the per-package
 > <pkg>_KEEP_PY_FILES variable for the python package, causing make to
 > complain:

 > package/zlib/zlib.mk:7: *** Recursive variable 'PYTHON_KEEP_PY_FILES' references itself (eventually).  Stop.

 > As a workaround, rename the global variable to KEEP_PYTHON_PY_FILES so it
 > cannot conflict with the per-package variable.

 > Signed-off-by: Peter Korsgaard <peter@korsgaard.com>

Committed to 2019.02.x and 2019.08.x, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-12-05 21:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-01 20:55 [Buildroot] [git commit] package/{pkg-generic, python, python3}: rename .py file exclusion variable to not conflict Peter Korsgaard
2019-12-05 21:47 ` Peter Korsgaard

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.