[openwrt/openwrt] tools/gnulib: use exact directory copy for install
LEDE Commits
lede-commits at lists.infradead.org
Sat Jul 26 05:38:28 PDT 2025
robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/774ce21c6671427e5a28c5183acb0065549feeea
commit 774ce21c6671427e5a28c5183acb0065549feeea
Author: Michael Pratt <mcpratt at pm.me>
AuthorDate: Sat May 31 14:07:05 2025 -0400
tools/gnulib: use exact directory copy for install
The python implementation of gnulib-tool
uses a hidden file as the independent main function.
A copy with glob ('*') does not include hidden files
at the top level directory, so use whole directory copy
instead and remove the patch for a non-hidden python file.
Ensure the directory does not already exist
by attempting uninstall first to remove it
and by not using "install" to create a directory.
Rename the clean target to uninstall, as it handles
the staging directory and not the build directory.
Removed:
- 021-python-main.patch
Signed-off-by: Michael Pratt <mcpratt at pm.me>
Link: https://github.com/openwrt/openwrt/pull/16522
Signed-off-by: Robert Marko <robimarko at gmail.com>
---
tools/gnulib/Makefile | 6 +++---
tools/gnulib/patches/021-python-main.patch | 15 ---------------
2 files changed, 3 insertions(+), 18 deletions(-)
diff --git a/tools/gnulib/Makefile b/tools/gnulib/Makefile
index f708299549..245ba6be7d 100644
--- a/tools/gnulib/Makefile
+++ b/tools/gnulib/Makefile
@@ -14,14 +14,14 @@ define Host/Configure
endef
define Host/Install
+ $(call Host/Uninstall)
$(INSTALL_DIR) $(1)/share/aclocal
$(INSTALL_DATA) $(HOST_BUILD_DIR)/m4/*.m4 $(1)/share/aclocal/
- $(INSTALL_DIR) $(1)/share/gnulib
- $(CP) $(HOST_BUILD_DIR)/* $(1)/share/gnulib/
+ $(CP) $(HOST_BUILD_DIR)/ $(1)/share/gnulib/
ln -sf ../share/gnulib/gnulib-tool $(STAGING_DIR_HOST)/bin/gnulib-tool
endef
-define Host/Clean
+define Host/Uninstall
rm -rf $(STAGING_DIR_HOST)/bin/gnulib-tool $(STAGING_DIR_HOST)/share/gnulib
endef
diff --git a/tools/gnulib/patches/021-python-main.patch b/tools/gnulib/patches/021-python-main.patch
deleted file mode 100644
index 1edb1d28a9..0000000000
--- a/tools/gnulib/patches/021-python-main.patch
+++ /dev/null
@@ -1,15 +0,0 @@
---- /dev/null
-+++ b/gnulib-tool-main.py
-@@ -0,0 +1,4 @@
-+from pygnulib import main
-+
-+if __name__ == '__main__':
-+ main.main_with_exception_handling()
---- a/gnulib-tool.py
-+++ b/gnulib-tool.py
-@@ -157,4 +157,4 @@ fi
- profiler_args=
- # For profiling, cf. <https://docs.python.org/3/library/profile.html>.
- #profiler_args="-m cProfile -s tottime"
--exec python3 $profiler_args "$gnulib_dir/.gnulib-tool.py" "$@"
-+exec python3 $profiler_args "$gnulib_dir/gnulib-tool-main.py" "$@"
More information about the lede-commits
mailing list