From 4d44d417fe5b7363caabe2a98553b20ffc23dc70 Mon Sep 17 00:00:00 2001 From: Russ Webber Date: Wed, 11 Dec 2024 11:26:16 +1100 Subject: [PATCH 1/3] fix: attempt to fix stdout disappearing while building --- platform_cli/groups/release.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/platform_cli/groups/release.py b/platform_cli/groups/release.py index 71587b1..50e1994 100644 --- a/platform_cli/groups/release.py +++ b/platform_cli/groups/release.py @@ -357,8 +357,9 @@ def _build_deb_in_docker( docker_image_name_with_digest, [ "/bin/bash", + "-l", "-c", - f"source /home/ros/.profile && platform pkg build --version {version} --output {DEBS_DIRECTORY} && platform pkg clean", + f"platform pkg build --version {version} --output {DEBS_DIRECTORY} && platform pkg clean", ], interactive=True, workdir=docker_working_dir, @@ -367,6 +368,7 @@ def _build_deb_in_docker( (host_debs_path, docker_debs_path) ], platform=docker_plaform, + tty=True, ) def create(self, cli: click.Group): From f018556b08e5400f8e780cb16e3dd2f44a651d81 Mon Sep 17 00:00:00 2001 From: Russ Webber Date: Wed, 11 Dec 2024 12:14:50 +1100 Subject: [PATCH 2/3] fix: maybe this is it --- platform_cli/groups/release.py | 1 - 1 file changed, 1 deletion(-) diff --git a/platform_cli/groups/release.py b/platform_cli/groups/release.py index 50e1994..9b4782f 100644 --- a/platform_cli/groups/release.py +++ b/platform_cli/groups/release.py @@ -361,7 +361,6 @@ def _build_deb_in_docker( "-c", f"platform pkg build --version {version} --output {DEBS_DIRECTORY} && platform pkg clean", ], - interactive=True, workdir=docker_working_dir, volumes=[ # We only mount the /debs directory for each package From 3f201d1cd59775f0df1299b6451c61a42b274117 Mon Sep 17 00:00:00 2001 From: Russ Webber Date: Wed, 11 Dec 2024 12:30:35 +1100 Subject: [PATCH 3/3] fix: correct way to specify cores --- platform_cli/groups/packaging.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/platform_cli/groups/packaging.py b/platform_cli/groups/packaging.py index 579d7cb..3db9f99 100644 --- a/platform_cli/groups/packaging.py +++ b/platform_cli/groups/packaging.py @@ -251,9 +251,8 @@ def build(version: str, output: str, no_tests: bool): # type: ignore reportUnus bloom_args += " --ignore-shlibs-missing-info" call(f"bloom-generate {pkg_type} --ros-distro {get_ros_distro()} {bloom_args}") - - cpus = cpu_count() if cpu_count() else 1 - call(f"fakeroot debian/rules binary -j{cpus}") + cores = cpu_count() if cpu_count() else 1 + call(f"DEB_BUILD_OPTIONS=parallel={cores} fakeroot debian/rules binary") # the .deb and .ddeb files are in the parent directory # move .deb/.ddeb files into the output folder