mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-03-12 23:51:08 +00:00
pull-debian-source: --no-verify-signature option
Using pull-debian-source fails on some very old packages such as on texinfo 4.8.dfsg.1-4. I have hand-verified that the signature is good (though with no trust path), so presumably this is because the signature has rotated out of debian-keyring. Add a --no-verify-signature option so that developers can still make use of the find-and-download functionality of this tool, albeit without signture verification.
This commit is contained in:
parent
15841a3df6
commit
4c66fba4d9
@ -89,6 +89,10 @@ def main():
|
||||
parser.add_option('--no-conf',
|
||||
dest='no_conf', default=False, action='store_true',
|
||||
help="Don't read config files or environment variables")
|
||||
parser.add_option('--no-verify-signature',
|
||||
dest='verify_signature', default=True,
|
||||
action='store_false',
|
||||
help="Allow signature verification failure")
|
||||
(options, args) = parser.parse_args()
|
||||
if not args:
|
||||
parser.error('Must specify package name')
|
||||
|
@ -303,10 +303,10 @@ class SourcePackage(object):
|
||||
else:
|
||||
Logger.info(message)
|
||||
|
||||
def _write_dsc(self):
|
||||
def _write_dsc(self, verify_signature=True):
|
||||
"Write dsc file to workdir"
|
||||
if self._dsc is None:
|
||||
self.pull_dsc()
|
||||
self.pull_dsc(verify_signature=verify_signature)
|
||||
with open(self.dsc_pathname, 'wb') as f:
|
||||
f.write(self.dsc.raw_text)
|
||||
|
||||
@ -359,9 +359,9 @@ class SourcePackage(object):
|
||||
return False
|
||||
return True
|
||||
|
||||
def pull(self):
|
||||
def pull(self, verify_signature=True):
|
||||
"Pull into workdir"
|
||||
self._write_dsc()
|
||||
self._write_dsc(verify_signature=verify_signature)
|
||||
for entry in self.dsc['Files']:
|
||||
name = entry['name']
|
||||
for url in self._source_urls(name):
|
||||
@ -471,7 +471,7 @@ class DebianSourcePackage(SourcePackage):
|
||||
if self.snapshot_list:
|
||||
yield self._snapshot_url(name)
|
||||
|
||||
def pull_dsc(self):
|
||||
def pull_dsc(self, verify_signature=True):
|
||||
"Retrieve dscfile and parse"
|
||||
try:
|
||||
super(DebianSourcePackage, self).pull_dsc()
|
||||
@ -489,7 +489,7 @@ class DebianSourcePackage(SourcePackage):
|
||||
break
|
||||
else:
|
||||
raise DownloadError('dsc could not be found anywhere')
|
||||
self._check_dsc(verify_signature=True)
|
||||
self._check_dsc(verify_signature=verify_signature)
|
||||
|
||||
# Local methods:
|
||||
@property
|
||||
|
Loading…
x
Reference in New Issue
Block a user