# let's take it from target repo, only one package repo is enough
# Add image configuration to prerelease repo
- for rpm in find_files(os.path.join(snapshot.path, 'repos', repo['Name']),
+ img_conf = find_files(os.path.join(snapshot.path, 'repos', repo['Name']),
prefix="image-configurations-",
- suffix='noarch.rpm'):
+ suffix='noarch.rpm')
+ img_conf_list = list(img_conf)
+ # whether exist package of image-configuration
+ if not img_conf_list:
+ raise LocalError("Image configuration not found in %s" %
+ snapshot.path)
+ for rpm in img_conf_list:
repomaker.load_imagedata(repo['Name'], rpm)
+ # whether exist ks poin to the repo
if not repomaker.has_images():
- raise LocalError("Image configuration not found in %s" % snapshot.path)
+ continue
# Update ks files
images_ks = update_ks(repomaker.imagedata, snapshot.build_id,