[releng] [smoketesting] Make regexp to check for tarballs stricter
- From: Vincent Untz <vuntz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [releng] [smoketesting] Make regexp to check for tarballs stricter
- Date: Wed, 31 Mar 2010 01:38:59 +0000 (UTC)
commit c13a12d0addcc69d824f5226f56c1722dc99372a
Author: Vincent Untz <vuntz gnome org>
Date: Wed Mar 31 03:37:36 2010 +0200
[smoketesting] Make regexp to check for tarballs stricter
We were accepting Gnome2-VFS-.* when looking for Gnome2 tarballs, which
is wrong. So now we make sure we have the right module name, and not
just that it's included in the tarball name.
tools/smoketesting/convert-to-tarballs.py | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/tools/smoketesting/convert-to-tarballs.py b/tools/smoketesting/convert-to-tarballs.py
index 91e8bd9..9229cb1 100755
--- a/tools/smoketesting/convert-to-tarballs.py
+++ b/tools/smoketesting/convert-to-tarballs.py
@@ -633,9 +633,11 @@ class TarballLocator:
# Only include tarballs for the given module
tarballs = [tarball for tarball in tarballs if modulename in tarball]
- re_tarball = r'^.*[_-](([0-9]+[\.\-])*[0-9]+)(\.orig)?\.tar.*$'
+ re_tarball = r'^'+re.escape(modulename)+'[_-](([0-9]+[\.\-])*[0-9]+)(\.orig)?\.tar.*$'
## Don't include -beta -installer -stub-installer and all kinds of
- ## other stupid inane tarballs
+ ## other stupid inane tarballs, and also filter tarballs that have a
+ ## name that includes the module name but is different (eg, Gnome2-VFS
+ ## instead of Gnome2)
tarballs = filter(lambda t: re.search(re_tarball, t), tarballs)
versions = map(lambda t: re.sub(re_tarball, r'\1', t), tarballs)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]