The hg fetcher generates mirror tarballs as hg.localfile, cf bitbake/lib/bb/fetch2/hg.py:Hg.urldata_init(). But there are severe problems with them: (1) They require SRC_URI[md5sum] or SRC_URI[sha256sum] checksums be supplied in recipes, in bitbake >1.26 and when BB_STRICT_CHECKSUM is set. These ought not to be necessary in the first place, because Mercurial commits are merkle trees; when repos are properly cloned, commit ids provide an equivalent guarantee of integrity. And of course you can't really reproduce these tarballs outside the fetcher itself, so editing SRC_URI becomes an unnecessarily two-step process. (2) AFAIK, they appear to be created but never extracted. They are not connected at all to the BB_GENERATE_MIRROR_TARBALLS facility in fetch2/git. Note that fetch2/git does not suffer from these problems, because (a) Git.supports_checksum() returns False, and (b) Git.unpack() does a clone from the repo at DL_DIR to the work directory, implicitly verifying the integrity of the commit history.
To be honest we don't use the hg fetcher much. Would you be able to send some patches to make it behave more like the git fetcher?
I'll chuck it onto my team's backlog, but we're pretty hammered too and I don't think we'll get to it before end of dev for 2.1.
Richard, Are you able to send a patch to the list for this hopefully with a test.
Currently mercurial is broken in OE. mercurial-native failed to connect to any ssl enabled servers.
I've created simple testcase for hg/premirrors functionality [1] and with small fix in fetcher code [2] is seems working. fetcher is able to fetch repo, create mirror tarball from it and then use the tarball to download() the project with networking disabled. [1] https://lists.openembedded.org/g/bitbake-devel/message/14319 [2] https://lists.openembedded.org/g/bitbake-devel/message/14318
Mercurial mirror tarballs should be working and tested now: https://git.openembedded.org/bitbake/commit/?id=80421abd5bf3f1f751219c050fa93970cf1f2088 https://git.openembedded.org/bitbake/commit/?id=c0e349a5fc92e9c90afc53800c7e83495393ff79