diff --git a/pisi/cli/addrepo.py b/pisi/cli/addrepo.py index 007c219a..c9425bae 100644 --- a/pisi/cli/addrepo.py +++ b/pisi/cli/addrepo.py @@ -45,9 +45,6 @@ NB: We support only local files (e.g., /a/b/c) and http:// URIs at the moment group.add_option("--at", action="store", type="int", default=None, help=_("Add repository at given position (0 is first)")) - group.add_option("--ignore-check", action="store_true", - default=False, - help=_("Skip distribution release and architecture check")) self.parser.add_option_group(group) def run(self): diff --git a/pisi/index.py b/pisi/index.py index 6bd2e394..0afb8c1a 100644 --- a/pisi/index.py +++ b/pisi/index.py @@ -76,10 +76,6 @@ class Index(xmlfile.XmlFile): doc = self.read_uri(uri, tmpdir, force) - # check packages' DistributionReleases and Architecture - if not ctx.get_option('ignore_check'): - self.check_distribution_and_architecture(doc) - if not repo: repo = self.distribution.name() # and what do we do with it? move it to index dir properly @@ -91,16 +87,6 @@ class Index(xmlfile.XmlFile): tmpdir = os.path.join(ctx.config.index_dir(), repo) pisi.file.File.check_signature(filename, tmpdir) - def check_distribution_and_architecture(self, doc): - if doc.getTag("Distribution").getTagData("Version") != ctx.config.values.get("general", "distribution_release"): - ctx.ui.error(_("The repository couldn't be added because of distribution release mismatch")) - raise DistributionMismatchException - # First check if Architecture tag exists in index.xml; if not, directly skip it ;) - if doc.getTag("Distribution").getTagData("Architecture"): - if doc.getTag("Distribution").getTagData("Architecture") != ctx.config.values.get("general", "architecture"): - ctx.ui.error(_("The repository couldn't be added because of distribution architecture mismatch")) - raise ArchitectureMismatchException - def index(self, repo_uri, skip_sources=False): self.repo_dir = repo_uri