Add workaround for announce mail script

Somewhere between today and March 23rd, 2023, pbr started to print a
log.info line when we try to fetch a package's name from setup.py, e.g:

$ python3 setup.py --name 2>/dev/null
[pbr] Generating ChangeLog
openstack_releases

A workaround is now added to our announce script to avoid garbled
announce mails [1].

[1] https://lists.openstack.org/pipermail/release-announce/2023-March/014246.html

Change-Id: I6233bb8d12a12efd3cb02abd29d8d43d7fd91da2
This commit is contained in:
Előd Illés 2023-03-30 19:21:51 +02:00
parent 8601423fc5
commit 00b2b84c48
1 changed files with 5 additions and 2 deletions

View File

@ -175,8 +175,11 @@ if [ -e setup.py ] ; then
# be sending.
echo "Priming setup_requires packages"
python setup.py --name
project_name=$(python setup.py --name)
description="$(python setup.py --description)"
# NOTE(elod.illes): pbr startid to print '[pbr] Generating ChangeLog'
# this is related to some recent release (setuptools? virtualenv?)
# the 'tail' command needs to be removed as soon as that bug is fixed
project_name=$(python setup.py --name | tail -1)
description="$(python setup.py --description| tail -1)"
else
# As a last resort, guess that the project name may be the same as that
# of the local working directory at the point this script is invoked.