Re: [PATCH v2] fetch2/local: verify checksums for file:// urls
Jhonata Poma-Hansen <[email protected]>
| Newsgroups | org.openembedded.lists.bitbake-devel |
|---|---|
| Message-ID | <[email protected]> |
Apologies, the "Changes in v2:" section in v2 ships with two literal b4 placeholder lines starting with "EDITME: ..." that I forgot to fill in before sending. Please disregard those two lines. The actual changes from v1, addressing Paul Barker's review (lore.kernel.org/r/[email protected]): - Commit body trimmed; UNINATIVE_URL trigger now leads paragraph 1 (Paul flagged this was missing from v1). - Dropped the long historical commit references (b8b14d975a25, 6424f4b7e9c1, 4b8de2e7d126) from the commit body. - rename_bad_checksum moved from a module-level helper in bb/fetch2/__init__.py onto the FetchMethod class; Local overrides it as a no-op so a ChecksumError surfaces without renaming files under the user's source tree. Four callsites updated to ud.method.rename_bad_checksum(...). No "ud.type == 'file'" special case in __init__.py. - Inline comment in local.py trimmed from ~10 lines to 3. - Tests reduced to two keepers in FetcherLocalTest: - test_local_checksum_match: simpler comment; same assertion. - test_local_checksum_mismatch: dropped the os.listdir loop, replaced with a direct assertFalse on the specific bad-checksum sibling path. Dropped: test_local_no_checksum_no_donestamp, test_local_checksum_mismatch_md5, test_local_checksum_named, test_local_checksum_directory_ignored (the directory-with-bad- checksum case Paul noted should raise; left out of this patch rather than widening scope). Thanks, Jhonata