diff --git a/pym/update/variables/update.py b/pym/update/variables/update.py index 67f006e..550e423 100644 --- a/pym/update/variables/update.py +++ b/pym/update/variables/update.py @@ -647,6 +647,7 @@ class VariableClUpdateProfileRep(Variable): check_after = ["cl_update_profile_branch"] opt = ["--url"] + metavalue = "URL" def init(self): self.label = _("Profile repository") @@ -721,7 +722,7 @@ class VariableClUpdateProfileRepoName(ReadonlyVariable): def get(self): rep_set = self.Get('cl_update_profile_storage') url = self.Get('cl_update_profile_rep') - rep = rep_set.get_repository(url) + rep = rep_set.get_repository(url, branch=None) if rep: return rep.repo_name return "" @@ -735,6 +736,7 @@ class VariableClUpdateProfileBranch(Variable): type = "edit" opt = ["--branch"] + metavalue = "BRANCH" def init(self): self.label = _("Repository branch") @@ -862,17 +864,33 @@ class VariableClUpdateProfileSystem(Variable): path_profile = self.Select('cl_profile_path', where='cl_profile_shortname', eq=profile, limit=1) + profile_fullname = self.Select('cl_profile_fullname', + where='cl_profile_shortname', + eq=profile, limit=1) if path_profile: dv = DataVarsUpdateProfile(path_profile) + if ":" in profile_fullname: + repo_name = profile_fullname.partition(":")[0] + else: + repo_name = "" try: if (not dv.Get('cl_update_rep_name') or not dv.Get('cl_update_rep_url')): raise VariableError(_("Repository variables " "were not configured for the profile")) if not dv.Get('os_linux_name'): - raise VariableError() - except (DataVarsError, VariableError) as e: - raise VariableError(_("The selected profile is not Calculate")) + raise VariableError("") + if repo_name not in list(self.Get('cl_update_profile_rep_name')): + raise VariableError( + _("Overlay %s not specified in cl_update_rep_name")% + repo_name) + except (DataVarsError,VariableError) as e: + if str(e): + message = ". " + str(e) + else: + message = "" + raise VariableError(_("The selected profile is not Calculate") + +message) else: raise VariableError(_("Wrong Calculate profile"))