pungi-koji: add option for not creating latest symbol link
Fixes: #53 Signed-off-by: Qixiang Wan <qwan@redhat.com>
This commit is contained in:
parent
e02ed6c04b
commit
1345eb87a4
@ -119,6 +119,13 @@ def main():
|
||||
"--notification-script",
|
||||
help="script for sending progress notification messages"
|
||||
)
|
||||
parser.add_option(
|
||||
"--no-latest-link",
|
||||
action="store_true",
|
||||
default=False,
|
||||
dest="no_latest_link",
|
||||
help="don't create latest symbol link to this compose"
|
||||
)
|
||||
|
||||
opts, args = parser.parse_args()
|
||||
import pungi.notifier
|
||||
@ -160,6 +167,8 @@ def main():
|
||||
abort("please specify a config")
|
||||
opts.config = os.path.abspath(opts.config)
|
||||
|
||||
create_latest_link = not opts.no_latest_link
|
||||
|
||||
import kobo.conf
|
||||
import kobo.log
|
||||
import productmd.composeinfo
|
||||
@ -210,13 +219,13 @@ def main():
|
||||
notifier.compose = compose
|
||||
COMPOSE = compose
|
||||
try:
|
||||
run_compose(compose)
|
||||
run_compose(compose, create_latest_link)
|
||||
except Exception, ex:
|
||||
compose.log_error("Compose run failed: %s" % ex)
|
||||
raise
|
||||
|
||||
|
||||
def run_compose(compose):
|
||||
def run_compose(compose, create_latest_link=True):
|
||||
import pungi.phases
|
||||
import pungi.metadata
|
||||
|
||||
@ -390,6 +399,7 @@ def run_compose(compose):
|
||||
test_phase.start()
|
||||
test_phase.stop()
|
||||
|
||||
if create_latest_link:
|
||||
# create a latest symlink
|
||||
compose_dir = os.path.basename(compose.topdir)
|
||||
if len(compose.conf["release_version"].split(".")) == 1:
|
||||
|
Loading…
Reference in New Issue
Block a user