getRelease(package, version) returns None if spec file not present
for requested package and version. For example if it was used by
pkg_build_options.override_toolchain.
Set release to "*" in that case and let `find` utility to find any
available release for that version.
The potential problem here will be once we put several releases of
same package-version in published RPMS folder.
Change-Id: Icbb472f3df45bb1ab2f453fdf3999084857f6012
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/6184
Reviewed-by: Sharath George
Tested-by: Sharath George
... | ... |
@@ -319,6 +319,9 @@ class PackageUtils(object): |
319 | 319 |
if version == "*": |
320 | 320 |
version = SPECS.getData().getVersion(package,index) |
321 | 321 |
release = SPECS.getData().getRelease(package,version) |
322 |
+ # pkg_build_options does not specify the release and there is no spec for that |
|
323 |
+ if not release: |
|
324 |
+ release = "*" |
|
322 | 325 |
listFoundRPMFiles = sum([cmdUtils.findFile(package+"-"+version+"-"+release+"."+platform.machine()+".rpm",constants.rpmPath), |
323 | 326 |
cmdUtils.findFile(package+"-"+version+"-"+release+".noarch.rpm",constants.rpmPath)], []) |
324 | 327 |
if constants.inputRPMSPath is not None: |