summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Finney <seanius@debian.org>2011-03-29 23:23:38 +0200
committerSean Finney <seanius@debian.org>2011-03-29 23:23:38 +0200
commit0dca0a021910998afe3e9caa7fc159698b3eb784 (patch)
tree2c9b67067ce3e66232c25030373afcba85fa84e1
parent29fd662321515dc68bda4ec0fd4d52c2b1dbbc4f (diff)
parent0e6d288bf4c21b043a02c6cc19367bb937397edd (diff)
downloadpatch-tracker-0dca0a021910998afe3e9caa7fc159698b3eb784.tar.gz
Merge commit '0e6d288bf4c21b043a02c6cc19367bb937397edd' into django-rewrite
-rw-r--r--README7
-rwxr-xr-xpatchtracker/Conf.py6
-rwxr-xr-xpatchtracker/SourceArchive.py19
-rw-r--r--reprepro/conf/distributions7
-rw-r--r--static/500.html8
5 files changed, 30 insertions, 17 deletions
diff --git a/README b/README
index 6ff74e5..1b96fc5 100644
--- a/README
+++ b/README
@@ -20,9 +20,10 @@ required software:
first, you need a partial source archive, with the .dsc, diff.gz, Release,
and Sources.gz files available. there's a sample config in the subdir
./reprepro, if you don't have one handy. Using a devious little python
-filter, it will fetch the dsc and diff.gz files from etch/lenny/sid without
-fetching the rest of the debs/tarballs, which should keep the archive size
-down a bit (though it should also work just fine on a normal archive too).
+filter, it will fetch the dsc and diff.gz files from the various releases
+without fetching the rest of the debs/tarballs, which should keep the
+archive size down a bit (though it should also work just fine on a normal
+archive too).
so, you have your source archive available, and installed somewhere.
next set up a web server, and configure it to serve up the application from
diff --git a/patchtracker/Conf.py b/patchtracker/Conf.py
index e89a129..28820b5 100755
--- a/patchtracker/Conf.py
+++ b/patchtracker/Conf.py
@@ -38,6 +38,12 @@ archive_lists_compressed = False
indication flag for the scripts that interact with it.
"""
+suites = None
+""" Override the suites that should be tracked in the application. Should
+ be a chronologically ordered list and should correspond to the
+ seperately managed reprepro configuration.
+"""
+
try:
from localconfig import *
except ImportError:
diff --git a/patchtracker/SourceArchive.py b/patchtracker/SourceArchive.py
index ce3459a..303bcdd 100755
--- a/patchtracker/SourceArchive.py
+++ b/patchtracker/SourceArchive.py
@@ -4,6 +4,7 @@ from fnmatch import fnmatch
from gzip import GzipFile
from debian_bundle import deb822
import difflib
+from patchtracker import Conf
import models
@@ -30,6 +31,8 @@ class Archive:
def parsesuites(self, filter=None):
slist = os.listdir(self.distsdir)
+ if Conf.suites:
+ slist = set(Conf.suites).intersection(set(slist))
if filter:
slist = set(filter).intersection(set(slist))
for s in sorted(slist):
@@ -151,9 +154,11 @@ class ReleaseList:
def __init__(self, project):
self.project = project
- # XXX this is hard coded for now...
self.relorder = {}
- self.relorder["debian"] = ["etch", "lenny", "squeeze", "sid", "experimental"]
+ if Conf.suites:
+ self.relorder["debian"] = Conf.suites
+ else:
+ self.relorder["debian"] = ["lenny", "squeeze", "wheezy", "sid", "experimental"]
def __iter__(self):
for r in self.relorder[self.project]:
@@ -164,17 +169,17 @@ if __name__ == "__main__":
import Conf
import sys
import copy
- a = Archive(sys.argv[1], suitefilter=["etch"])
+ a = Archive(sys.argv[1], suitefilter=["lenny"])
b = copy.deepcopy(a)
b.addsuite("lenny")
- b.addcomponent("etch", "something")
+ b.addcomponent("lenny", "something")
class x:
def __init__(self,name):
self.name=name
- b.addsourcepackage("etch","main",x("foo"))
+ b.addsourcepackage("lenny","main",x("foo"))
print "suite diff"
print "\n".join( ArchiveDiffer().diffsuites(a,b) )
print "component diff"
- print "\n".join( ArchiveDiffer().diffcomponents(a,b,"etch") )
+ print "\n".join( ArchiveDiffer().diffcomponents(a,b,"lenny") )
print "package diff"
- print "\n".join( ArchiveDiffer().diffsourcepackages(a,b,"etch","main") )
+ print "\n".join( ArchiveDiffer().diffsourcepackages(a,b,"lenny","main") )
diff --git a/reprepro/conf/distributions b/reprepro/conf/distributions
index 0db0205..cd05817 100644
--- a/reprepro/conf/distributions
+++ b/reprepro/conf/distributions
@@ -1,13 +1,14 @@
-Codename: etch
+Codename: lenny
Architectures: source
Components: main contrib non-free
+Update: - debian
-Codename: lenny
+Codename: squeeze
Architectures: source
Components: main contrib non-free
Update: - debian
-Codename: squeeze
+Codename: wheezy
Architectures: source
Components: main contrib non-free
Update: - debian
diff --git a/static/500.html b/static/500.html
index 2663c7a..84008ae 100644
--- a/static/500.html
+++ b/static/500.html
@@ -5,20 +5,20 @@
<title>Oh noes! Error!
</title>
<link rel="stylesheet" type="text/css"
- href="./css/patches.css"/>
+ href="/static/css/patches.css"/>
</head>
<body>
<div class="pageheader">
- <img alt="[patchlogo]" src="./img/swirlpatch.png"/>
- <p> <a href="../">Debian patch tracking system </a> </p>
+ <img alt="[patchlogo]" src="/static/img/swirlpatch.png"/>
+ <p> <a href="/">Debian patch tracking system </a> </p>
<div class="breadcrumb">
</div> <!-- breadcrumb -->
</div>
<h1>Oh noes! An error!</h1>
<div align="center">
- <img alt="[maintenance cat]" src="./img/500-ohnoes.png" width="300" />
+ <img alt="[maintenance cat]" src="/static/img/500-ohnoes.png" width="300" />
<p>
The system is currently unavailable. Please wait for it to become
available again.