* don't do dummy catches for distro and component
This commit is contained in:
+1
-1
@@ -34,7 +34,7 @@ class Distribution(xmlfile.XmlFile):
|
|||||||
|
|
||||||
t_SourceName = [autoxml.Text, autoxml.mandatory] # name of distribution (source)
|
t_SourceName = [autoxml.Text, autoxml.mandatory] # name of distribution (source)
|
||||||
t_Description = [autoxml.LocalText, autoxml.mandatory]
|
t_Description = [autoxml.LocalText, autoxml.mandatory]
|
||||||
t_Version = [autoxml.Text, autoxml.mandatory]
|
t_Version = [autoxml.Text, autoxml.optional]
|
||||||
t_Type = [autoxml.Text, autoxml.mandatory]
|
t_Type = [autoxml.Text, autoxml.mandatory]
|
||||||
t_Dependencies = [ [autoxml.Text], autoxml.optional, "Dependencies/Distribution"]
|
t_Dependencies = [ [autoxml.Text], autoxml.optional, "Dependencies/Distribution"]
|
||||||
|
|
||||||
|
|||||||
+12
-13
@@ -68,7 +68,6 @@ class Index(XmlFile):
|
|||||||
compress=File.xmill, sign=File.detached)
|
compress=File.xmill, sign=File.detached)
|
||||||
if not repo:
|
if not repo:
|
||||||
repo = self.distribution.name()
|
repo = self.distribution.name()
|
||||||
|
|
||||||
|
|
||||||
def check_signature(self, filename, repo):
|
def check_signature(self, filename, repo):
|
||||||
tmpdir = os.path.join(ctx.config.index_dir(), repo)
|
tmpdir = os.path.join(ctx.config.index_dir(), repo)
|
||||||
@@ -118,27 +117,27 @@ class Index(XmlFile):
|
|||||||
# check package semantics
|
# check package semantics
|
||||||
errs = md.errors()
|
errs = md.errors()
|
||||||
if md.errors():
|
if md.errors():
|
||||||
ctx.ui.error(_('Package %s: metadata corrupt') % md.package.name)
|
ctx.ui.error(_('Package %s: metadata corrupt, skipping...') % md.package.name)
|
||||||
ctx.ui.error(unicode(Error(*errs)))
|
ctx.ui.error(unicode(Error(*errs)))
|
||||||
else:
|
else:
|
||||||
self.packages.append(md.package)
|
self.packages.append(md.package)
|
||||||
|
|
||||||
def add_component(self, path):
|
def add_component(self, path):
|
||||||
comp = component.Component()
|
comp = component.Component()
|
||||||
try:
|
#try:
|
||||||
comp.read(path)
|
comp.read(path)
|
||||||
self.components.append(comp)
|
self.components.append(comp)
|
||||||
except:
|
#except:
|
||||||
ctx.ui.error(_('Component in %s is corrupt') % path)
|
# raise Error(_('Component in %s is corrupt') % path)
|
||||||
#ctx.ui.error(str(Error(*errs)))
|
#ctx.ui.error(str(Error(*errs)))
|
||||||
|
|
||||||
def add_distro(self, path):
|
def add_distro(self, path):
|
||||||
distro = component.Distribution()
|
distro = component.Distribution()
|
||||||
try:
|
#try:
|
||||||
distro.read(path)
|
distro.read(path)
|
||||||
self.distribution = distro
|
self.distribution = distro
|
||||||
except:
|
#except:
|
||||||
ctx.ui.error(_('Distribution in %s is corrupt') % path)
|
# raise Error(_('Distribution in %s is corrupt') % path)
|
||||||
#ctx.ui.error(str(Error(*errs)))
|
#ctx.ui.error(str(Error(*errs)))
|
||||||
|
|
||||||
def add_spec(self, path, repo_uri):
|
def add_spec(self, path, repo_uri):
|
||||||
@@ -147,7 +146,7 @@ class Index(XmlFile):
|
|||||||
sf.read(path)
|
sf.read(path)
|
||||||
errs = sf.errors()
|
errs = sf.errors()
|
||||||
if sf.errors():
|
if sf.errors():
|
||||||
ctx.ui.error(_('SpecFile in %s is corrupt') % path)
|
ctx.ui.error(_('SpecFile in %s is corrupt, skipping...') % path)
|
||||||
ctx.ui.error(str(Error(*errs)))
|
ctx.ui.error(str(Error(*errs)))
|
||||||
else:
|
else:
|
||||||
if ctx.config.options and ctx.config.options.absolute_uris:
|
if ctx.config.options and ctx.config.options.absolute_uris:
|
||||||
|
|||||||
Reference in New Issue
Block a user