# HG changeset patch # User Aleksej Bobylev # Date 1487204338 -7200 # Node ID c43c8640ab19d5b89e66bf27a11703f20201ee8b # Parent 230109645bba278401915e1c4490c05300f2c960 modules/compressor: allow spaces in filenames; fix_desktop_files() only in /usr/share/applications. diff -r 230109645bba -r c43c8640ab19 modules/compressor --- a/modules/compressor Mon Feb 13 10:01:50 2017 +0100 +++ b/modules/compressor Thu Feb 16 02:18:58 2017 +0200 @@ -135,6 +135,7 @@ done # Recompress with advdef (it can't compress, only recompress) + IFS=$'\n' for i in $(find $manpath -type f); do if ! cached_path=$(query_cache mangz "$i"); then advdef -z4q "$i" @@ -159,6 +160,7 @@ action 'Recompressing gzip files...' # Recompress with advdef + IFS=$'\n' for i in $(find $install -type f -name '*.gz' ! -path '*/share/man/*'); do if ! cached_path=$(query_cache gz "$i"); then advdef -z4q "$i" @@ -196,6 +198,7 @@ [ "$oplevel" == '8' ] && oplevel='7 -zm1-9' + IFS=$'\n' for i in $(find $install -type f -name '*.png'); do if ! cached_path=$(query_cache $cache_section "$i"); then $use_pq && pngquant -f --skip-if-larger --ext .png --speed 1 "$i" @@ -221,6 +224,7 @@ action 'Compressing svg images...' cleaner_log="$(mktemp)" + IFS=$'\n' for i in $(find $install -type f -name '*.svg'); do echo -n "$i: " >> "$cleaner_log" svgcleaner "$i" "$i" --remove-unresolved-classes false --quiet true >> "$cleaner_log" @@ -253,6 +257,7 @@ size0=$(sizes xml) time0=$(date +%s) temp_ui="$(mktemp)" + IFS=$'\n' for ui in $(find $install -type f \( -name '*.ui' -o -name '*.glade' \) ); do xmlstarlet c14n --without-comments "$ui" | xmlstarlet sel -B -t -c '*' > "$temp_ui" cat "$temp_ui" > "$ui" @@ -292,7 +297,9 @@ fix_desktop_files() { [ "${COOKOPTS/!fixdesktops/}" != "$COOKOPTS" ] && return - [ -z "$(find $install -type f -name '*.desktop')" ] && return + deskpath="$install/usr/share/applications" + [ -d "$deskpath" ] || return + [ -z "$(find $deskpath -type f -name '*.desktop')" ] && return size0=$(sizes des) time0=$(date +%s) @@ -306,7 +313,8 @@ # list of supported locales here. [ -z "$LOCALE" ] && LOCALE=$(get_supported_locales) - for desktop in $(find $install -type f -name '*.desktop'); do + IFS=$'\n' + for desktop in $(find $deskpath -type f -name '*.desktop'); do cp "$desktop" "$desktop.orig" # Sort out .desktop file (is prerequisite to correct working of `fix-desktop-file`) @@ -357,6 +365,7 @@ time0=$(date +%s) # Process all existing *.mo files + IFS=$'\n' for mo in $(find "$install" -type f -name '*.mo'); do tmpfile="$(mktemp)" diff -r 230109645bba -r c43c8640ab19 modules/pkgdb --- a/modules/pkgdb Mon Feb 13 10:01:50 2017 +0100 +++ b/modules/pkgdb Thu Feb 16 02:18:58 2017 +0200 @@ -252,9 +252,10 @@ cp -f $live/*.flavor $live/flavors.list $PKGS separator | dblog { _ 'Total flavors size: %s' "$(du -sh $live | awk '{print $1}')"; newline; } | dblog -rm -f $command separator | dblog _ 'Cook pkgdb end: %s' "$(date "$(_ '+%%F %%R')")" | dblog +> $command + exit 0