Page MenuHomeFreeBSD

pkgbase: pass --recurse-submodules to `git ls-files`
ClosedPublic

Authored by emaste on Dec 9 2023, 3:21 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Nov 4, 9:25 AM
Unknown Object (File)
Mon, Nov 4, 9:25 AM
Unknown Object (File)
Mon, Nov 4, 9:25 AM
Unknown Object (File)
Mon, Nov 4, 9:09 AM
Unknown Object (File)
Wed, Oct 16, 1:03 AM
Unknown Object (File)
Wed, Oct 16, 1:02 AM
Unknown Object (File)
Mon, Oct 14, 7:59 PM
Unknown Object (File)
Mon, Oct 14, 10:44 AM
Subscribers

Details

Summary
When generating source packages.  Although submodules are not used by
FreeBSD itself they may be used by downstream projects.  By default
`git ls-files` just emits the directory name, which resulted in:

    pkg: pkg_checksum_hash_sha256_file(read failed): Is a directory

Passing --recurse-submodules lists all of the files in each submodule,
and has no effect when submodules are not in use.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

emaste requested review of this revision.Dec 9 2023, 3:21 AM
emaste created this revision.
This revision is now accepted and ready to land.Dec 9 2023, 3:53 AM

Although this change is fine, the 'harmless' bit needs a small caveat.

There's a few projects I use (MAME, QEMU and EDK2) that have submodules, but don't need the full recursive submodules to build. And you can get in trouble if you do all your submodule commands recursively, especially when updating them recursively and/or bisecting problems in the parent repo. It's likely fine for ls-files, but other operations (like cloning or fetching) should be approached with some caution.