# HG changeset patch # User Aleksej Bobylev # Date 1509195883 -10800 # Node ID 03374082dafa91a8f7b02514840aa002286cf781 # Parent 9c835beabf65e503294765b4e1a017b9123d7b29 cook: initial support of --trials|-t; copy(): @rm as quick alias for remove_already_packed(); cook_copy_icons(): initial removing of all hicolor icons; lighttpd/index.cgi: extend packages info; some more tiny edits. diff -r 9c835beabf65 -r 03374082dafa cook --- a/cook Tue Oct 24 05:28:32 2017 +0300 +++ b/cook Sat Oct 28 16:04:43 2017 +0300 @@ -820,9 +820,28 @@ # Cook quality assurance. cookit_quality() { - if [ ! -d "$WOK/$pkg/install" ] && [ -z "$WANTED" ]; then + while true; do + [ ! -d "$WOK/$pkg/install" -a -z "$WANTED" ] || break _ 'ERROR: cook failed' | tee -a $LOGS/$pkg.log - fi + [ "$trials" == 'yes' ] || break + title "Interactive mode" + # TODO: allow commands: + # q - quit; v - edit receipt here using vi; + # s - search for package containing package; + # - install package; [Enter] - retry + _ 'You may install the packages here and/or edit the receipt there.' + newline + while true; do + _n 'Install the package? [name/N] '; read answer + [ -n "$answer" ] || break + tazpkg -gi $answer --root=$root --local --quiet --cookmode + done + newline + _n 'Try again? [Y/n] '; read answer + [ "$answer" == 'n' ] && break + # here you may append log if you want (">>" insted of last ">") + cookit $@ 2>&1 | loglimit 50 > $LOGS/$pkg.log + done [ "${COOKOPTS/skip-log-errors/}" != "$COOKOPTS" ] && return 0 @@ -1386,6 +1405,24 @@ } +# Remove from current $fs files that already packed (for receipts v2). +# Note: the order in $SPLIT is very important. + +remove_already_packed() { + local i j + IFS=$'\n' + for i in $taz/*/files.list; do + [ -e "$i" ] || continue + while read j; do + [ -f $fs$j -o -h $fs$j ] || continue + rm $fs$j + rmdir --parents --ignore-fail-on-non-empty $fs$(dirname $j) + done < $i + done + unset IFS +} + + # Common function to copy files, folders and patterns copy() { @@ -1406,6 +1443,8 @@ /\/share\/devhelp\//d; /\/share\/locale\//d; /\/share\/bash-completion\//d; /\/lib\/systemd\//d; /\/fonts\.scale$/d; /\/fonts\.dir$/d; + /\/share\/appdata\//d; /\/share\/help\//d; + /\/share\/icons\/hicolor\/[1236][245][68]*x[1236][245][68]*\//d; # 22, 24, 32, 64, 128, 256 ' $filelist ;; @dev) @@ -1415,6 +1454,9 @@ /\/Makefile.*/p; /\.inc$/p; /\/include\//p; ' $filelist ;; + @rm) + remove_already_packed + ;; */) # Copy specified folders. i="${i%/}" @@ -1467,34 +1509,19 @@ } -# Remove from current $fs files that already packed (for receipts v2). -# Note: the order in $SPLIT is very important. - -remove_already_packed() { - local i j - IFS=$'\n' - for i in $taz/*/files.list; do - while read j; do - [ -f $fs$j -o -h $fs$j ] || continue - rm $fs$j - rmdir --parents --ignore-fail-on-non-empty $fs$(dirname $j) - done < $i - done - unset IFS -} - - # Function to use in genpkg_rules() to copy hicolor icons in specified sizes # (default: 16 and 48) from $install to $fs cook_copy_icons() { - local sizes=$@ + local sizes=$@ i j action 'Copying hicolor icons...' + [ -d "$fs/usr/share/icons/hicolor" ] && rm -rf "$fs/usr/share/icons/hicolor" mkdir -p $fs/usr/share/icons/hicolor for i in ${sizes:-16 48}; do - [ ! -e "$install/usr/share/icons/hicolor/${i}x$i" ] || - scopy $install/usr/share/icons/hicolor/${i}x$i \ - $fs/usr/share/icons/hicolor + j="${i}x$i"; [ "$i" == 'scalable' ] && j="$i" + [ ! -e "$install/usr/share/icons/hicolor/$j" ] || + scopy $install/usr/share/icons/hicolor/$j \ + $fs/usr/share/icons/hicolor done status } @@ -2008,6 +2035,9 @@ sed -i '$ s|$| [ Done ]|' $activity rm -f $command exit 0 ;; + + --trials|-t) + trials='yes' ;; esac # Rotate log diff -r 9c835beabf65 -r 03374082dafa cooker --- a/cooker Tue Oct 24 05:28:32 2017 +0300 +++ b/cooker Sat Oct 28 16:04:43 2017 +0300 @@ -664,6 +664,7 @@ rm -rf $wok/$pkg $LOGS/$pkg.log sed -i "/^${pkg}$/d" $blocked $broken $commits.tmp sed -i "/^$pkg\t/d" $PKGS/packages.info + sed -i "/^$pkg:/d" $cache/files.list fi if [ -d "$wok/$pkg/stuff" ]; then if [ ! -d "$wok-hg/$pkg/stuff" ]; then diff -r 9c835beabf65 -r 03374082dafa lighttpd/cooker.css --- a/lighttpd/cooker.css Tue Oct 24 05:28:32 2017 +0300 +++ b/lighttpd/cooker.css Sat Oct 28 16:04:43 2017 +0300 @@ -365,6 +365,7 @@ td { padding: 2px; vertical-align: top; } table:not(.half):not(.pkgslist) td:first-child { white-space: nowrap; width: 5rem; } table.half td { width:50%; } +table.third td{ width:33%; } td+td { border-left: 1px solid rgba(0,0,0,0.1); } .activity td:first-child, .cooknotes td:first-child, td.m { color: rgba(0,0,0,0.6); } diff -r 9c835beabf65 -r 03374082dafa lighttpd/index.cgi --- a/lighttpd/index.cgi Tue Oct 24 05:28:32 2017 +0300 +++ b/lighttpd/index.cgi Sat Oct 28 16:04:43 2017 +0300 @@ -507,6 +507,7 @@ \ -e 's#^.*[Ff][Aa][Ii][Ll][Ee][Dd].*#\0#' \ -e 's#^.*[Ff]atal.*#\0#' \ + -e '/non-fatal/ s|||g' \ -e 's#^.*[Nn]ot found.*#\0#' \ -e 's#^.*[Nn]o such file.*#\0#' \ -e 's#^.*No package .* found.*#\0#' \ @@ -547,7 +548,9 @@ s|$_stuff|\${stuff}|g" \ -e "s|\[9\([1-6]\)m||; s|\[39m||; - s|\[1m||g; s|\[0m||g;" + s|\[1m||g; s|\[0m||g" \ + -e "s|^+.*|\0|; + s|^-.*|\0|; /----/s|||" ;; files) @@ -661,7 +664,7 @@ local log active bpkg log="$LOGS/$pkg.log" - echo "

