tazbug annotate 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 |
rev | line source |
---|---|
pankso@80 | 1 #!/bin/sh |
pankso@80 | 2 # |
pankso@106 | 3 # TazBug Plugin - Buggy packages plugins |
pankso@80 | 4 # |
pankso@80 | 5 |
pankso@81 | 6 if [ "$(GET packages)" ] || [ "$(GET pkg)" ]; then |
pankso@80 | 7 d="Skel" |
pankso@80 | 8 header |
pankso@80 | 9 html_header |
pankso@80 | 10 user_box |
pankso@80 | 11 if [ "$(GET pkg)" ]; then |
pankso@80 | 12 pkg=$(GET pkg) |
pankso@80 | 13 echo "<h2>Bugs for: $pkg</h2>" |
pankso@80 | 14 echo "<pre>" |
pankso@137 | 15 for bug in $(fgrep -l "OPEN" $bugdir/open/*/bug.conf) |
pankso@80 | 16 do |
pankso@80 | 17 . ${bug} |
pankso@80 | 18 if echo "$PKGS" | fgrep -q "$pkg"; then |
pankso@80 | 19 dir=$(dirname $bug) |
pankso@80 | 20 id=$(basename $dir) |
pankso@137 | 21 echo "Bug $id: <a href='$script?id=$id'>$BUG</a> \ |
pankso@137 | 22 - <span class='date'>$DATE</span>" |
pankso@80 | 23 fi |
pankso@80 | 24 done |
pankso@80 | 25 echo "</pre>" |
pankso@80 | 26 else |
pankso@80 | 27 # List all pkgs affected by a bug |
pankso@80 | 28 echo "<h2>Buggy packages</h2>" |
pankso@80 | 29 echo "<pre>" |
pankso@137 | 30 for bug in $(ls $bugdir/open) |
pankso@80 | 31 do |
pankso@137 | 32 . $bugdir/open/${bug}/bug.conf |
pankso@137 | 33 for pkg in ${PKGS}; do |
pankso@137 | 34 if ! echo "$pkgs" | grep -q -w "$pkg"; then |
pankso@137 | 35 pkgs="$pkgs $PKGS" |
pankso@137 | 36 fi |
pankso@80 | 37 unset PKGS |
pankso@137 | 38 done |
pankso@80 | 39 done |
pankso@80 | 40 for pkg in $pkgs; do |
pankso@137 | 41 echo "Package: <a href='?pkg=$pkg'>$pkg</a>" |
pankso@80 | 42 done |
pankso@80 | 43 echo "</pre>" |
pankso@80 | 44 fi |
pankso@80 | 45 html_footer |
pankso@80 | 46 exit 0 |
pankso@80 | 47 fi |