Commit 7f15d492 authored by Ivan Razumov's avatar Ivan Razumov
Browse files

Change the way script decides which rpm to copy (in 'reinstall' mode)

parent 90caf860
......@@ -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)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment