Skip to content

Commit adc4aa3

Browse files
committed
python3Packages.craft-parts: 2.6.1 -> 2.6.2
1 parent 8fef72c commit adc4aa3

File tree

2 files changed

+11
-12
lines changed

2 files changed

+11
-12
lines changed

pkgs/development/python-modules/craft-parts/bash-path.patch

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,13 @@ index f2b4064..cb4e9e8 100644
2929
@override
3030
def get_build_environment(self) -> dict[str, str]:
3131
diff --git a/craft_parts/plugins/validator.py b/craft_parts/plugins/validator.py
32-
index 5b4c735..8ff30c2 100644
32+
index 5b4c735..d7a446e 100644
3333
--- a/craft_parts/plugins/validator.py
3434
+++ b/craft_parts/plugins/validator.py
35-
@@ -141,9 +141,9 @@ class PluginEnvironmentValidator:
36-
print(self._env, file=env_file)
35+
@@ -142,8 +142,9 @@ class PluginEnvironmentValidator:
3736
print(cmd, file=env_file)
3837
env_file.flush()
39-
-
38+
4039
+ import shutil
4140
proc = subprocess.run(
4241
- ["/bin/bash", env_file.name],
@@ -45,7 +44,7 @@ index 5b4c735..8ff30c2 100644
4544
capture_output=True,
4645
text=True,
4746
diff --git a/tests/unit/executor/test_step_handler.py b/tests/unit/executor/test_step_handler.py
48-
index 4e73c2b..b762fb8 100644
47+
index 4e73c2b..a5f9374 100644
4948
--- a/tests/unit/executor/test_step_handler.py
5049
+++ b/tests/unit/executor/test_step_handler.py
5150
@@ -209,9 +209,10 @@ class TestStepHandlerBuiltins:
@@ -56,21 +55,21 @@ index 4e73c2b..b762fb8 100644
5655
assert file.read() == dedent(
5756
f"""\
5857
- #!/bin/bash
59-
+ #!{shutil.which('bash')}
58+
+ #!{shutil.which("bash")}
6059
set -euo pipefail
6160
source {environment_script_path}
6261
set -x
6362
diff --git a/tests/unit/utils/test_process.py b/tests/unit/utils/test_process.py
64-
index 84b29ad..dc2d772 100644
63+
index a025494..a76cfa2 100644
6564
--- a/tests/unit/utils/test_process.py
6665
+++ b/tests/unit/utils/test_process.py
6766
@@ -33,7 +33,8 @@ _RUN_TEST_CASES = [
6867

6968
@pytest.mark.parametrize(("out", "err"), _RUN_TEST_CASES)
7069
def test_run(out, err):
71-
- result = process.run(["/usr/bin/sh", "-c", f"echo {out};sleep 0;echo {err} >&2"])
70+
- result = process.run(["/usr/bin/sh", "-c", f"echo {out};sleep 0.1;echo {err} >&2"])
7271
+ import shutil
73-
+ result = process.run([shutil.which("sh"), "-c", f"echo {out};sleep 0;echo {err} >&2"])
72+
+ result = process.run([shutil.which("sh"), "-c", f"echo {out};sleep 0.1;echo {err} >&2"])
7473
assert result.returncode == 0
7574
assert result.stdout == (out + "\n").encode()
7675
assert result.stderr == (err + "\n").encode()
@@ -95,5 +94,5 @@ index 84b29ad..dc2d772 100644
9594
- "/usr/bin/sh",
9695
+ shutil.which("sh"),
9796
"-c",
98-
f"echo {out};sleep 0;echo {err} >&2; echo -n {out}|socat - UNIX-CONNECT:{new_dir}/test.socket",
97+
f"echo {out};sleep 0.1;echo {err} >&2; echo -n {out}|socat - UNIX-CONNECT:{new_dir}/test.socket",
9998
],

pkgs/development/python-modules/craft-parts/default.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,15 @@
2828

2929
buildPythonPackage rec {
3030
pname = "craft-parts";
31-
version = "2.6.1";
31+
version = "2.6.2";
3232

3333
pyproject = true;
3434

3535
src = fetchFromGitHub {
3636
owner = "canonical";
3737
repo = "craft-parts";
3838
tag = version;
39-
hash = "sha256-KQS4jjA66rROglOrGR7UofJL+oYEEC2X+o6pROrR5r4=";
39+
hash = "sha256-3NFbAxgY183RmZ+ats6M5WM07VO2amj7EdqMCLcKNvI=";
4040
};
4141

4242
patches = [ ./bash-path.patch ];

0 commit comments

Comments
 (0)