~xubuntu-dev/ubuntu-cdimage/xubuntu-base

« back to all changes in this revision

Viewing changes to lib/cdimage/checksums.py

  • Committer: Colin Watson
  • Date: 2015-09-14 07:42:14 UTC
  • Revision ID: cjwatson@canonical.com-20150914074214-6utmkgmobnz5cjvh
Silence some noise from checksum tests.

Show diffs side-by-side

added added

removed removed

Lines of Context:
268
268
        return image.endswith(".metalink")
269
269
 
270
270
 
271
 
def checksum_directory(config, directory, old_directories=None, map_expr=None):
 
271
def checksum_directory(config, directory, old_directories=None, sign=True,
 
272
                       map_expr=None):
272
273
    if old_directories is None:
273
274
        old_directories = [directory]
274
275
 
275
276
    # We don't want to read the existing checksum files directly, as they
276
277
    # may contain stale checksums; so we don't use the context manager form
277
278
    # here.
278
 
    checksum_files = ChecksumFileSet(config, directory)
 
279
    checksum_files = ChecksumFileSet(config, directory, sign=sign)
279
280
    checksum_files.merge_all(old_directories, map_expr=map_expr)
280
281
    checksum_files.write()
281
282
 
282
283
 
283
 
def metalink_checksum_directory(config, directory, old_directories=None):
 
284
def metalink_checksum_directory(config, directory, old_directories=None,
 
285
                                sign=True):
284
286
    if old_directories is None:
285
287
        old_directories = [directory]
286
288
 
287
289
    # We don't want to read the existing checksum files directly, as they
288
290
    # may contain stale checksums; so we don't use the context manager form
289
291
    # here.
290
 
    checksum_files = MetalinkChecksumFileSet(config, directory)
 
292
    checksum_files = MetalinkChecksumFileSet(config, directory, sign=sign)
291
293
    checksum_files.merge_all(old_directories)
292
294
    checksum_files.write()