From 74ec6f0164399a370ecef4c535371e4508807b82 Mon Sep 17 00:00:00 2001 From: Peter Zhu Date: Thu, 2 May 2024 18:47:45 -0400 Subject: [PATCH] Fix the bundle_artifact_path value and remove wrong comments for deb assemble (#4673) Signed-off-by: Peter Zhu --- src/assemble_workflow/bundle_linux_deb.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/assemble_workflow/bundle_linux_deb.py b/src/assemble_workflow/bundle_linux_deb.py index 0dffe91744..1c30bab5cf 100644 --- a/src/assemble_workflow/bundle_linux_deb.py +++ b/src/assemble_workflow/bundle_linux_deb.py @@ -126,6 +126,8 @@ def build(self, name: str, dest: str, archive_path: str, build_cls: BuildManifes subprocess.check_call(bundle_cmd, cwd=ext_dest, shell=True) # Move artifact to repo root before being published to {dest} - # for dirpath, dirnames, filenames in os.walk(os.path.join('/tmp/opensearch*')): + # In debuild, the final package is created in the parent directory of the sources + # https://github.com/opensearch-project/opensearch-build/issues/4532#issuecomment-2091726868 + bundle_artifact_path = f"/tmp/{self.filename}_{deb_version}_{deb_architecture(build_cls.architecture)}.deb" logging.info(f"Found deb file: {bundle_artifact_path}") - shutil.move(f"/tmp/{self.filename}_{deb_version}_{deb_architecture(build_cls.architecture)}.deb", name) + shutil.move(bundle_artifact_path, name)