summaryrefslogtreecommitdiff
path: root/main/utils.py
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2013-11-28 19:55:53 -0500
committerLuke Shumaker <LukeShu@sbcglobal.net>2013-11-28 19:55:53 -0500
commitb2b6c78e3179cef66cd4e9dcea7f9003f409ce8b (patch)
tree2355b55efce971b6c7044b1f04b4a3730d2da50f /main/utils.py
parent0877f0389f187cf2cbf026c73b27071857d3e6f7 (diff)
parentfab8d437929fce202b11707e1cacbc079f61edbc (diff)
Merge tag 'release_2013-11-25' into archweb-generic
Django 1.6 upgrade and other changes Conflicts: templates/news/list.html templates/public/index.html
Diffstat (limited to 'main/utils.py')
-rw-r--r--main/utils.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/main/utils.py b/main/utils.py
index 9ee8db58..97cc540a 100644
--- a/main/utils.py
+++ b/main/utils.py
@@ -187,4 +187,18 @@ class PackageStandin(object):
return '/packages/%s/%s/%s/' % (
self.repo.name.lower(), self.arch.name, self.pkgbase)
+
+class DependStandin(object):
+ '''Resembles a Depend object, and has a few of the same fields, but is
+ really a link to a base package rather than a single package.'''
+ def __init__(self, depends):
+ self._depends = depends
+ first = depends[0]
+ self.name = first.name
+ self.version = first.version
+ self.comparison = first.comparison
+ self.description = first.description
+ self.deptype = first.deptype
+ self.pkg = first.pkg.base_package() or PackageStandin(first.pkg)
+
# vim: set ts=4 sw=4 et: