commit:     87f00cc87400b9d0621d547f48911d0af6285596
Author:     Markos Chandras <hwoarang <AT> gentoo <DOT> org>
AuthorDate: Sat Apr 18 10:41:25 2015 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Fri Apr 24 16:37:48 2015 +0000
URL:        https://gitweb.gentoo.org/proj/qa-scripts.git/commit/?id=87f00cc8

maintainer-needed.sh: Add script to list maintainer-needed packages

Replacement for
https://wwwold.gentoo.org/proj/en/qa/treecleaners/maintainer-needed.xml

 maintainer-needed.sh | 49 +++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 49 insertions(+)

diff --git a/maintainer-needed.sh b/maintainer-needed.sh
new file mode 100755
index 0000000..e2c189b
--- /dev/null
+++ b/maintainer-needed.sh
@@ -0,0 +1,49 @@
+#!/bin/bash
+# Copyright 2015 Gentoo Foundation
+# Distributed under the terms of the GNU GPL version 2 or later
+# Author: Markos Chandras <[email protected]>
+
+tmpfile="/tmp/mn-pkglist$$.tmp"
+
+cleanup () {
+       [[ -e ${tmpfile} ]] && rm ${tmpfile}
+}
+
+portageq [email protected] -n > ${tmpfile} || { 
cleanup; exit 1; }
+
+echo """
+<html>
+       <head>
+               <style type=\"text/css\"> li a { font-family: monospace; 
display: block; float: left; }</style>
+               <title>Orphan packages</title>
+       </head>
+       <body>
+               List generated on $(date)<br/>
+               Total packages: <b>$(wc -l ${tmpfile} | cut -d ' '  
-f1)</b><br/><br/>
+               <table>
+                       <tr>
+                               <th>Package Name</th>
+                               <th>Description</th>
+                               <th>Open bugs</th>
+                       </tr>
+"""
+
+while read pkg; do
+       echo """
+                       <tr>
+                               <td>${pkg}</td>
+                               <td>$(pquery --one-attr description ${pkg} | 
tail -n 1)</td>
+                               <td><a 
href=\"https://bugs.gentoo.org/buglist.cgi?quicksearch=${pkg}\";>Open 
Bugs</a></td>
+                       </tr>
+       """
+done < ${tmpfile}
+
+echo """
+               </table>
+       </body>
+</html>
+"""
+
+cleanup
+
+exit 0

Reply via email to