Remove repo architecture and distribution check for now

This commit is contained in:
Faik Uygur
2010-01-08 07:45:24 +00:00
parent a13e2a7e10
commit 2f2d9bd1e0
2 changed files with 0 additions and 17 deletions
-3
View File
@@ -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):
-14
View File
@@ -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