$pkg

" + echo "

$pkg$(. $wok/$pkg/receipt; [ -n "$SHORT_DESC" ] && echo ": $SHORT_DESC")

" echo '
' echo "receipt & stuff" @@ -691,8 +694,11 @@ [ -d "$wok/$pkg/install/usr/share/info" ] && echo "info" - [ -n "$LFS" ] && - echo "(B)LFS" + if [ -n "$LFS" ]; then + printf "" "$LFS" + [ "${LFS/blfs/}" != "$LFS" ] && printf "B" + printf "LFS\n" + fi [ -s "$log" ] && echo "logs" @@ -1019,6 +1025,7 @@ '') page_header + requested_pkg="$pkg" # Package info. if [ ! -f "$wok/$pkg/receipt" ]; then # Let's look at the cases when the package was not found @@ -1069,13 +1076,15 @@ summary "$log" # Informal table with dependencies + pkg="$requested_pkg" cat < -

Dependencies of packages

- +

Related packages

+
+ @@ -1094,6 +1103,23 @@
Build dependenciesRuntime dependencies Required by
EOT { + [ -s "$PKGS/packages.info" ] && + awk -F$'\t' -vp="$pkg" '{ + if ($1 == p) print $8 + }' "$PKGS/packages.info" + } | tr ' ' '\n' | sort -u | \ + while read i; do + [ -n "$i" ] && + echo "" + done + cat < + +
 $i
+ +EOT + + { for i in $(awk -F$'\t' -vp="$pkg" '{if($1==p)print $2}' $splitdb); do [ -s "$PKGS/packages.info" ] && @@ -1336,6 +1362,7 @@ /\/share\/locale\// { tag("loc", 4); next } /\.h$/ || /\.a$/ || /\.la$/ || /\.pc$/ || /\/bin\/.*-config$/ || /\/Makefile.*$/ { tag("dev", 3); next } + /\/share\/help\// || /\/share\/appdata\// { tag("gnm", 6); next } { tag("???", 1) } ' > $table @@ -1346,7 +1373,7 @@ head) echo -n '
';; body) echo -n '';; esac - for j in '???1' dev3 loc4 ico2 doc5 man5 pod5 '---0'; do + for j in '???1' dev3 loc4 ico2 doc5 man5 pod5 gnm6 '---0'; do tag=${j:0:3}; class="c${j:3:1}0"; [ "$class" == 'c00' ] && class='c01' case $i in head) echo -n "";; diff -r 9c835beabf65 -r 03374082dafa modules/deps --- a/modules/deps Tue Oct 24 05:28:32 2017 +0300 +++ b/modules/deps Sat Oct 28 16:04:43 2017 +0300 @@ -151,8 +151,9 @@ s("xorg-xcb-util-renderutil-dev", "xcb-util-renderutil-dev"); s("eudev-dev", "udev-dev"); s("util-linux-uuid-dev", "ossp-uuid-dev"); - s("libltdl", "libltdl"); # weird s("polkit-pam-dev", "polkit-dev"); + s("nspr", "palemoon"); # I doubt app may depend on Palemoon + s("nss", "palemoon"); # # if called with "--incl": show all deps including glibc-base, # gcc-lib-base, glibc-dev and gcc; otherwise hide them
 
$tag