X-Original-To: alpine-devel@mail.alpinelinux.org Delivered-To: alpine-devel@mail.alpinelinux.org Received: from mail.alpinelinux.org (dallas-a1.alpinelinux.org [127.0.0.1]) by mail.alpinelinux.org (Postfix) with ESMTP id 65E24DCF3C0 for ; Thu, 26 Nov 2015 23:51:16 +0000 (UTC) Received: from lithium.8pit.net (lithium.8pit.net [81.4.121.103]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.alpinelinux.org (Postfix) with ESMTPS id D5E12DCF316; Thu, 26 Nov 2015 23:51:15 +0000 (UTC) Received: from localhost (ip5f5ac93e.dynamic.kabel-deutschland.de [95.90.201.62]) by lithium.8pit.net (OpenSMTPD) with ESMTPSA id a54b2759 TLS version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO; Fri, 27 Nov 2015 00:51:12 +0100 (CET) From: =?UTF-8?q?S=C3=B6ren=20Tempel?= To: alpine-devel@lists.alpinelinux.org Subject: [alpine-devel] [PATCH 4/5] abuild: update symlinks before updating hardlinks Date: Fri, 27 Nov 2015 00:50:46 +0100 Message-Id: <1448581847-30376-4-git-send-email-soeren+git@soeren-tempel.net> X-Mailer: git-send-email 2.6.3 In-Reply-To: <1448581847-30376-1-git-send-email-soeren+git@soeren-tempel.net> References: <1448581847-30376-1-git-send-email-soeren+git@soeren-tempel.net> X-Virus-Scanned: ClamAV using ClamSMTP X-Mailinglist: alpine-devel Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: This should be a minimal performance improvement since hardlinks are replaced with symlinks and should thus already point to the correct file. --- abuild.in | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/abuild.in b/abuild.in index 26b7982..65b6377 100644 --- a/abuild.in +++ b/abuild.in @@ -1404,6 +1404,13 @@ default_doc() { # compress man pages local mandir="$subpkgdir"/usr/share/man + [ -d "$mandir" ] && find "$mandir" -type l \ + -a \( -name \*.[0-8n] -o -name \*.[0-8][a-z]* \) \ + | while read symlink; do + + ln -s $(readlink $symlink).gz "$symlink".gz + rm -f "$symlink" + done [ -d "$mandir" ] && find "$mandir" -type f \ -a \( -name \*.[0-8n] -o -name \*.[0-8][a-z]* \) \ -exec stat -c "%i %n" \{\} \; | while read inode name; do @@ -1424,13 +1431,6 @@ default_doc() { [ $islink -eq 0 ] && gzip -9 "$name" done - [ -d "$mandir" ] && find "$mandir" -type l \ - -a \( -name \*.[0-8n] -o -name \*.[0-8][a-z]* \) \ - | while read symlink; do - - ln -s $(readlink $symlink).gz "$symlink".gz - rm -f "$symlink" - done rm -f "$subpkgdir/usr/share/info/dir" -- 2.6.3 --- Unsubscribe: alpine-devel+unsubscribe@lists.alpinelinux.org Help: alpine-devel+help@lists.alpinelinux.org ---