From 7f15d4920eac656b0c0e22656cf0dab605d52996 Mon Sep 17 00:00:00 2001
From: Ivan Razumov <ivan.razumov@cern.ch>
Date: Mon, 21 Sep 2015 14:33:00 +0200
Subject: [PATCH] Change the way script decides which rpm to copy (in
 'reinstall' mode)

---
 cdash/copyRPMS.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cdash/copyRPMS.py b/cdash/copyRPMS.py
index 41eed33413..4ea1a61f66 100755
--- a/cdash/copyRPMS.py
+++ b/cdash/copyRPMS.py
@@ -33,7 +33,7 @@ def copyRPMS(localarea, remotearea, target="all", policy="Release"):
     elif policy == "Rebuild":
       # force overwriting a single package
       targetname = target.split("-")[0].lower() # remove version from <package>-<version> cases like rivet-2.3.0
-      rpms_to_copy = [f for f in newrpms if (targetname in f.lower().split("-")[0] ) ]
+      rpms_to_copy = [f for f in newrpms if ( f.lower().startswith(targetname) ) ]
       if len(rpms_to_copy) < 1:
         print "ERROR: no RPM for package %s found" %target
         sys.exit(errno.EINVAL)
-- 
GitLab