# HG changeset patch # User Aleksej Bobylev # Date 1485601287 -7200 # Node ID ec4508cc348ece7001df1c31cdf5c333cc7b23db # Parent f816ea3e8dcc1dff8247f0863d9db62a1a447649 modules/compressor: fix compress_manpages(): when there's a lot of manpages (like in openssl package), it found (in the second turn) some of just compressed manpages and compress them again (*.gz.gz) diff -r f816ea3e8dcc -r ec4508cc348e modules/compressor --- a/modules/compressor Fri Jan 27 15:53:28 2017 +0200 +++ b/modules/compressor Sat Jan 28 13:01:27 2017 +0200 @@ -112,7 +112,7 @@ compress_manpages() { time0=$(date +%s) [ "${COOKOPTS/!manz/}" != "$COOKOPTS" ] && return - manpath="$install/usr/share/man" + manpath="$install/usr/share/man" [ -d "$manpath" ] || return size0=$(sizes man); [ -z "$size0" ] && return @@ -125,17 +125,17 @@ find $manpath -type f -name '*.xz' -exec unxz \{\} \; # Fast compress with gzip - find $manpath -type f -name '*.[1-9]*' -exec gzip \{\} \; + find $manpath -type f ! -name '*.gz' -exec gzip \{\} \; # Fix symlinks - for i in $(find $install/usr/share/man -type l); do + for i in $(find $manpath -type l); do dest=$(readlink $i | sed 's|\.[gbx]z2*$||') link=$(echo $i | sed 's|\.[gbx]z2*$||') rm $i; ln -s $dest.gz $link.gz done # Recompress with advdef (it can't compress, only recompress) - for i in $(find $install/usr/share/man -type f); do + for i in $(find $manpath -type f); do if ! cached_path=$(query_cache mangz "$i"); then advdef -z4q "$i" store_cache "$cached_path" "$i"