From 035651209f4a975cb5413b3911f5598db73e4822 Mon Sep 17 00:00:00 2001 From: Vincent Fazio Date: Sat, 8 Jun 2024 22:25:09 -0500 Subject: [PATCH] package/python3: fix config directory pattern If a platform triplet is not detected during the configure stage, the config directory (LIBPL) defaults to `config-$VERSION`. In this scenario, the `PYTHON3_REMOVE_USELESS_FILES` hook would fail due to `find` incorrectly expecting a second dash and then the triplet. Now, we glob anything after the version which will match in both cases. Fixes: 54d48c8cad ("package/python3: miscellaneous fixups") Signed-off-by: Vincent Fazio Signed-off-by: Yann E. MORIN --- package/python3/python3.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/python3/python3.mk b/package/python3/python3.mk index 6859fc2274..86fa3b970d 100644 --- a/package/python3/python3.mk +++ b/package/python3/python3.mk @@ -197,7 +197,7 @@ PYTHON3_CONF_OPTS += \ define PYTHON3_REMOVE_USELESS_FILES rm -f $(TARGET_DIR)/usr/bin/python$(PYTHON3_VERSION_MAJOR)-config rm -f $(TARGET_DIR)/usr/bin/python3-config - find $(TARGET_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/config-$(PYTHON3_VERSION_MAJOR)-*/ \ + find $(TARGET_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/config-$(PYTHON3_VERSION_MAJOR)*/ \ -type f -not -name Makefile -exec rm -rf {} \; find $(TARGET_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/ -type d \ -name __pycache__ -exec rm -rf {} \;