[Piuparts-commits] [piuparts] 01/01: p-r: archive outdated logfiles even if the current version is untested
Holger Levsen
holger at moszumanska.debian.org
Wed Feb 12 10:55:50 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 819dc811f32f8b19cfc8324a20ed091bc556c59d
Author: Andreas Beckmann <anbe at debian.org>
Date: Tue Feb 11 02:56:57 2014 +0100
p-r: archive outdated logfiles even if the current version is untested
these logs may get stuck in the recycling queue
Signed-off-by: Andreas Beckmann <anbe at debian.org>
---
debian/changelog | 1 +
piuparts-report.py | 11 ++++++++++-
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/debian/changelog b/debian/changelog
index 8eb3e5c..256f04e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -53,6 +53,7 @@ piuparts (0.57) UNRELEASED; urgency=low
* piuparts-report.py:
- Mark essential-required as obsolete and hide it.
- Integrate the reporting part from detect_well_known_errors.py.
+ - Archive outdated logs even if the current version is untested.
* master-bin/detect_well_known_errors.py:
- Only update .kpr files, the reporting part was integrated into
piuparts-report.
diff --git a/piuparts-report.py b/piuparts-report.py
index 83d511f..36b69e7 100644
--- a/piuparts-report.py
+++ b/piuparts-report.py
@@ -1402,7 +1402,9 @@ class Section:
def cleanup_removed_packages(self, logs_by_dir):
- for vdir in logs_by_dir.keys():
+ vdirs = logs_by_dir.keys()
+ vdirs.remove("reserved")
+ for vdir in vdirs:
for log in sorted(logs_by_dir[vdir]):
if log.endswith(".log"):
package, version = log[:-len(".log")].split("_")
@@ -1410,6 +1412,13 @@ class Section:
logging.debug("Package %s was removed, archiving %s/%s" % (package, vdir, log))
self.archive_logfile(vdir, log)
logs_by_dir[vdir].remove(log)
+ else:
+ current = self._binary_db.get_version(package)
+ if version != current:
+ logging.debug("Archiving %s/%s, package is outdated (%s)" %
+ (vdir, log, current))
+ self.archive_logfile(vdir, log)
+ logs_by_dir[vdir].remove(log)
def generate_html(self):
--
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