From: Michael Pratt Date: Sat, 31 May 2025 18:07:05 +0000 (-0400) Subject: tools/gnulib: use exact directory copy for install X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=774ce21c6671427e5a28c5183acb0065549feeea;p=thirdparty%2Fopenwrt.git 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 Link: https://github.com/openwrt/openwrt/pull/16522 Signed-off-by: Robert Marko --- diff --git a/tools/gnulib/Makefile b/tools/gnulib/Makefile index f708299549f..245ba6be7d7 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 1edb1d28a97..00000000000 --- 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. . - #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" "$@"