Remove repo architecture and distribution check for now
This commit is contained in:
@@ -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",
|
group.add_option("--at", action="store",
|
||||||
type="int", default=None,
|
type="int", default=None,
|
||||||
help=_("Add repository at given position (0 is first)"))
|
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)
|
self.parser.add_option_group(group)
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
|
|||||||
@@ -76,10 +76,6 @@ class Index(xmlfile.XmlFile):
|
|||||||
|
|
||||||
doc = self.read_uri(uri, tmpdir, force)
|
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:
|
if not repo:
|
||||||
repo = self.distribution.name()
|
repo = self.distribution.name()
|
||||||
# and what do we do with it? move it to index dir properly
|
# 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)
|
tmpdir = os.path.join(ctx.config.index_dir(), repo)
|
||||||
pisi.file.File.check_signature(filename, tmpdir)
|
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):
|
def index(self, repo_uri, skip_sources=False):
|
||||||
self.repo_dir = repo_uri
|
self.repo_dir = repo_uri
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user