Mail archive
alpine-devel

[alpine-devel] [PATCH 4/5] abuild: update symlinks before updating hardlinks

From: Sören Tempel <soeren+git_at_soeren-tempel.net>
Date: Fri, 27 Nov 2015 00:50:46 +0100

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
_at_@ -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
_at_@ -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_at_lists.alpinelinux.org
Help:         alpine-devel+help_at_lists.alpinelinux.org
---
Received on Fri Nov 27 2015 - 00:50:46 GMT