From ba445acd7cbd39375a0ed382896b6236a65bd780 Mon Sep 17 00:00:00 2001 From: Hirokazu MORIKAWA Date: Thu, 14 Nov 2024 08:49:10 +0900 Subject: [PATCH] git: use symbolic link The following error occurs when CONFIG_USE_APK is set. ``` ln /mnt/gl-mt6000-main/openwrt/build_dir/target-aarch64_cortex-a53_musl/git-2.46.2/.pkgdir/git/usr/lib/git-core/git /mnt/gl-mt6000-main/openwrt/build_dir/target-aarch64_cortex-a53_musl/git-2.46.2/.pkgdir/git/usr/bin/git ln /mnt/gl-mt6000-main/openwrt/build_dir/target-aarch64_cortex-a53_musl/git-2.46.2/.pkgdir/git/usr/lib/git-core/git-shell /mnt/gl-mt6000-main/openwrt/build_dir/target-aarch64_cortex-a53_musl/git-2.46.2/.pkgdir/git/usr/bin/git-shell touch /mnt/gl-mt6000-main/openwrt/build_dir/target-aarch64_cortex-a53_musl/git-2.46.2/.pkgdir/git.installed mkdir -p /mnt/gl-mt6000-main/openwrt/staging_dir/target-aarch64_cortex-a53_musl/root-mediatek/stamp SHELL= flock /mnt/gl-mt6000-main/openwrt/tmp/.root-copy.flock -c 'cp -fpR /mnt/gl-mt6000-main/openwrt/build_dir/target-aarch64_cortex-a53_musl/git-2.46.2/.pkgdir/git/. /mnt/gl-mt6000-main/openwrt/staging_dir/target-aarch64_cortex-a53_musl/root-mediatek/' cp: '/mnt/gl-mt6000-main/openwrt/build_dir/target-aarch64_cortex-a53_musl/git-2.46.2/.pkgdir/git/./usr/bin/git' and '/mnt/gl-mt6000-main/openwrt/staging_dir/target-aarch64_cortex-a53_musl/root-mediatek/./usr/bin/git' are the same file cp: '/mnt/gl-mt6000-main/openwrt/build_dir/target-aarch64_cortex-a53_musl/git-2.46.2/.pkgdir/git/./usr/bin/git-shell' and '/mnt/gl-mt6000-main/openwrt/staging_dir/target-aarch64_cortex-a53_musl/root-mediatek/./usr/bin/git-shell' are the same file make[2]: *** [Makefile:167: /mnt/gl-mt6000-main/openwrt/staging_dir/target-aarch64_cortex-a53_musl/root-mediatek/stamp/.git_installed] Error 1 ``` Use $(LN) instead of ln and use relative paths. Signed-off-by: Hirokazu MORIKAWA --- net/git/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/net/git/Makefile b/net/git/Makefile index ffa5fdea38..8d9c05c101 100644 --- a/net/git/Makefile +++ b/net/git/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=git PKG_VERSION:=2.46.2 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@KERNEL/software/scm/git/ @@ -137,8 +137,8 @@ define Package/git/install usr/lib/git-core \ usr/share/git-core/templates \ ) | ( cd $(1); $(TAR) -xf - ) - ln $(1)/usr/lib/git-core/git $(1)/usr/bin/git - ln $(1)/usr/lib/git-core/git-shell $(1)/usr/bin/git-shell + $(LN) ../lib/git-core/git $(1)/usr/bin/git + $(LN) ../lib/git-core/git-shell $(1)/usr/bin/git-shell endef define Package/git-http/install -- 2.30.2