sha1sum = apt_pkg.sha1sum(f)
if sha1sum != db_sha1sum:
utils.warn("**WARNING** sha1sum mismatch for '%s' ('%s' [current] vs. '%s' [db])." % (filename, sha1sum, db_sha1sum))
if db_sha256sum is not None and db_sha256sum != '':
sha1sum = apt_pkg.sha1sum(f)
if sha1sum != db_sha1sum:
utils.warn("**WARNING** sha1sum mismatch for '%s' ('%s' [current] vs. '%s' [db])." % (filename, sha1sum, db_sha1sum))
if db_sha256sum is not None and db_sha256sum != '':