Skip to content

meson: libfetchers needs libgit2 1.9+#13522

Merged
xokdvium merged 1 commit intoNixOS:masterfrom
juhp:patch-1
Jul 22, 2025
Merged

meson: libfetchers needs libgit2 1.9+#13522
xokdvium merged 1 commit intoNixOS:masterfrom
juhp:patch-1

Conversation

@juhp
Copy link
Copy Markdown
Contributor

@juhp juhp commented Jul 22, 2025

libfetchers uses git_mempack_write_thin_pack which was introduced in libgit2-1.9.0

This avoids a compilation error like:

../src/libfetchers/git-utils.cc: In member function ‘virtual void nix::GitRepoImpl::flush()’: ../src/libfetchers/git-utils.cc:270:13: error: ‘git_mempack_write_thin_pack’ was not declared in this scope
  270 |             git_mempack_write_thin_pack(mempack_backend, packBuilder.get())
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~

on older libgit2 (like 1.7.2 in Centos Stream 10)

Motivation

libfetchers fails to compile with older libgit2.


Add 👍 to pull requests you find important.

The Nix maintainer team uses a GitHub project board to schedule and track reviews.

libfetchers uses `git_mempack_write_thin_pack` which was introduced in libgit2-1.9.0

This avoids error like:

../src/libfetchers/git-utils.cc: In member function ‘virtual void nix::GitRepoImpl::flush()’:
../src/libfetchers/git-utils.cc:270:13: error: ‘git_mempack_write_thin_pack’ was not declared in this scope
  270 |             git_mempack_write_thin_pack(mempack_backend, packBuilder.get())
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~

on older libgit2 (like 1.7.2 in Centos Stream 10)
@juhp juhp requested a review from edolstra as a code owner July 22, 2025 15:01
@github-actions github-actions bot added the fetching Networking with the outside (non-Nix) world, input locking label Jul 22, 2025
@xokdvium xokdvium merged commit 9671275 into NixOS:master Jul 22, 2025
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fetching Networking with the outside (non-Nix) world, input locking

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants