# HG changeset patch # User Aleksej Bobylev # Date 1480427597 -7200 # Node ID bd3b572e26514a6fea60fddf40c6e8d35c39240a # Parent 9dc64af5ba9c164781694fe3a0f4daa2f83b8849 cook: 1) set_paths(): follow receipt possible changes (allow auto-updating); 2) strip_mo_i18n(): search for *.mo files only in /usr/share/locale (fix gambas2 cooking) diff -r 9dc64af5ba9c -r bd3b572e2651 cook --- a/cook Sat Nov 19 22:48:02 2016 +0200 +++ b/cook Tue Nov 29 15:53:17 2016 +0200 @@ -153,6 +153,7 @@ set_paths() { pkgdir="$WOK/$PACKAGE" + . "$pkgdir/receipt" basesrc="$pkgdir/source" tmpsrc="$basesrc/tmp" src="$basesrc/$PACKAGE-$VERSION" @@ -369,6 +370,7 @@ # Display cooked package summary. summary() { + set_paths cd $WOK/$pkg [ -d $WOK/$pkg/install ] && prod=$(du -sh $WOK/$pkg/install | awk '{print $1}' 2>/dev/null) [ -d $WOK/$pkg/source ] && srcdir=$(du -sh $WOK/$pkg/source | awk '{print $1}' 2>/dev/null) @@ -624,10 +626,11 @@ strip_mo_i18n() { [ "${COOKOPTS/!i18nz/}" != "$COOKOPTS" ] && return - [ -z "$(find $fs -type f -name '*.mo')" ] && return + [ -d "$fs/usr/share/locale" ] || return + [ -z "$(find $fs/usr/share/locale -type f -name '*.mo')" ] && return action 'Stripping translations files...' - local size0=$(find $fs -type f -name '*.mo' -exec ls -l \{\} \; | awk '{s+=$5}END{print s}') + local size0=$(find $fs$fs/usr/share/locale -type f -name '*.mo' -exec ls -l \{\} \; | awk '{s+=$5}END{print s}') local time0=$(date +%s) # The variable $LOCALE is set in cook.conf and may be overridden in the receipt.