From 8cf89fa122f335b9909f3d1a539046f265725ff1 Mon Sep 17 00:00:00 2001 From: Marco Strigl Date: Wed, 8 Feb 2017 13:55:36 +0100 Subject: [PATCH] fixes osc checkout error with checkout_rooted=1 see bsc#1012592 --- osc/core.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/osc/core.py b/osc/core.py index 032b9fac..4c3b476e 100644 --- a/osc/core.py +++ b/osc/core.py @@ -4799,16 +4799,19 @@ def checkout_package(apiurl, project, package, # if project roots were previously inconsistent root_dots = "../../" if is_project_dir(root_dots): + oldproj = store_read_project(root_dots) if conf.config['checkout_no_colon']: - oldproj = store_read_project(root_dots) n = len(oldproj.split(':')) else: n = 1 + if root_dots == '.': + root_dots = '' root_dots = root_dots + "../" * n if root_dots != '.': if conf.config['verbose']: - print("found root of %s at %s" % (oldproj, root_dots)) + print("%s is project dir of %s. Root found at %s" % + (prj_dir, oldproj, os.path.abspath(root_dots))) prj_dir = root_dots + prj_dir if not pathname: