[Collab-qa-commits] r1764 - in udd: sql udd web/cgi-bin
Lucas Nussbaum
lucas at alioth.debian.org
Mon Aug 2 18:16:08 UTC 2010
Author: lucas
Date: 2010-08-02 18:15:59 +0000 (Mon, 02 Aug 2010)
New Revision: 1764
Modified:
udd/sql/setup.sql
udd/udd/ldap_gatherer.py
udd/udd/ubuntu_bugs_gatherer.py
udd/web/cgi-bin/merges.cgi
udd/web/cgi-bin/merges.json.cgi
udd/web/cgi-bin/pts-check.cgi
udd/web/cgi-bin/rcbugs.cgi
udd/web/cgi-bin/sponsorstats.cgi
udd/web/cgi-bin/ubuntu_ftbfs.cgi
udd/web/cgi-bin/ubuntubugs.cgi
Log:
various udd changes
Modified: udd/sql/setup.sql
===================================================================
--- udd/sql/setup.sql 2010-08-02 18:14:01 UTC (rev 1763)
+++ udd/sql/setup.sql 2010-08-02 18:15:59 UTC (rev 1764)
@@ -472,6 +472,7 @@
date_reported text,
date_updated text,
security boolean,
+patches boolean,
PRIMARY KEY (bug));
CREATE TABLE ubuntu_bugs_duplicates (
@@ -618,6 +619,7 @@
gecos text,
birthdate date,
gender numeric,
+ fingerprint text,
PRIMARY KEY (uid)
);
GRANT SELECT ON ldap TO guestdd;
Modified: udd/udd/ldap_gatherer.py
===================================================================
--- udd/udd/ldap_gatherer.py 2010-08-02 18:14:01 UTC (rev 1763)
+++ udd/udd/ldap_gatherer.py 2010-08-02 18:15:59 UTC (rev 1764)
@@ -27,8 +27,8 @@
cur.execute("""PREPARE ldap_insert
AS INSERT INTO ldap
- (uid, login, cn, sn, expire, location, country, activity_from, activity_from_info, activity_pgp, activity_pgp_info, gecos, birthdate, gender)
- VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14)""")
+ (uid, login, cn, sn, expire, location, country, activity_from, activity_from_info, activity_pgp, activity_pgp_info, gecos, birthdate, gender, fingerprint)
+ VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15)""")
entries = []
con = ldap.initialize('ldap://db.debian.org')
@@ -53,11 +53,12 @@
gender = int(f['gender'][0]) if 'gender' in f else None
loc = f['l'][0] if 'l' in f else None
country = f['c'][0] if 'c' in f else None
+ fp = f['keyFingerPrint'][0] if 'keyFingerPrint' in f else None
expired = ('shadowExpire' in f)
- entries.append((int(f['uidNumber'][0]), f['uid'][0], f['cn'][0], f['sn'][0], expired, loc, country, af_date, af_info, ag_date, ag_info, gecos, birthdate, gender))
+ entries.append((int(f['uidNumber'][0]), f['uid'][0], f['cn'][0], f['sn'][0], expired, loc, country, af_date, af_info, ag_date, ag_info, gecos, birthdate, gender, fp))
- cur.executemany("EXECUTE ldap_insert (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)", entries)
+ cur.executemany("EXECUTE ldap_insert (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)", entries)
cur.execute("DEALLOCATE ldap_insert")
cur.execute("ANALYZE ldap")
Modified: udd/udd/ubuntu_bugs_gatherer.py
===================================================================
--- udd/udd/ubuntu_bugs_gatherer.py 2010-08-02 18:14:01 UTC (rev 1763)
+++ udd/udd/ubuntu_bugs_gatherer.py 2010-08-02 18:15:59 UTC (rev 1764)
@@ -159,7 +159,7 @@
# ignore attachments for now
s = set(bm.keys()) - set(['bug', 'title', 'reporter', 'attachments',
'subscribers', 'tags', 'duplicate-of', 'duplicates', 'date-reported',
- 'date-updated', 'security'])
+ 'date-updated', 'security', 'patches'])
if len(s) > 0:
print s
name, login = self.splitpar(bm['reporter'])
@@ -175,8 +175,12 @@
security = 'f'
treported = time.strftime("%a, %d %b %Y %H:%M:%S +0000", reported)
tupdated = time.strftime("%a, %d %b %Y %H:%M:%S +0000", updated)
- c.execute('insert into ubuntu_bugs values (%s, %s, %s, %s, %s, %s, %s, %s)',
- (bugno, bm['title'], login, name, dup, treported, tupdated, security))
+ if len(bm['patches']) > 0:
+ patches = 't'
+ else:
+ patches = 'f'
+ c.execute('insert into ubuntu_bugs values (%s, %s, %s, %s, %s, %s, %s, %s, %s)',
+ (bugno, bm['title'], login, name, dup, treported, tupdated, security, patches))
# subscribers
for sub in bm['subscribers'].split('\n'):
name, login = self.splitpar(sub)
Modified: udd/web/cgi-bin/merges.cgi
===================================================================
--- udd/web/cgi-bin/merges.cgi 2010-08-02 18:14:01 UTC (rev 1763)
+++ udd/web/cgi-bin/merges.cgi 2010-08-02 18:15:59 UTC (rev 1764)
@@ -31,7 +31,7 @@
<h1>Outstanding merges</h1>
EOF
-DREL='squeeze'
+DREL='sid'
UREL='maverick'
puts "Debian release: #{DREL}<br>"
puts "Ubuntu release: #{UREL}<br>"
@@ -65,7 +65,7 @@
from ubuntu_bugs b, ubuntu_bugs_tasks bt
where b.bug = bt.bug
and title ~ '^((P|p)lease )?((M|m)erge|(S|s)ync) .* from Debian'
-and status != 'Fix Released'
+and status not in ('Invalid', 'Fix Released', 'Won''t Fix', 'Opinion')
and distro != 'Debian'")
sth2.execute ; rowsb = sth2.fetch_all
Modified: udd/web/cgi-bin/merges.json.cgi
===================================================================
--- udd/web/cgi-bin/merges.json.cgi 2010-08-02 18:14:01 UTC (rev 1763)
+++ udd/web/cgi-bin/merges.json.cgi 2010-08-02 18:15:59 UTC (rev 1764)
@@ -10,7 +10,7 @@
puts "Content-type: application/json\n\n"
-DREL='squeeze'
+DREL='sid'
UREL='maverick'
dbh = DBI::connect('DBI:Pg:dbname=udd;port=5441;host=localhost', 'guest')
@@ -41,7 +41,7 @@
from ubuntu_bugs b, ubuntu_bugs_tasks bt
where b.bug = bt.bug
and title ~ '^((P|p)lease )?((M|m)erge|(S|s)ync) .* from Debian'
-and status != 'Fix Released'
+and status not in ('Invalid', 'Fix Released', 'Won''t Fix', 'Opinion')
and distro != 'Debian'")
sth2.execute ; rowsb = sth2.fetch_all
Modified: udd/web/cgi-bin/pts-check.cgi
===================================================================
--- udd/web/cgi-bin/pts-check.cgi 2010-08-02 18:14:01 UTC (rev 1763)
+++ udd/web/cgi-bin/pts-check.cgi 2010-08-02 18:15:59 UTC (rev 1764)
@@ -22,15 +22,16 @@
pts = dbh.select_all("select source from pts where #{dbh.quote(cgi['email'])}=email").map { |e| e[0] }
puts "<h1>PTS subscriptions check for #{cgi['email']}</h1>"
if (maint - pts).length > 0
-puts "Packages you maintain but are not subscribed to:<br/><ul>"
-(maint - pts).sort.each { |s| puts "<li><a href=\"http://packages.qa.debian.org/#{s}\">#{s}</a></li>" }
-puts "</ul>"
+puts "Packages you maintain but are not subscribed to:<br/><pre>"
+(maint - pts).sort.each { |s| puts "subscribe #{s} #{cgi['email']}" }
+puts "</pre>"
end
if (upload - pts).length > 0
-puts "Packages you are uploader for but are not subscribed to:<br/><ul>"
-(upload - pts).sort.each { |s| puts "<li><a href=\"http://packages.qa.debian.org/#{s}\">#{s}</a></li>" }
-puts "</ul>"
+puts "Packages you are uploader for but are not subscribed to:<br/><pre>"
+(upload - pts).sort.each { |s| puts "subscribe #{s} #{cgi['email']}" }
+puts "</pre>"
end
+puts 'To be sent in the body of a mail to pts at qa.debian.org. See <a href="http://www.debian.org/doc/developers-reference/resources.html#pts-commands">Developers Reference</a> for more info.<br/>If you are a DD, you can also connect to master and feed those commands to /org/packages.qa.debian.org/bin/pts'
else
puts <<-EOF
Modified: udd/web/cgi-bin/rcbugs.cgi
===================================================================
--- udd/web/cgi-bin/rcbugs.cgi 2010-08-02 18:14:01 UTC (rev 1763)
+++ udd/web/cgi-bin/rcbugs.cgi 2010-08-02 18:15:59 UTC (rev 1764)
@@ -64,3 +64,21 @@
end
puts "</table>"
sth.finish
+
+sth = dbh.prepare("select id, bugs.package, bugs.source, insts, title from bugs, popcon_src where bugs.source = popcon_src.source and id in (select id from bugs_rt_affects_testing) and id not in (select id from bugs_rt_affects_unstable) and severity >= 'serious' order by package")
+sth.execute ; rows = sth.fetch_all
+
+puts "<h2>RC bugs affecting only testing (not unstable, and not pending)</h2>"
+puts "<table>"
+puts "<tr><th>bug</th><th>package</th><th>source</th><th>popcon</th><th>title</th></tr>"
+rows.each do |r|
+ puts "<tr><td><a href=\"http://bugs.debian.org/#{r['id']}\">#{r['id']}</a></td>"
+ puts "<td>#{r['package']}</td>"
+ puts "<td><a href=\"http://packages.qa.debian.org/#{r['source']}\">#{r['source']}</a></td>"
+ puts "<td>#{r['insts']}</td>"
+ puts "<td>#{r['title']}</td>"
+end
+puts "</table>"
+sth.finish
+
+
Modified: udd/web/cgi-bin/sponsorstats.cgi
===================================================================
--- udd/web/cgi-bin/sponsorstats.cgi 2010-08-02 18:14:01 UTC (rev 1763)
+++ udd/web/cgi-bin/sponsorstats.cgi 2010-08-02 18:15:59 UTC (rev 1764)
@@ -13,7 +13,10 @@
and u.changed_by_email = ce1.email
and u.signed_by_email = ce2.email
and ce1.id != ce2.id
-and ce2.id = cl.id")
+and ce2.id = cl.id
+and u.changed_by_email not in (
+select email from carnivore_emails, carnivore_login where carnivore_login.id = carnivore_emails.id)
+")
sth.execute
names = {}
uploaders = {}
@@ -34,6 +37,7 @@
puts "<html><body>"
puts "<h1>Sponsoring stats, powered by UDD!</h2>"
puts "<p>Uploads in <b>bold</b> were NMUs.</p>"
+puts "<p>That excludes uploads done for people who are now DD, even if the upload was done while they were not DD.</p>"
puts '<a href="http://svn.debian.org/wsvn/collab-qa/udd/web/cgi-bin/sponsorstats.cgi?op=file&rev=0&sc=0">source code</a><br/>'
puts "<ul>"
Modified: udd/web/cgi-bin/ubuntu_ftbfs.cgi
===================================================================
--- udd/web/cgi-bin/ubuntu_ftbfs.cgi 2010-08-02 18:14:01 UTC (rev 1763)
+++ udd/web/cgi-bin/ubuntu_ftbfs.cgi 2010-08-02 18:15:59 UTC (rev 1764)
@@ -42,8 +42,8 @@
STDOUT.flush
-res32 = Net::HTTP.get(URI::parse('http://people.ubuntuwire.com/~lucas/ubuntu-nbs/res.maverick.32')).split(/\n/)
-res64 = Net::HTTP.get(URI::parse('http://people.ubuntuwire.com/~lucas/ubuntu-nbs/res.maverick.64')).split(/\n/)
+res32 = Net::HTTP.get(URI::parse('http://people.ubuntuwire.com/~lucas/ubuntu-nbs/res.ubuntu.32')).split(/\n/)
+res64 = Net::HTTP.get(URI::parse('http://people.ubuntuwire.com/~lucas/ubuntu-nbs/res.ubuntu.64')).split(/\n/)
dbh = DBI::connect('DBI:Pg:dbname=udd;port=5441;host=localhost', 'guest')
@@ -90,7 +90,7 @@
if fa[a].nil?
print ",N/A"
else
- print ",http://people.ubuntuwire.org/~lucas/ubuntu-nbs/#{a}/#{r['source']}_#{fa['version']}_lmaverick#{a}.buildlog,#{fa[a][0]}"
+ print ",http://people.ubuntuwire.org/~lucas/ubuntu-nbs/#{a}/#{r['source']}_#{fa['version']}_lubuntu#{a}.buildlog,#{fa[a][0]}"
end
end
puts
@@ -111,7 +111,7 @@
if fa[a].nil?
puts "<td>N/A</td>"
else
- puts "<td><a href=\"http://people.ubuntuwire.org/~lucas/ubuntu-nbs/#{a}/#{r['source']}_#{fa['version']}_lmaverick#{a}.buildlog\">#{fa[a][0]}</a></td>"
+ puts "<td><a href=\"http://people.ubuntuwire.org/~lucas/ubuntu-nbs/#{a}/#{r['source']}_#{fa['version']}_lubuntu#{a}.buildlog\">#{fa[a][0]}</a></td>"
end
end
if fa['32'].nil? or fa['32'][0] == 'OK' # only amd64 failed
@@ -140,7 +140,7 @@
puts "</table>"
puts "<h2>Outdated results</h2>"
-puts "Those test builds were done with a version of the package that was superseded by a newer version in maverick.<br><br>"
+puts "Those test builds were done with a version of the package that was superseded by a newer version in ubuntu.<br><br>"
puts "<table>"
puts "<tr><th>Package</th><th>Section</th><th>Newer in Debian</th><th>i386</th><th>amd64</th><th>Reason</th></tr>"
end
Modified: udd/web/cgi-bin/ubuntubugs.cgi
===================================================================
--- udd/web/cgi-bin/ubuntubugs.cgi 2010-08-02 18:14:01 UTC (rev 1763)
+++ udd/web/cgi-bin/ubuntubugs.cgi 2010-08-02 18:15:59 UTC (rev 1764)
@@ -6,14 +6,23 @@
puts "Content-type: text/plain\n\n"
dbh = DBI::connect('DBI:Pg:dbname=udd;port=5441;host=localhost', 'guest')
-sth = dbh.prepare("select package, count(distinct bugs.bug)
+sth = dbh.prepare("SELECT tbugs.package, bugs, patches
+from (select package, count(distinct bugs.bug) as bugs
from ubuntu_bugs_tasks tasks,ubuntu_bugs bugs
where tasks.bug = bugs.bug
and distro in ('', 'Ubuntu')
-and status not in ('Invalid', 'Fix Released', 'Won''t Fix')
-group by package order by package asc")
+and status not in ('Invalid', 'Fix Released', 'Won''t Fix', 'Opinion')
+group by package) tbugs
+full join
+(select package, count(distinct bugs.bug) as patches
+from ubuntu_bugs_tasks tasks,ubuntu_bugs bugs
+where tasks.bug = bugs.bug
+and distro in ('', 'Ubuntu')
+and status not in ('Invalid', 'Fix Released', 'Won''t Fix', 'Opinion')
+and bugs.patches is true
+group by package) tpatches on tbugs.package = tpatches.package order by package asc")
sth.execute
while row = sth.fetch do
- puts "#{row['package']}|#{row['count']}"
+ puts "#{row['package']}|#{row['bugs']}|#{row['patches'] || 0}"
end
sth.finish
More information about the Collab-qa-commits
mailing list