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