From 2263f5e460639f0bfaaf52c677bbc9f56726a77d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=2E=C3=87a=C4=9Flar=20Onur?= Date: Sat, 10 Feb 2007 11:47:34 +0000 Subject: [PATCH] sync with trunk --- scripts/repostats.py | 47 +++++++++++++++++++++++--------------------- 1 file changed, 25 insertions(+), 22 deletions(-) diff --git a/scripts/repostats.py b/scripts/repostats.py index eef240e7..6a2d4b5a 100755 --- a/scripts/repostats.py +++ b/scripts/repostats.py @@ -344,14 +344,14 @@ class Missing: self.revRuntimeDeps = [] def report_html(self): - bDeps = map(lambda x: "%s" % (x, x), self.revBuildDeps) - rDeps = map(lambda x: "%s" % (x, x), self.revRuntimeDeps) + bDeps = map(lambda x: "%s" % (x, x), self.revBuildDeps) + rDeps = map(lambda x: "%s" % (x, x), self.revRuntimeDeps) dict = { "name": self.name, "revBuildDeps": ", ".join(bDeps), "revRuntimeDeps": ", ".join(rDeps) } - template_write("paksite/package-%s.html" % self.name, "missing", dict) + template_write("paksite/binary/%s.html" % self.name, "missing", dict) class Package: @@ -396,12 +396,12 @@ class Package: def report_html(self): source = self.source.spec.source - bDeps = map(lambda x: "%s" % (x, x), + bDeps = map(lambda x: "%s" % (x, x), (map(lambda x: x.package, source.buildDependencies))) - rDeps = map(lambda x: "%s" % (x, x), + rDeps = map(lambda x: "%s" % (x, x), (map(lambda x: x.package, self.pakspec.packageDependencies))) - rbDeps = map(lambda x: "%s" % (x, x), self.revBuildDeps) - rrDeps = map(lambda x: "%s" % (x, x), self.revRuntimeDeps) + rbDeps = map(lambda x: "%s" % (x, x), self.revBuildDeps) + rrDeps = map(lambda x: "%s" % (x, x), self.revRuntimeDeps) dict = { "name": self.name, "source": source.name, @@ -412,7 +412,7 @@ class Package: "revBuildDeps": ", ".join(rbDeps), "revRuntimeDeps": ", ".join(rrDeps) } - template_write("paksite/package-%s.html" % self.name, "package", dict) + template_write("paksite/binary/%s.html" % self.name, "package", dict) class Source: @@ -448,7 +448,7 @@ class Source: def report_html(self): source = self.spec.source - paks = map(lambda x: "%s" % (x, x), + paks = map(lambda x: "%s" % (x, x), (map(lambda x: x.name, self.spec.packages))) histdata = map(lambda x: (x.release, x.date, x.name, x.name, x.comment), self.spec.history) ptch = map(lambda x: "%s" % (self.uri, @@ -465,7 +465,7 @@ class Source: "patches": "
".join(ptch), "uri": self.uri } - template_write("paksite/source-%s.html" % self.name, "source", dict) + template_write("paksite/source/%s.html" % self.name, "source", dict) class Packager: @@ -502,9 +502,9 @@ class Packager: Packager(spec, update) def report_html(self): - srcs = map(lambda x: "%s" % (x, x), self.sources) + srcs = map(lambda x: "%s" % (x, x), self.sources) srcs.sort() - upds = map(lambda x: "%s (%s)
%s
" % ( + upds = map(lambda x: "%s (%s)
%s
" % ( x[0], x[0], x[1], x[2]), self.updates) dict = { "name": self.name, @@ -512,7 +512,7 @@ class Packager: "sources": "
".join(srcs), "updates": " ".join(upds) } - template_write("paksite/%s.html" % self.name, "packager", dict) + template_write("paksite/packager/%s.html" % self.name, "packager", dict) class Repository: @@ -595,20 +595,20 @@ class Repository: self.processPisi(os.path.join(root, fn)) def report_html(self): - miss = map(lambda x: "%s" % (x, x), missing.keys()) + miss = map(lambda x: "%s" % (x, x), missing.keys()) upeople = [] for p in self.people.get_list(): - upeople.append(("%s" % (p[0], p[0]), p[1])) + upeople.append(("%s" % (p[0], p[0]), p[1])) if errors: e = "
".join(errors) else: e = "" upatch = [] for p in self.mostpatched.get_list(5): - upatch.append(("%s" % (p[0], p[0]), p[1])) + upatch.append(("%s" % (p[0], p[0]), p[1])) ulongpy = [] for p in self.longpy.get_list(5): - ulongpy.append(("%s" % (p[0], p[0]), p[1])) + ulongpy.append(("%s" % (p[0], p[0]), p[1])) if self.total_installed_size: items = self.installed_sizes.items() items.sort(valuesort) @@ -628,7 +628,7 @@ class Repository: "errors": e } template_write("paksite/index.html", "repo", dict) - srclist = map(lambda x: "%s" % (x, x), sources) + srclist = map(lambda x: "%s" % (x, x), sources) srclist.sort() dict = { "source_list": "
".join(srclist) @@ -683,10 +683,13 @@ if __name__ == "__main__": printu(" %s\n" % m) if do_web: - try: - os.mkdir("paksite") - except: - pass + if not os.path.exists("paksite/packager"): + os.makedirs("paksite/packager") + if not os.path.exists("paksite/binary"): + os.makedirs("paksite/binary") + if not os.path.exists("paksite/source"): + os.makedirs("paksite/source") + repo.report_html() for p in packagers.values(): p.report_html()