Remove the check for repository architecture
The current infrastructure doesn't allow a unified repository for multiple architectures.
This commit is contained in:
@@ -1,3 +1,9 @@
|
|||||||
|
2010-02-22 Fatih Aşıcı <fatih@pardus.org.tr>
|
||||||
|
* pisi/cli/addrepo.py, pisi/db/repodb.py: Remove the check
|
||||||
|
for repository architecture as the current infrastructure
|
||||||
|
doesn't allow a unified repository for multiple
|
||||||
|
architectures.
|
||||||
|
|
||||||
2010-02-12 Serdar Dalgıç <serdar@pardus.org.tr>
|
2010-02-12 Serdar Dalgıç <serdar@pardus.org.tr>
|
||||||
* pisi/operations/build.py: Use glob.glob0 and lstrip instead of
|
* pisi/operations/build.py: Use glob.glob0 and lstrip instead of
|
||||||
glob.glob. Typos in filePaths in pspec.xml were sometimes ignored and
|
glob.glob. Typos in filePaths in pspec.xml were sometimes ignored and
|
||||||
@@ -74,7 +80,7 @@
|
|||||||
repository.
|
repository.
|
||||||
|
|
||||||
2009-12-14 Serdar Dalgıç <serdar@pardus.org.tr>
|
2009-12-14 Serdar Dalgıç <serdar@pardus.org.tr>
|
||||||
* Add architecture and distribution release check to pisi add-repo
|
* Add architecture and distribution release check to pisi add-repo
|
||||||
New parameter --ignore-check is added to pisi ar too.
|
New parameter --ignore-check is added to pisi ar too.
|
||||||
|
|
||||||
2009-12-11 Serdar Dalgıç <serdar@pardus.org.tr>
|
2009-12-11 Serdar Dalgıç <serdar@pardus.org.tr>
|
||||||
|
|||||||
+3
-5
@@ -43,8 +43,8 @@ NB: We support only local files (e.g., /a/b/c) and http:// URIs at the moment
|
|||||||
def options(self):
|
def options(self):
|
||||||
|
|
||||||
group = optparse.OptionGroup(self.parser, _("add-repo options"))
|
group = optparse.OptionGroup(self.parser, _("add-repo options"))
|
||||||
group.add_option("--ignore-check", action="store_true", default=False, help=_("Ignore repository distribution and architecture check"))
|
group.add_option("--ignore-check", action="store_true", default=False, help=_("Ignore repository distribution check"))
|
||||||
group.add_option("--no-fetch", action="store_true", default=False, help=_("Does not fetch repository index and does not check distribution and architecture match"))
|
group.add_option("--no-fetch", action="store_true", default=False, help=_("Does not fetch repository index and does not check distribution match"))
|
||||||
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)"))
|
||||||
@@ -55,8 +55,6 @@ NB: We support only local files (e.g., /a/b/c) and http:// URIs at the moment
|
|||||||
pisi.api.remove_repo(repo)
|
pisi.api.remove_repo(repo)
|
||||||
|
|
||||||
def check_arch_and_distro(self, repo):
|
def check_arch_and_distro(self, repo):
|
||||||
if not self.repodb.check_architecture(repo):
|
|
||||||
self.warn_and_remove(_("Repository architecture does not match. Removing %s from system.") % repo)
|
|
||||||
if not self.repodb.check_distribution(repo):
|
if not self.repodb.check_distribution(repo):
|
||||||
self.warn_and_remove(_("Repository distribution does not match. Removing %s from system.") % repo)
|
self.warn_and_remove(_("Repository distribution does not match. Removing %s from system.") % repo)
|
||||||
|
|
||||||
@@ -74,7 +72,7 @@ NB: We support only local files (e.g., /a/b/c) and http:// URIs at the moment
|
|||||||
if ctx.get_option('no_fetch'):
|
if ctx.get_option('no_fetch'):
|
||||||
if not ctx.ui.confirm(_('Add %s repository without updating the database?\nBy confirming '
|
if not ctx.ui.confirm(_('Add %s repository without updating the database?\nBy confirming '
|
||||||
'this you are also adding the repository to your system without '
|
'this you are also adding the repository to your system without '
|
||||||
'checking the distribution and the architecture of the repository.\n'
|
'checking the distribution of the repository.\n'
|
||||||
'Do you want to continue?') % name):
|
'Do you want to continue?') % name):
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|||||||
+1
-10
@@ -1,6 +1,6 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
#
|
#
|
||||||
# Copyright (C) 2005 - 2007, TUBITAK/UEKAE
|
# Copyright (C) 2005 - 2010, TUBITAK/UEKAE
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify it under
|
# This program is free software; you can redistribute it and/or modify it under
|
||||||
# the terms of the GNU General Public License as published by the Free
|
# the terms of the GNU General Public License as published by the Free
|
||||||
@@ -214,10 +214,6 @@ class RepoDB(lazydb.LazyDB):
|
|||||||
def repo_active(self, name):
|
def repo_active(self, name):
|
||||||
return self.repoorder.get_status(name) == "active"
|
return self.repoorder.get_status(name) == "active"
|
||||||
|
|
||||||
def get_architecture(self, name):
|
|
||||||
doc = self.get_repo_doc(name)
|
|
||||||
return doc.getTag("Distribution").getTagData("Architecture")
|
|
||||||
|
|
||||||
def get_distribution(self, name):
|
def get_distribution(self, name):
|
||||||
doc = self.get_repo_doc(name)
|
doc = self.get_repo_doc(name)
|
||||||
return doc.getTag("Distribution").getTagData("SourceName")
|
return doc.getTag("Distribution").getTagData("SourceName")
|
||||||
@@ -226,11 +222,6 @@ class RepoDB(lazydb.LazyDB):
|
|||||||
doc = self.get_repo_doc(name)
|
doc = self.get_repo_doc(name)
|
||||||
return doc.getTag("Distribution").getTagData("Version")
|
return doc.getTag("Distribution").getTagData("Version")
|
||||||
|
|
||||||
def check_architecture(self, name):
|
|
||||||
return self.get_architecture(name) == ctx.config.values.general.architecture
|
|
||||||
|
|
||||||
def check_distribution(self, name):
|
def check_distribution(self, name):
|
||||||
return self.get_distribution(name) == ctx.config.values.general.distribution and \
|
return self.get_distribution(name) == ctx.config.values.general.distribution and \
|
||||||
self.get_distribution_release(name) == ctx.config.values.general.distribution_release
|
self.get_distribution_release(name) == ctx.config.values.general.distribution_release
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user