From b18f044dbe2e04c266d8e321892c4b5c3b9958dc Mon Sep 17 00:00:00 2001 From: Thomas Bechtold Date: Mon, 19 Aug 2019 16:50:24 +0200 Subject: [PATCH] Be more relaxed when running lint on a single name When eg. running "tox -elint -- barbican", the rendering works fine but then the spec is not checked because barbican.spec.j2 renders to openstack-barbican.spec . Be more relaxed when trying to find the rendered spec file. Change-Id: I589c3f64bffcbadb9457fd96b29197e684516c86 --- tools/run_specchecks.sh | 2 +- tools/run_speccleaner.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/run_specchecks.sh b/tools/run_specchecks.sh index 7fb8dbd4f..fb1cd962c 100755 --- a/tools/run_specchecks.sh +++ b/tools/run_specchecks.sh @@ -15,7 +15,7 @@ thome=$(mktemp -d) cat openstack/openstack-macros/macros.openstack-singlespec > $thome/.rpmmacros failed=0 -for spec in `find $WORKSPACE/logs/suse/ -name "${FIND_STR}.spec" -type f -print` ; do +for spec in `find $WORKSPACE/logs/suse/ -name "*${FIND_STR}.spec" -type f -print` ; do echo "Checking $spec" egrep -q '^Source:' $spec && { echo "$spec should not have Source: lines. Please use Source0: instead." diff --git a/tools/run_speccleaner.sh b/tools/run_speccleaner.sh index ec4756bf7..b5690b94d 100755 --- a/tools/run_speccleaner.sh +++ b/tools/run_speccleaner.sh @@ -17,7 +17,7 @@ echo "run spec-cleaner over specfiles from $WORKSPACE/logs/" count=0 # TODO(toabctl): also run spec-cleaner with non-SUSE specs # but the current problem is that the license check works for SUSE only -for spec in `find $WORKSPACE/logs/suse/ -name "${FIND_STR}.spec" -type f -print` ; do +for spec in `find $WORKSPACE/logs/suse/ -name "*${FIND_STR}.spec" -type f -print` ; do echo "spec-cleaner checking $spec" # NOTE(toabctl):spec-cleaner can not ignore epochs currently sed -i '/^Epoch:.*/d' $spec