From bb686e8deb56ab17ea94f1ddbc4a07f4c8b89db5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?El=C5=91d=20Ill=C3=A9s?= Date: Thu, 22 Aug 2024 11:14:56 +0200 Subject: [PATCH] [release-tool] Workaround for getting dist_name 'python3 setup.py --name' with the recent pbr started to print '[pbr] Generating ChangeLog [..]' to stdout, which causes to gather wrong 'dist_name'. The workaround is to add 'tail -1'. This should be removed when there is a better way to get dist_name. Change-Id: Ia519eb8aec4292ab79f285f4cb828b6fbb4421d5 --- .../files/release-tools/update_constraints.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/roles/copy-release-tools-scripts/files/release-tools/update_constraints.sh b/roles/copy-release-tools-scripts/files/release-tools/update_constraints.sh index 1c98d96a42..cb714bc504 100755 --- a/roles/copy-release-tools-scripts/files/release-tools/update_constraints.sh +++ b/roles/copy-release-tools-scripts/files/release-tools/update_constraints.sh @@ -96,8 +96,13 @@ function pep503 { # we first ask for the name without saving the output and then we # ask for it again and save the output to get a clean # version. This is why we can't have nice things. +# NOTE(elod.illes): 'python3 setup.py --name' with the recent pbr started +# to print '[pbr] Generating ChangeLog [..]' to stdout, which causes in +# the below lines to gather wrong 'dist_name'. The workaround is to add +# 'tail -1'. This should be removed when there is a better way to get +# dist_name. python3 setup.py --name -dist_name=$(python3 setup.py --name) +dist_name=$(python3 setup.py --name| tail -1) canonical_name=$(pep503 $dist_name) if [[ -z "$dist_name" ]]; then echo "Could not determine the name of the constraint to update"