From b62603f7b2d1f03a815606b0ed0b97aa03a2b386 Mon Sep 17 00:00:00 2001 From: Faik Uygur Date: Thu, 28 Jan 2010 13:02:39 +0000 Subject: [PATCH] Add repo check arch and check dist methods to repodb --- pisi/db/repodb.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pisi/db/repodb.py b/pisi/db/repodb.py index c755d80f..661f9182 100644 --- a/pisi/db/repodb.py +++ b/pisi/db/repodb.py @@ -225,3 +225,12 @@ class RepoDB(lazydb.LazyDB): def get_distribution_release(self, name): doc = self.get_repo_doc(name) return doc.getTag("Distribution").getTagData("Version") + + def check_architecture(self, name): + return self.get_architecture(name) == ctx.config.values.general.architecture + + def check_distribution(self, name): + return self.get_distribution(name) == ctx.config.values.general.distribution and \ + self.get_distribution_release(name) == ctx.config.values.general.distribution_release + +