
Assuming the reason run_renderspec skipped py3 was to avoid speccleaner complaining about single line py2 and py3 BuildRequires, this patch changes the way to achieve that while supporting other different ways to write py3 specs that would otherwise would not be recognized as py3 only and end up with blank BuildRequires and the like, specifically: * singlespecs with py3 flavor only (new networking-l2gw spec) * py3 specs for which the package name is rendered instead of forced (networking-generic-switch) Change-Id: I62fad6d140338ee9af7eca144edb4ae6e96f6007
33 lines
852 B
Bash
Executable File
33 lines
852 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -eux
|
|
|
|
# 1st positional arg is the working dir
|
|
basedir=${1:-$PWD}
|
|
# 2nd positional arg is the find -name parameter
|
|
FIND_STR=${2:-*}
|
|
|
|
specdir=${basedir}/openstack/
|
|
|
|
WORKSPACE=${WORKSPACE:-$basedir}
|
|
OUTPUTDIR=$WORKSPACE/logs/
|
|
specstyles="suse fedora"
|
|
MAXPROC=4
|
|
|
|
# clean up output dir
|
|
for specstyle in $specstyles; do
|
|
mkdir -p $OUTPUTDIR/${specstyle}/
|
|
rm -rf $OUTPUTDIR/${specstyle}/*
|
|
done
|
|
|
|
count=0
|
|
echo "run renderspec over specfiles from ${specdir}"
|
|
for specstyle in $specstyles; do
|
|
find ${specdir} -name "${FIND_STR}.spec.j2" -type f -print0 | \
|
|
xargs -n 1 -0 -P 0 -I __SPEC__ bash -c "
|
|
set -e
|
|
pkg_name=\$(pymod2pkg --dist $specstyle \$(basename __SPEC__ .spec.j2))
|
|
renderspec --spec-style $specstyle __SPEC__ \
|
|
-o $WORKSPACE/logs/$specstyle/\$pkg_name.spec"
|
|
done
|