cookutils rev 1114
lighttpd/index.cgi: [downloads]: fix display when package listed is packages*.info but absent
modules/pack: fix "false negative" when RSUM is absent in the receipt inside package
modules/pack: fix "false negative" when RSUM is absent in the receipt inside package
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Sun Dec 09 23:24:05 2018 +0200 (2018-12-09) |
parents | 41c25139be4d |
children | 77272271e283 |
files | lighttpd/index.cgi modules/pack |
line diff
1.1 --- a/lighttpd/index.cgi Wed Dec 05 17:04:10 2018 +0200 1.2 +++ b/lighttpd/index.cgi Sun Dec 09 23:24:05 2018 +0200 1.3 @@ -2568,10 +2568,11 @@ 1.4 arch = ($11 == "0") ? "any" : ($11 == "6") ? "x86_64" : "i486"; 1.5 file = $1 "-" $2 "-" arch ".tazpkg"; 1.6 desc = $4; 1.7 - "ls -lh " PKGS "/" file | getline; split($0, ls, " "); 1.8 + "ls -lh " PKGS "/" file | getline lsout; split(lsout, ls, " "); 1.9 + size = (ls[5]) ? ls[5] "B" : "---"; 1.10 printf("<tr><td><a href=\"%s/get/%s\" ", base, file); 1.11 printf("class=\"icon pkg%s\">%s</a></td>", class, file); 1.12 - printf("<td>%sB</td><td>%s</td></tr>\n", ls[5], desc); 1.13 + printf("<td>%s</td><td>%s</td></tr>\n", size, desc); 1.14 } 1.15 }' $PKGS/packages-$ARCH.info 1.16 done
2.1 --- a/modules/pack Wed Dec 05 17:04:10 2018 +0200 2.2 +++ b/modules/pack Sun Dec 09 23:24:05 2018 +0200 2.3 @@ -764,7 +764,7 @@ 2.4 tmpdir=$(mktemp -d) 2.5 cd $tmpdir 2.6 cpio -F "$pkg_file" -i receipt >/dev/null 2>&1 2.7 - RSUM_OLD=$(. receipt; echo $RSUM) 2.8 + RSUM_OLD=$(unset RSUM; . receipt; echo $RSUM) 2.9 cd - >/dev/null 2.10 rm -r $tmpdir 2.11 else