← Back to issue list

Local build fails due to missing build-dependency on git

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1663605
Type
issue
State
closed
Author
~cjwatson
Labels
Created
Updated
Closed

Current evaluation

Fixed by adding git as a direct build dependency, resolving local sbuild failures where test execution failed due to missing git binaries.

Suggested action:

No scores available.

Issue body

I tried to build snapcraft master in a local sbuild instance, and it failed as follows: ====================================================================== ERROR: test_git_conflicts (snapcraft.tests.sources.test_git.TestGitConflicts) snapcraft.tests.sources.test_git.TestGitConflicts.test_git_conflicts ---------------------------------------------------------------------- testtools.testresult.real._StringException: Empty attachments: pythonlogging:'' Traceback (most recent call last): File "/<<PKGBUILDDIR>>/snapcraft/tests/sources/test_git.py", line 229, in test_git_conflicts self.call(['git', 'init', '--bare']) File "/<<PKGBUILDDIR>>/snapcraft/tests/sources/test_git.py", line 184, in call cmd, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL) File "/usr/lib/python3.5/subprocess.py", line 576, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python3.5/subprocess.py", line 557, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.5/subprocess.py", line 947, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.5/subprocess.py", line 1551, in _execute_child raise child_exception_type(errno_num, err_msg) FileNotFoundError: [Errno 2] No such file or directory: 'git' ====================================================================== ERROR: test_git_submodules (snapcraft.tests.sources.test_git.TestGitConflicts) snapcraft.tests.sources.test_git.TestGitConflicts.test_git_submodules ---------------------------------------------------------------------- testtools.testresult.real._StringException: Empty attachments: pythonlogging:'' Traceback (most recent call last): File "/<<PKGBUILDDIR>>/snapcraft/tests/sources/test_git.py", line 270, in test_git_submodules self.call(['git', 'init', '--bare']) File "/<<PKGBUILDDIR>>/snapcraft/tests/sources/test_git.py", line 184, in call cmd, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL) File "/usr/lib/python3.5/subprocess.py", line 576, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python3.5/subprocess.py", line 557, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.5/subprocess.py", line 947, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.5/subprocess.py", line 1551, in _execute_child raise child_exception_type(errno_num, err_msg) FileNotFoundError: [Errno 2] No such file or directory: 'git' I don't know why this apparently hasn't caused problems elsewhere - perhaps git is being pulled in indirectly in some cases - but at any rate, since snapcraft is calling git directly in its test suite, it should build-depend directly on git as well.

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b Fixed by adding git as a direct build dependency, resolving local sbuild failures where test execution failed due to missing git binaries.
qwen/qwen3.6-35b-a3b Closed without discussion. The missing git build dependency was likely added to resolve test failures, or the report was abandoned due to inactivity.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#4376 fix(snap): add missing build-packages for git snapcraft closed Closed after the CI dependency discussion moved elsewhere. The change addressed a libgit2 version mismatch causing build failures on s390x.
71%