tazbug diff web/plugins/packages/packages.cgi @ rev 137
Update all plugins to use new storage paths
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Wed Feb 22 14:59:49 2017 +0100 (2017-02-22) |
parents | 8bda6c6b79a6 |
children | 2a172aca8228 |
line diff
1.1 --- a/web/plugins/packages/packages.cgi Sat Feb 11 15:19:38 2017 +0100 1.2 +++ b/web/plugins/packages/packages.cgi Wed Feb 22 14:59:49 2017 +0100 1.3 @@ -12,14 +12,14 @@ 1.4 pkg=$(GET pkg) 1.5 echo "<h2>Bugs for: $pkg</h2>" 1.6 echo "<pre>" 1.7 - for bug in $(fgrep -l "OPEN" $bugdir/*/bug.conf) 1.8 + for bug in $(fgrep -l "OPEN" $bugdir/open/*/bug.conf) 1.9 do 1.10 . ${bug} 1.11 if echo "$PKGS" | fgrep -q "$pkg"; then 1.12 dir=$(dirname $bug) 1.13 id=$(basename $dir) 1.14 - echo "ID: $id <a href='$script?id=$id'>$BUG</a> \ 1.15 -<span class='date'>$DATE</span>" 1.16 + echo "Bug $id: <a href='$script?id=$id'>$BUG</a> \ 1.17 +- <span class='date'>$DATE</span>" 1.18 fi 1.19 done 1.20 echo "</pre>" 1.21 @@ -27,14 +27,18 @@ 1.22 # List all pkgs affected by a bug 1.23 echo "<h2>Buggy packages</h2>" 1.24 echo "<pre>" 1.25 - for bug in $(fgrep -l "OPEN" $bugdir/*/bug.conf) 1.26 + for bug in $(ls $bugdir/open) 1.27 do 1.28 - . ${bug} 1.29 - pkgs="$pkgs $PKGS" 1.30 + . $bugdir/open/${bug}/bug.conf 1.31 + for pkg in ${PKGS}; do 1.32 + if ! echo "$pkgs" | grep -q -w "$pkg"; then 1.33 + pkgs="$pkgs $PKGS" 1.34 + fi 1.35 unset PKGS 1.36 + done 1.37 done 1.38 for pkg in $pkgs; do 1.39 - echo "<a href='?pkg=$pkg'>$pkg</a> " 1.40 + echo "Package: <a href='?pkg=$pkg'>$pkg</a>" 1.41 done 1.42 echo "</pre>" 1.43 fi