Kaydet (Commit) 43f01c49 authored tarafından Fatih Aşıcı's avatar Fatih Aşıcı

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.
üst 62403a40
......@@ -247,10 +247,17 @@ class RepoDB(lazydb.LazyDB):
return
dist_name = self.get_distribution(name)
if dist_name is None:
return
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 dist_name != ctx.config.values.general.distribution or \
dist_release != ctx.config.values.general.distribution_release:
if not compatible:
self.deactivate_repo(name)
raise IncompatibleRepoError(
_("Repository '%s' is not compatible with your "
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment