From 43f01c4989cf7993939adfd5b25b63be8075aada Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fatih=20A=C5=9F=C4=B1c=C4=B1?= Date: Sun, 30 May 2010 19:41:26 +0000 Subject: [PATCH] repodb: Do not check compatibility if distro info is not included Check distro name if specified in index file. If distro release is also specified, check it for compatibility in addition to distro name. --- pisi/db/repodb.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/pisi/db/repodb.py b/pisi/db/repodb.py index d707c677..4d2f8780 100644 --- a/pisi/db/repodb.py +++ b/pisi/db/repodb.py @@ -247,10 +247,17 @@ class RepoDB(lazydb.LazyDB): return dist_name = self.get_distribution(name) - dist_release = self.get_distribution_release(name) + if dist_name is None: + return - if dist_name != ctx.config.values.general.distribution or \ - dist_release != ctx.config.values.general.distribution_release: + compatible = dist_name == ctx.config.values.general.distribution + + dist_release = self.get_distribution_release(name) + if dist_release is not None: + compatible &= \ + dist_release == ctx.config.values.general.distribution_release + + if not compatible: self.deactivate_repo(name) raise IncompatibleRepoError( _("Repository '%s' is not compatible with your "