[Piuparts-commits] [piuparts] 02/02: Move counts.txt from htdocs to master directory.

Holger Levsen holger at moszumanska.debian.org
Wed May 21 11:18:55 UTC 2014


This is an automated email from the git hooks/post-receive script.

holger pushed a commit to branch develop
in repository piuparts.

commit cd1d2d01df9f1b2ba784f17de838db12bf2b9ce9
Author: Holger Levsen <holger at layer-acht.org>
Date:   Tue May 20 18:34:02 2014 +0200

    Move counts.txt from htdocs to master directory.
---
 TODO                         | 5 ++---
 debian/changelog             | 2 ++
 master-bin/prepare_backup.in | 6 +++---
 piuparts-report.py           | 7 ++++---
 4 files changed, 11 insertions(+), 9 deletions(-)

diff --git a/TODO b/TODO
index 637f3ab..979e083 100644
--- a/TODO
+++ b/TODO
@@ -16,15 +16,14 @@ for 0.5x:
     copy.
   - cleanup README_pejacevic.txt from info not related to pejacevic (eg. how
     to run the slaves, etc)
-  - cleanup but_howto.tpl
+  - cleanup bug_howto.tpl
 
 - more stats and graphs:
   - new section stats page:
     - packages processed per day and section, master writes submissions.txt
-    since 0.45 for all sections.
+      since 0.45 for all sections.
     - generate simple diagrams: number of source + binary packages in all
       single distros: lenny, squeeze, wheezy, jessie, sid.
-  - move counts.txt from htdocs to master.
 
 
 for 0.6x:
diff --git a/debian/changelog b/debian/changelog
index 6b3369e..75a5c20 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -11,6 +11,8 @@ piuparts (0.59) UNRELEASED; urgency=low
     - fix log directory creation. (Closes: #746722)
     - fix spelling of "ditto". (Closes: #746724)
     - create graph of bugs filed and display it piuparts.d.o welcome page.
+    - move counts.txt from htdocs to master directory.
+  * master-bin/gather_bts_stats: differate between rc and non-rc bugs.
   * Makefile: don't install crontabs and sudoers file anymore, except when
     installing from git.
   * Packaging:
diff --git a/master-bin/prepare_backup.in b/master-bin/prepare_backup.in
index b440ef9..3db74a2 100755
--- a/master-bin/prepare_backup.in
+++ b/master-bin/prepare_backup.in
@@ -38,6 +38,8 @@ get_config_value BACKUPDIR global backup-directory ''
 copy_to_backupdir() {
 	if [ -f $MASTER/$1 ]; then
 		cp $MASTER/$1 $BACKUPDIR/$1
+	else
+		echo "Warning: $MASTER/$1 does not exist."
 	fi
 }
 
@@ -47,7 +49,5 @@ copy_to_backupdir bts_stats.txt
 for SECTION in $SECTIONS ; do
 	mkdir -p $BACKUPDIR/$SECTION
 	copy_to_backupdir $SECTION/submissions.txt
-	if [ -f $HTDOCS/$SECTION/counts.txt ]; then
-		cp $HTDOCS/$SECTION/counts.txt $BACKUPDIR/$SECTION/
-	fi
+	copy_to_backupdir $SECTION/counts.txt
 done
diff --git a/piuparts-report.py b/piuparts-report.py
index 601cf87..1dfd7c6 100644
--- a/piuparts-report.py
+++ b/piuparts-report.py
@@ -2,7 +2,7 @@
 # -*- coding: utf-8 -*-
 #
 # Copyright 2005 Lars Wirzenius (liw at iki.fi)
-# Copyright 2009-2013 Holger Levsen (holger at layer-acht.org)
+# Copyright 2009-2014 Holger Levsen (holger at layer-acht.org)
 # Copyright © 2011-2014 Andreas Beckmann (anbe at debian.org)
 # Copyright 2013 David Steele (dsteele at gmail.com)
 #
@@ -725,6 +725,7 @@ class Section:
         logging.debug("-------------------------------------------")
         logging.debug("Running section " + self._config.section)
 
+        self._master_directory = master_directory
         self._section_directory = os.path.abspath(os.path.join(master_directory, \
                                                                self._config.section))
         if not os.path.exists(self._section_directory):
@@ -969,7 +970,7 @@ class Section:
         header += "\n"
         counts += "\n"
 
-        countsfile = os.path.join(self._output_directory, "counts.txt")
+        countsfile = os.path.join(self._master_directory, "counts.txt")
         if not os.path.isfile(countsfile):
             logging.debug("writing new file: %s" % countsfile)
             write_file(countsfile, header)
@@ -1199,7 +1200,7 @@ class Section:
 
 
     def make_section_stats_graph(self):
-        countsfile = os.path.join(self._output_directory, "counts.txt")
+        countsfile = os.path.join(self._master_directory, "counts.txt")
         pngfile = os.path.join(self._output_directory, "states.png")
         grdevices = importr('grDevices')
         grdevices.png(file=pngfile, width=1600, height=900, pointsize=10, res=100, antialias="none")

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/piuparts/piuparts.git



More information about the Piuparts-commits mailing list