-
-
Notifications
You must be signed in to change notification settings - Fork 15k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
kas: No such file or directory: 'git' #383907
Labels
0.kind: bug
Something is broken
Comments
UpdateI managed to solve this issue with the following patch: fix-path.patch
diff --git a/kas/context.py b/kas/context.py
index 0b456ff..15399d5 100644
--- a/kas/context.py
+++ b/kas/context.py
@@ -131,7 +131,7 @@ class Context:
for key in ['http_proxy', 'https_proxy', 'ftp_proxy', 'no_proxy',
'SSH_AUTH_SOCK',
- 'BB_NUMBER_THREADS', 'PARALLEL_MAKE']:
+ 'BB_NUMBER_THREADS', 'PARALLEL_MAKE', 'PATH']:
val = os.environ.get(key, None)
if val:
self.environ[key] = val
diff --git a/kas/libkas.py b/kas/libkas.py
index d9db5c6..5bd4046 100644
--- a/kas/libkas.py
+++ b/kas/libkas.py
@@ -282,7 +282,7 @@ def get_build_environ(build_system):
raise InitBuildEnvError('Did not find any init-build-env script')
with tempfile.TemporaryDirectory() as temp_dir:
- script = f"""#!/bin/bash
+ script = f"""#!/usr/bin/env bash
set -e
source {init_script} $1 > /dev/null
env
@@ -293,7 +293,7 @@ def get_build_environ(build_system):
get_bb_env_file.chmod(0o775)
env = {}
- env['PATH'] = '/usr/sbin:/usr/bin:/sbin:/bin'
+ env['PATH'] = os.environ['PATH']
(_, output) = run_cmd([str(get_bb_env_file), get_context().build_dir],
cwd=init_repo.path, env=env)
However, now I have another problem: $ kas build
2025-02-21 14:43:08 - INFO - kas 4.7 started
2025-02-21 14:43:08 - WARNING - kas: No supported distros found in ['nixos']. No default locales set.
2025-02-21 14:43:08 - INFO - Cloning repository poky
2025-02-21 14:43:39 - INFO - Repository poky already contains fb91a49387cfb0c8d48303bb3354325ba2a05587 as commit
2025-02-21 14:43:40 - INFO - Repository poky checked out to fb91a49387cfb0c8d48303bb3354325ba2a05587
2025-02-21 14:43:40 - INFO - /home/cezdro/dev/kas-test/build$ /home/cezdro/dev/kas-test/poky/bitbake/bin/bitbake -c build zlib-native
Please make sure locale 'en_US.UTF-8' is available on your system
2025-02-21 14:43:40 - ERROR - Command "/home/cezdro/dev/kas-test/poky/bitbake/bin/bitbake -c build zlib-native" failed with error 1 Of course, I know that this is for another ticket, but I'm leaving it here to let know, that even with this patch, kas still isn't fully working. |
@cezdro I have only used this in conjunction with https://github.com/nix-community/nix-environments/tree/master/envs/yocto. What environment are you running kas in? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Nixpkgs version
Describe the bug
Even if git is in
$PATH
, kas doesn't detect it. I tried usingoverridePythonAttrs
to add git todependencies
, but even this did not help. What's makes it even stranger is that kas wrapper adds path to git at the very beginning:Steps to reproduce
nix shell nixpkgs#kas
.config.yaml
:kas build
Expected behaviour
Kas builds the project
Screenshots
No response
Relevant log output
Additional context
No response
System metadata
"x86_64-linux"
Linux 6.12.10, NixOS, 25.05 (Warbler), 25.05.20250121.9e4d519
yes
yes
nix-env (Nix) 2.25.4
/nix/store/irknf7niks2djxz4csh7sr44wwrs082y-source
Notify maintainers
@bachp
Note for maintainers: Please tag this issue in your pull request description. (i.e.
Resolves #ISSUE
.)I assert that this issue is relevant for Nixpkgs
Is this issue important to you?
Add a 👍 reaction to issues you find important.
The text was updated successfully, but these errors were encountered: