195 |
|
|
196 |
def compare_hash(cls, repo_iter): |
def compare_hash(cls, repo_iter): |
197 |
"""Like above, but also compare sha1 sums of any regular files""" |
"""Like above, but also compare sha1 sums of any regular files""" |
198 |
def hashs_changed(src_rp, mir_rorp): |
def hashes_changed(src_rp, mir_rorp): |
199 |
"""Return 0 if their data hashes same, 1 otherwise""" |
"""Return 0 if their data hashes same, 1 otherwise""" |
200 |
if not mir_rorp.has_sha1(): |
if not mir_rorp.has_sha1(): |
201 |
log.Log("Warning: Metadata file has no digest for %s, " |
log.Log("Warning: Metadata file has no digest for %s, " |
208 |
|
|
209 |
src_iter = cls.get_source_select() |
src_iter = cls.get_source_select() |
210 |
for src_rp, mir_rorp in rorpiter.Collate2Iters(src_iter, repo_iter): |
for src_rp, mir_rorp in rorpiter.Collate2Iters(src_iter, repo_iter): |
211 |
report = get_basic_report(src_rp, mir_rorp, hashs_changed) |
report = get_basic_report(src_rp, mir_rorp, hashes_changed) |
212 |
if report: yield report |
if report: yield report |
213 |
else: log_success(src_rp, mir_rorp) |
else: log_success(src_rp, mir_rorp) |
214 |
|
|