summaryrefslogtreecommitdiffstats
path: root/main/models.py
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-03-13 17:29:05 +0100
committerDan McGee <dan@archlinux.org>2011-03-13 17:32:00 +0100
commit9730be60a8ef4a04358b0a026ce6b706de21d4e8 (patch)
tree861febdf0ee999272ce30b082752feb8c0f4f811 /main/models.py
parent1dc867587da6b66ca575eb26f4f65cb9d67ffdb3 (diff)
downloadarchweb-9730be60a8ef4a04358b0a026ce6b706de21d4e8.tar.gz
archweb-9730be60a8ef4a04358b0a026ce6b706de21d4e8.tar.xz
Add package epoch support
This comes with pacman 3.5, replacing the old "force" PKGBUILD option. We parse it and store it for now, but don't display it anywhere just yet. Also update a few queries relying on version differences in any of the multiple parts. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'main/models.py')
-rw-r--r--main/models.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/main/models.py b/main/models.py
index a7cc233..d0ccb12 100644
--- a/main/models.py
+++ b/main/models.py
@@ -107,6 +107,7 @@ class Package(models.Model):
pkgbase = models.CharField(max_length=255, db_index=True)
pkgver = models.CharField(max_length=255)
pkgrel = models.CharField(max_length=255)
+ epoch = models.PositiveIntegerField(default=0)
pkgdesc = models.CharField(max_length=255, null=True)
url = models.CharField(max_length=255, null=True)
filename = models.CharField(max_length=255)
@@ -286,7 +287,8 @@ class Package(models.Model):
'is this package similar, name and version-wise, to another'
return self.pkgname == other.pkgname \
and self.pkgver == other.pkgver \
- and self.pkgrel == other.pkgrel
+ and self.pkgrel == other.pkgrel \
+ and self.epoch == other.epoch
def in_testing(self):
'''attempt to locate this package in a testing repo; if we are in