"""Prerelease path."""
return os.path.join(self.snapshot.base_path, self.dir)
+ @property
+ def snapshot_path(self):
+ """Prerelease snapshot path."""
+ if self.buildid:
+ """Snapshot path."""
+ return os.path.join(self.snapshot.base_path,
+ self.snapshot.repo['SnapshotDir'],
+ self.buildid)
+ else:
+ """Snapshot path."""
+ return os.path.join(self.snapshot.base_path,
+ self.snapshot.repo['SnapshotDir'],
+ self.snapshot.build_id)
+
def pkg_urls(self, repo):
"""List of package(repository) urls for prerelease."""
pkg_urls = {}
# Set obs_target_prj to ref project if it is enabled
if os.getenv("REF_CREATE_PRJ_OBS_ENABLE","0") == "1" and basebuildid:
prerelease = snapshot.get_prerelease(base_url, tstamp, basebuildid)
+ snapshot_path = prerelease.snapshot_path
else:
prerelease = snapshot.get_prerelease(base_url, tstamp)
+ snapshot_path = snapshot.path
except SnapshotError, err:
raise LocalError("Error getting prerelease info: %s" % str(err))
live_repo_path = os.path.join(live_repo_base,
project.replace(':', ':/'))
targets = snapshot.targets
+ print 'snapshot-path : %s ' %(snapshot_path)
# Cleanup repo directory
if os.path.isdir(os.path.join(prerelease.path, prerelease.build_id)):
# let's take it from target repo, only one package repo is enough
# Add image configuration to prerelease repo
- img_conf = find_files(os.path.join(snapshot.path, 'repos',
+ img_conf = find_files(os.path.join(snapshot_path, 'repos',
repo['Name']),
prefix="image-configurations-",
suffix='noarch.rpm')
#raise LocalError("Image configuration not found in %s" %
# snapshot.path)
- print "Image configuration not found in %s, repo:%s" %(snapshot.path, repo['Name'])
+ print "Image configuration not found in %s, repo:%s" %(snapshot_path, repo['Name'])
continue
for rpm in img_conf_list: