Kaydet (Commit) 9d76eb68 authored tarafından Suleyman Poyraz's avatar Suleyman Poyraz

Added non verified archive fetching support.

üst 541a7476
......@@ -901,7 +901,7 @@ class SourceArchive:
return False
# check hash
if util.check_file_hash(self.archiveFile, self.archive.sha1sum):
if util.check_file_hash(self.archiveFile, self.archive.sha1sum) or ctx.get_option('ignore_verify'):
if interactive:
ctx.ui.info(_('\"{}\" [cached]').format(self.archive.name))
return True
......@@ -912,8 +912,11 @@ class SourceArchive:
# check archive file's integrity
if not util.check_file_hash(self.archiveFile, self.archive.sha1sum):
raise SourceArchiveError(_("unpack: check_file_hash failed."))
ctx.ui.warning(_("* Expected sha1 value: {} \n* Received sha1 value: {} \n".format(self.archive.sha1sum,util.sha1_file(self.archiveFile))))
if not ctx.get_option('ignore_verify'):
raise SourceArchiveError(_("unpack: check_file_hash failed."))
else:
ctx.ui.warning(_("* Archive verification passed. Such problems may occur during the build process."))
try:
archive = Archive(self.archiveFile, self.archive.type)
except UnknownArchiveType:
......
......@@ -65,6 +65,11 @@ class Build(command.Command, metaclass=command.autocommand):
default=None,
help=_("Output directory for produced packages."))
group.add_option("--ignore-verify",
action="store_true",
default=False,
help=_("Bypass sha1sum verify step of source archive."))
group.add_option("--ignore-action-errors",
action="store_true", default=False,
help=_("Bypass errors from ActionsAPI."))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment