# HG changeset patch # User Christophe Lincoln # Date 1391633857 -3600 # Node ID 7426a4db30d3d764a331511577a5acf7a1f8fafd # Parent 61e512bd800bcd8fc9331bddb4f4676f68fd9604 Add Buggy packages plugin diff -r 61e512bd800b -r 7426a4db30d3 web/bugs.cgi --- a/web/bugs.cgi Wed Feb 05 21:12:44 2014 +0100 +++ b/web/bugs.cgi Wed Feb 05 21:57:37 2014 +0100 @@ -828,6 +828,7 @@

+ $BUGS_TOOLS $(gettext 'View closed bugs') EOT if check_auth; then diff -r 61e512bd800b -r 7426a4db30d3 web/plugins/pkgs/pkgs.cgi --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/plugins/pkgs/pkgs.cgi Wed Feb 05 21:57:37 2014 +0100 @@ -0,0 +1,44 @@ +#!/bin/sh +# +# TinyCM/TazBug Plugin - Skeleton +# +. /usr/lib/slitaz/httphelper + +if [ "$(GET pkgs)" ] || [ "$(GET pkg)" ]; then + d="Skel" + header + html_header + user_box + if [ "$(GET pkg)" ]; then + pkg=$(GET pkg) + echo "

Bugs for: $pkg

" + echo "
"
+		for bug in $(fgrep -l "OPEN" $bugdir/*/bug.conf)
+		do
+			. ${bug}
+			if echo "$PKGS" | fgrep -q "$pkg"; then
+				dir=$(dirname $bug)
+				id=$(basename $dir)
+				echo "ID: $id $BUG \
+$DATE"
+			fi
+		done
+		echo "
" + else + # List all pkgs affected by a bug + echo "

Buggy packages

" + echo "
"
+		for bug in $(fgrep -l "OPEN" $bugdir/*/bug.conf)
+		do
+			. ${bug}
+			pkgs="$pkgs $PKGS"
+			unset PKGS
+		done
+		for pkg in $pkgs; do
+			echo "$pkg "
+		done
+		echo "
" + fi + html_footer + exit 0 +fi diff -r 61e512bd800b -r 7426a4db30d3 web/plugins/pkgs/pkgs.conf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/plugins/pkgs/pkgs.conf Wed Feb 05 21:57:37 2014 +0100 @@ -0,0 +1,13 @@ +# TinyCM/TazBug Plugin configuration + +PLUGIN="Buggy packages" +SHORT_DESC="List buggy packages or all bugs related to a package" +MAINTAINER="devel@slitaz.org" + +# All users +BUGS_TOOLS="${BUGS_TOOLS} Buggy packages" + +# Authenticated users +PLUGINS_TOOLS="${PLUGINS_TOOLS}" + +# Configurable variables used in plugin.cgi