# HG changeset patch # User Aleksej Bobylev # Date 1481749439 -7200 # Node ID cc73035433abdc47e5a0464809beb38c6d3f704b # Parent 30c6b6064a50fc2a0049f6a4913b05e63a9e2927 cook: add cook_split_rm(); web/cooker.cgi: visualize console colorizations (existed in the bash log) diff -r 30c6b6064a50 -r cc73035433ab cook --- a/cook Mon Dec 12 21:40:00 2016 +0000 +++ b/cook Wed Dec 14 23:03:59 2016 +0200 @@ -790,6 +790,28 @@ } +# Remove files provided by splitted packages +# For example: +# 1. Package "pkg-main": +# SPLIT="pkg-1 pkg-2 pkg-extra" +# 2. Package="pkg-extra": +# WANTED="pkg-main" +# BUILD_DEPENDS="pkg-1 pkg-2" +# cook_copy_folders usr +# cook_split_rm $BUILD_DEPENDS + +cook_split_rm() { + for i in $@; do + action 'Remove files provided by splitted package %s...' "$i" + while read j; do + [ -f "$fs$j" -o -h "$fs$j" ] && rm $fs$j + rmdir "$(dirname "$fs$j")" 2>/dev/null + done < $WOK/$i/taz/$i-$VERSION/files.list + :; status + done +} + + # Update installed.cook.diff update_installed_cook_diff() { diff -r 30c6b6064a50 -r cc73035433ab doc/cookopts.txt --- a/doc/cookopts.txt Mon Dec 12 21:40:00 2016 +0000 +++ b/doc/cookopts.txt Wed Dec 14 23:03:59 2016 +0200 @@ -16,6 +16,7 @@ The presence of this option overrides the default action (files will not be automatically copied). +!menus Default action is to copy desktop files from a /usr/share/applications folder (the same action that made obsolete option `GENERIC_MENUS="no"`). The presence of this option overrides the default action (files will not be diff -r 30c6b6064a50 -r cc73035433ab web/cooker.cgi --- a/web/cooker.cgi Mon Dec 12 21:40:00 2016 +0000 +++ b/web/cooker.cgi Wed Dec 14 23:03:59 2016 +0200 @@ -110,14 +110,14 @@ # -# Unpack to stdout +# Unpack to stdout docat() { case "$1" in - *gz) zcat ;; - *bz2) bzcat ;; - *xz) xzcat ;; - *) cat + *gz) zcat ;; + *bz2) bzcat ;; + *xz) xzcat ;; + *) cat esac < $1 } @@ -152,7 +152,7 @@ : ${_install=#_#_#} : ${_fs=#_#_#} : ${_stuff=#_#_#} - sed -e 's/&/\&/g;s//\>/g' \ + sed -e 's/&/\&/g; s//\>/g' \ -e 's#OK$#OK#g' \ -e 's#Done$#Done#g' \ -e 's#yes$#yes#g' \ @@ -160,15 +160,22 @@ -e 's#error$#error#g' \ -e 's#ERROR:#ERROR:#g' \ -e 's#WARNING:#WARNING:#g' \ - -e s"#^Executing:\([^']*\).#\0#"g \ - -e s"#^====\([^']*\).#\0#"g \ - -e s"#^[a-zA-Z0-9]\([^']*\) :: #\0#"g \ - -e s"#ftp://[^ '\"]*#\0#"g \ - -e s"#http://[^ '\"]*#\0#"g | \ - sed "s|$_src|\${src}|g; - s|$_install|\${install}|g; - s|$_fs|\${fs}|g; - s|$_stuff|\${stuff}|g" + -e "s#^Executing:\([^']*\).#\0#g" \ + -e "s#^====\([^']*\).#\0#g" \ + -e "s#^[a-zA-Z0-9]\([^']*\) :: #\0#g" \ + -e "s#ftp://[^ '\"]*#\0#g" \ + -e "s#http://[^ '\"]*#\0#g" \ + -e "s|$_src|\${src}|g; + s|$_install|\${install}|g; + s|$_fs|\${fs}|g; + s|$_stuff|\${stuff}|g" \ + -e "s|\[91m||; + s|\[92m||; + s|\[93m||; + s|\[94m||; + s|\[95m||; + s|\[96m||; + s|\[39m||;" ;; receipt)