[SCM] Debian packaging of perlindex branch, master, updated. d29979648ddcb4fa3b6cf27db33c5ffa37f7fb80

Damyan Ivanov dmn at debian.org
Wed Jan 25 14:58:05 UTC 2012


The following commit has been merged in the master branch:
commit b79a6195ab04b95771ddc835177f7a5716d3600e
Author: Damyan Ivanov <dmn at debian.org>
Date:   Wed Jan 25 16:56:58 2012 +0200

    postinst: migrate existing index files from /usr/share/man to /var/cache/perlindex
    
    only on upgrades from versions creating them in /usr/share/man

diff --git a/debian/perlindex.postinst b/debian/perlindex.postinst
index 80a520c..50fd6cf 100644
--- a/debian/perlindex.postinst
+++ b/debian/perlindex.postinst
@@ -25,6 +25,27 @@ case "$1" in
 			echo -n "Generating index (this may take a while)..."
 			perlindex -index >/dev/null 2>&1
 			echo " done."
+		elif dpkg --compare-versions "$2" lt "1.605-4~"; then
+			echo -n "Moving index files to /var/cache/perlindex..."
+			SRC=/usr/share/man
+			DST=/var/cache/perlindex
+			for p in fn idf "if" "if.new" seen; do
+			    src_f="$SRC/index_$p"
+			    dst_f="$DST/index_$p"
+			    # move in two passes, since /var and /usr may be in
+			    # different file systems
+			    if [ -e "$src_f" ]; then
+				if ! [ -e "$dst_f" ] || [ "$src_f" -nt "$dst_f" ]; then
+				    echo -n " index_$p"
+				    mv "$src_f" "$dst_f.migrated"
+				    mv "$dst_f.migrated" "$dst_f"
+				else
+				    # proper index file is already newer
+				    rm "$src_f"
+				fi
+			    fi
+			done
+			echo ", done."
 		fi
     ;;
 

-- 
Debian packaging of perlindex



More information about the Pkg-perl-cvs-commits mailing list