[linux] 02/02: linux-doc: Fix up symlinks to gzipped docs

debian-kernel at lists.debian.org debian-kernel at lists.debian.org
Mon Jan 30 17:53:46 UTC 2017


This is an automated email from the git hooks/post-receive script.

benh pushed a commit to branch master
in repository linux.

commit 20f61fd51ddd3de890a0e25fe91f76d844ad92fc
Author: Ben Hutchings <ben at decadent.org.uk>
Date:   Mon Jan 30 17:37:50 2017 +0000

    linux-doc: Fix up symlinks to gzipped docs
    
    Some files are moving around under Documentation and being replaced
    with symlinks.
    
    gzip -r doesn't even check for symlinks, and fails when they're broken
    (which happens if the destination was found first).  So use find and
    xargs instead, and deal with the symlinks separately.
---
 debian/changelog  |  1 +
 debian/rules.real | 11 ++++++++++-
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index 1e52817..17751e4 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -13,6 +13,7 @@ linux (4.10~rc6-1~exp1) UNRELEASED; urgency=medium
   * net: Enable SFC_FALCON as module; SFC_FALCON_MTD
   * cpupower: Fix compiler options for turbostat on 4.10
   * linux-doc: Update documentation file list for 4.10
+  * linux-doc: Fix up symlinks to gzipped docs
 
   [ Roger Shimizu ]
   * debian/copyright: Add GPL/X11 Dual License
diff --git a/debian/rules.real b/debian/rules.real
index effda69..9685b05 100644
--- a/debian/rules.real
+++ b/debian/rules.real
@@ -245,7 +245,16 @@ install-doc: $(STAMPS_DIR)/build-doc
 	find * -name '*.rst' -prune -o -name objects.inv -prune \
 		-o -name xml -prune -o -print | \
 	cpio -pd --preserve-modification-time '$(CURDIR)/$(OUT_DIR)/html/newstyle'
-	gzip -9nqfr $(OUT_DIR)/Documentation
+	find $(OUT_DIR)/Documentation -type f | xargs gzip -9n
+# Fix up symlinks to gzipped docs
+	cd $(OUT_DIR)/Documentation; \
+	find -type l | while read link; do \
+		dest="$$(readlink -f "$$link")"; \
+		if [ -f "$$dest.gz" ]; then \
+			rm -f "$$link"; \
+			ln -sr "$$dest.gz" "$$link.gz"; \
+		fi; \
+	done
 	+$(MAKE_SELF) install-base
 
 install-manual: PACKAGE_NAME = $(SOURCE_PACKAGE_NAME)-manual-$(VERSION)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/kernel/linux.git



More information about the Kernel-svn-changes mailing list