Quantcast
Channel: Pacman issues
Viewing all articles
Browse latest Browse all 121

Better git defaults for faster builds and smaller source packages

$
0
0
With the intention to remove GITFLAGS in !182, the checkums feature !9, and the worktree changes in !138 I looked again at how I could improve git packaging in MSYS2. We currently use it sparingly in MSYS2, and prefer source tarballs, because it's slow and the generated source packages can be very large. I mostly care about these things: * Fast package builds, even for git repos with a large history * Source packages should be self-contained, i.e. build without the network * Source packages should only contain what is needed to build, ideally I played around a bit and got something working, but I might be missing something as I never worked with tree-less etc: * We use GITFLAGS=`--mirror --filter=tree:0` by default * We call `git -C "$dir" archive "$ref" -o/dev/null` after the clone, so we fetch all data that would be needed for a checkout * In extract_git() we pass `--no-checkout` to worktree add, to avoid it checking out HEAD (which would hit the network) What this gives us: * Fast package builds for large repos * Source packages that are not much larger compared to when a release tarball would be used * Source packages that can be built without network access (as before) * Source packages that can be used to build other refs if there is network access (as before) Feedback welcome

Viewing all articles
Browse latest Browse all 121

Trending Articles