Stop reading an NMU file that no longer exists.
[bugscan.git] / dohtml
1 #! /bin/sh
2
3 htmldir=/home/sesse/bugscan/www
4
5 realmakepage() {
6         local   filter="$1"     # Distributions to list
7         local   title="$2"      # Title of page
8         local   date="$3"       # Date
9         local   worry="$4"      # Worry about testing only?
10         local   descr           # Description of filter
11
12         if [ -z "$filter" ]; then
13                 descr="all"
14         else
15                 descr="$filter"
16                 filter="-d $filter"
17         fi
18
19         filter="$filter $worry"
20
21         cat <<EOF
22 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
23 <html>
24   <head>
25     <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
26     <title>$title, $date</title>
27   </head>
28 <body bgcolor="white">
29 <h1 align="center">$title</h1>
30
31 <h2 align="center">$date</h2>
32
33 <p align="center">for distribution(s): $descr</p>
34
35 <hr>
36
37 <p>
38 EOF
39         ./bugreport -H -s $filter
40         
41         cat <<EOF
42 <p>
43 Explanation for comment tags:
44 <ul>
45    <li><strong>[FIX]</strong>: describes a simple method to deal with
46        the bug.
47    <li><strong>[STRATEGY]</strong>: describes a possible approach for
48        fixing the bug.
49    <li><strong>[HELP]</strong>: help is needed to fix this bug.
50    <li><strong>[REMOVE]</strong>: package will be removed if bug is not fixed
51 </ul>
52
53 <p>
54 Explanation for <a href="http://www.debian.org/Bugs/Developer#tags">bug
55 tags</a>:
56
57 <ul>
58    <li><strong>P</strong>: pending</li>
59    <li><strong>+</strong>: patch</li>
60    <li><strong>H</strong>: help</li>
61    <li><strong>M</strong>: moreinfo</li>
62    <li><strong>R</strong>: unreproducible</li>
63    <li><strong>S</strong>: security</li>
64    <li><strong>U</strong>: upstream</li>
65    <li><strong>I</strong>: etch-ignore</li>
66 </ul>
67
68 <p>
69 Some bugs have an additional set of tags indicating they only apply
70 to a particular release: O for oldstable (woody), S for stable (sarge),
71 T for testing (etch), U for unstable (sid) or E for experimental. X
72 indicates that the package is not in testing.
73
74 <p>
75
76 EOF
77         ./bugreport -H -l $filter
78
79         cat <<EOF
80 <hr>
81 This page is automatically generated.<br>
82 Please contact
83 <a href="mailto:owner@bugs.debian.org">owner@bugs.debian.org</a> for comments.
84 </body>
85 </html>
86 EOF
87 }
88
89 makemainpage() {
90         cat <<EOF
91 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
92 <html>
93   <head>
94     <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
95     <title>$title, $time</title>
96   </head>
97 <body bgcolor="white">
98 <h1 align="center">$title</h1>
99
100 <h2 align="center">$time</h2>
101
102 <p align="center">
103 EOF
104
105         ./bugreport -Hs
106
107         cat <<EOF
108 </p>
109
110 <div align="center"><img src="graph.png" alt="Graph of RC bugs"></div>
111
112 <p>The red line graphs all bugs with release-critical severities; the green
113 line graphs the number of bugs that are actually a concern for the next
114 release (excluding ignored bugs, bugs on packages not in testing, and bugs
115 whose tags indicate that they don't apply to testing).</p>
116
117 <h2>Recent changes</h2>
118 EOF
119
120         ./bugdiff -Hncs status-old status
121
122         cat <<EOF
123
124 <h2>Detailed lists of RC bug reports:</h2>
125
126 <ul>
127   <li> <a href="debian/all.html">All</a>
128     <br>
129      + <a href="debian/testing.html">Only bugs relevant to testing</a>
130     <br>
131      + <a href="debian-non-US/all.html">All non-US</a>
132   <li> <a href="debian/main.html">main</a>
133     <br>
134      + <a href="debian-non-US/main.html">main non-US</a>
135   <li> <a href="debian/source.html">source</a> 
136     <br>
137      + <a href="debian-non-US/source.html">source non-US</a> 
138   <li> <a href="debian/contrib.html">contrib</a>
139     <br>
140      + <a href="debian-non-US/contrib.html">contrib non-US</a>
141   <li> <a href="debian/non-free.html">non-free</a>
142     <br>
143      + <a href="debian-non-US/non-free.html">non-free non-US</a>
144   <li><a href="other/pseudo.html">pseudo-packages</a>
145        <a href="http://www.debian.org/Bugs/pseudo-packages">(?)</a>
146   <li><a href="other/all.html">Everything in one page</a>
147 </ul>
148 <p clear=both>
149 <hr>
150 This page is automatically generated.<br>
151 Please contact
152 <a href="mailto:owner@bugs.debian.org">owner@bugs.debian.org</a> for comments.
153 To receive all mails sent to release-critical bugs, subscribe to the
154 <a href="http://lists.debian.org/debian-bugs-rc/">debian-bugs-rc</a>
155 mailing list.
156
157 EOF
158 }
159
160 makepage() {
161         if [ ! -d "`dirname $3`" ]; then mkdir -p "`dirname $3`"; fi
162         realmakepage "$1" "$2" "$4" "$5" > $3.new
163         mv -f $3.new $3
164 }
165
166 time=$(date -u --date="$(ls -Ll status | awk '{print $6, $7}'):00 $(date +%z)")
167 oldtime=$(date -u --date="$(ls -Ll status-old | awk '{print $6, $7}'):00 $(date +%z)")
168 title="Release-critical bugs status"
169
170 makepage "debian" "$title" "$htmldir/debian/all.html" "$time"
171 makepage "debian/main" "$title" $htmldir/debian/main.html "$time"
172 makepage "debian/contrib" "$title" $htmldir/debian/contrib.html "$time"
173 makepage "debian/non-free" "$title" $htmldir/debian/non-free.html "$time"
174 makepage "debian/source" "$title" $htmldir/debian/source.html "$time"
175
176 makepage "debian" "$title" "$htmldir/debian/testing.html" "$time" "-t"
177
178 makepage "non-US" "$title" "$htmldir/debian-non-US/all.html" "$time"
179 makepage "non-US/main" "$title" $htmldir/debian-non-US/main.html "$time"
180 makepage "non-US/contrib" "$title" $htmldir/debian-non-US/contrib.html "$time"
181 makepage "non-US/non-free" "$title" $htmldir/debian-non-US/non-free.html "$time"
182 makepage "non-US/source" "$title" $htmldir/debian-non-US/source.html "$time"
183
184 makepage "other/pseudo" "$title" $htmldir/other/pseudo.html "$time"
185
186 makepage "" "$title" $htmldir/other/all.html "$time"
187
188 makemainpage > $htmldir/index.html.new
189 mv -f $htmldir/index.html.new $htmldir/index.html
190