[Collab-qa-commits] r1472 - in ddpo-by-mail: . dato-ood

Raphael Geissert atomo64-guest at alioth.debian.org
Tue Jun 9 21:29:13 UTC 2009


Author: atomo64-guest
Date: 2009-06-09 21:29:13 +0000 (Tue, 09 Jun 2009)
New Revision: 1472

Removed:
   ddpo-by-mail/dato-ood/buildd-stats/
   ddpo-by-mail/dato-ood/fetch
Modified:
   ddpo-by-mail/Makefile
   ddpo-by-mail/dato-ood/common.py
   ddpo-by-mail/dato-ood/ood_excuses.py
Log:
Use the internal copy of dato-ood to generate ood_excuses,
lucas' copy isn't being updated anymore


Modified: ddpo-by-mail/Makefile
===================================================================
--- ddpo-by-mail/Makefile	2009-06-09 21:02:24 UTC (rev 1471)
+++ ddpo-by-mail/Makefile	2009-06-09 21:29:13 UTC (rev 1472)
@@ -16,7 +16,7 @@
 
 all:
 
-$(DATA_DIR) debian-installer:
+$(DATA_DIR) debian-installer ood:
 	mkdir $@
 
 update: $(DATA_DIR)
@@ -25,9 +25,15 @@
 ddpo_packages ddpo_maintainers: $(FORCE)
 	$(WGET) http://qa.debian.org/data/ddpo/results/$@
 
-testing-status.raw ood_excuses.txt: $(FORCE)
+testing-status.raw: $(FORCE)
 	$(WGET) http://qa.debian.org/~lucas/$@
 
+ood/update_output.txt ood/update_excuses.html: ood $(FORCE)
+	cd ood/ && $(WGET) http://release.debian.org/britney/$(subst ood/,,$@)
+
+ood_excuses.txt: ood/update_output.txt ood/update_excuses.html $(FORCE)
+	python ../dato-ood/ood_excuses.py > $@
+
 dehs.txt: $(FORCE)
 	[ -L ddpomail.txt ] || ln -s $@ ddpomail.txt
 	$(WGET) http://dehs.alioth.debian.org/ddpomail.txt

Modified: ddpo-by-mail/dato-ood/common.py
===================================================================
--- ddpo-by-mail/dato-ood/common.py	2009-06-09 21:02:24 UTC (rev 1471)
+++ ddpo-by-mail/dato-ood/common.py	2009-06-09 21:29:13 UTC (rev 1472)
@@ -14,28 +14,18 @@
 
 ##
 
-update_output = 'update.OUTPUT_py'
-update_excuses = 'update.EXCUSES_py'
-binary_source_map_file = 'sources'
+path_prefix = 'ood/'
+update_output = path_prefix + 'update_output.txt'
+update_excuses = path_prefix + 'update_excuses.html'
 
 fuckedarches = [ ]
-all_arches = [ 'alpha', 'amd64', 'arm', 'armel', 'hppa', 'i386', 'ia64',
+all_arches = [ 'alpha', 'amd64', 'armel', 'hppa', 'i386', 'ia64',
                'mips', 'mipsel', 'powerpc', 's390', 'sparc', ]
 
-buildd_stats_dir = os.path.expanduser('~/dato-ood/buildd-stats')
+buildd_stats_dir = os.path.expanduser(path_prefix + 'buildd-stats')
 
 ##
 
-def binary_source_map():
-    sfile = file(binary_source_map_file, 'r')
-    binaries = {}
-
-    for line in sfile:
-        binary, section, source = line.split()
-        binaries[binary] = source
-
-    return binaries
-
 def parse_excuses(excuses_file=update_excuses, buildd_stats=None):
     exfile = file(excuses_file, 'r')
     ex = None
@@ -60,7 +50,7 @@
 
 def parse_buildd_stats(update=True):
     if not os.path.isdir(buildd_stats_dir):
-        print "W: '%s' does not exist, creating it" % buildd_stats_dir
+        print >>sys.stderr, "W: '%s' does not exist, creating it" % buildd_stats_dir
         try:
             os.makedirs(buildd_stats_dir)
         except OSError, e:

Deleted: ddpo-by-mail/dato-ood/fetch
===================================================================
--- ddpo-by-mail/dato-ood/fetch	2009-06-09 21:02:24 UTC (rev 1471)
+++ ddpo-by-mail/dato-ood/fetch	2009-06-09 21:29:13 UTC (rev 1472)
@@ -1,6 +0,0 @@
-#!/bin/bash
-set -e
-rsync /org/bugs.debian.org/etc/indices/sources .
-rm -f update.OUTPUT_py update.EXCUSES_py
-wget -q -O update.OUTPUT_py http://release.debian.org/britney/update_output.txt
-wget -q -O update.EXCUSES_py http://release.debian.org/britney/update_excuses.html

Modified: ddpo-by-mail/dato-ood/ood_excuses.py
===================================================================
--- ddpo-by-mail/dato-ood/ood_excuses.py	2009-06-09 21:02:24 UTC (rev 1471)
+++ ddpo-by-mail/dato-ood/ood_excuses.py	2009-06-09 21:29:13 UTC (rev 1472)
@@ -13,12 +13,6 @@
 
 import common
 
-##
-
-OutFile = os.path.expanduser('~/public_html/ood_excuses.txt')
-
-##
-
 def main():
     buildd_stats = common.parse_buildd_stats()
     excuses = common.parse_excuses()
@@ -46,24 +40,9 @@
         else:
             excuses.pop(ex.package)
 
-    tmp = OutFile + '.new'
+    for p in sorted(excuses.values()):
+        sys.stdout.write(str(p))
 
-    try:
-        out = os.open(tmp, os.O_CREAT | os.O_EXCL | os.O_WRONLY, 0644)
-        for p in sorted(excuses.values()):
-            os.write(out, str(p))
-        os.rename(tmp, OutFile)
-        os.close(out)
-    except OSError, e:
-        if e.errno != errno.EEXIST:
-            raise
-        else:
-            print "W: '%s' exists, skipping" % tmp
-    except:
-        if os.path.exists(tmp):
-            os.unlink(tmp)
-        raise
-
 ###
 
 if __name__ == '__main__':




More information about the Collab-qa-commits mailing list