Fix linters gate

It seems the sed wasn't reliable. renderspec has an option to disable
the double expand, let's make use of it rather than hackling around
afterwards.

Change-Id: I2f877657ad39f02396e9f70fb500a3a5dd376679
This commit is contained in:
Dirk Mueller 2017-10-11 23:03:02 +02:00
parent 538de14a25
commit 1c3582f898
2 changed files with 4 additions and 5 deletions

View File

@ -18,11 +18,13 @@ done
count=0
echo "run renderspec over specfiles from ${specdir}"
for spec in ${specdir}/**/*.spec.j2; do
for specstyle in $specstyles; do
for specstyle in $specstyles; do
for spec in ${specdir}/**/*.spec.j2; do
echo "run ${spec} for ${specstyle}"
pkg_name=$(pymod2pkg --dist $specstyle $(basename $spec .spec.j2))
renderspec --spec-style ${specstyle} ${spec} \
--requirements $basedir/global-requirements.txt \
--skip-pyversion py3 \
-o $WORKSPACE/logs/${specstyle}/$pkg_name.spec &
let count+=1
[[ count -eq $MAXPROC ]] && wait && count=0

View File

@ -20,9 +20,6 @@ for spec in $WORKSPACE/logs/suse/*.spec ; do
# NOTE(jpena): spec-cleaner wants python2 instead of %{__python2}
# https://github.com/openSUSE/spec-cleaner/issues/173
sed -i 's/%{__python2}/python2/g' $spec
# NOTE(toabctl): Remove the second BuildRequire that start with python3-.
# spec-cleaner expects it in an extra line
sed -i 's/\(^BuildRequires:\s*python2*-.*\)\s*python3-.*$/\1/' $spec
spec-cleaner -m -d --no-copyright --diff-prog "diff -uw" \
$spec > $tmpdir/`basename ${spec}`.cleaner.diff &
let count+=1