Added ability specifying short profile name.

master
Mike Hiretsky 14 years ago
parent 19dd2bdb1e
commit fd5539bc66

Binary file not shown.

@ -540,15 +540,32 @@ class cl_builder(color_print):
distros = self.clVars.Get('cl_builder_distro')
if len(distros) == 1:
newprofile = distros[0]
if not newprofile in self.clVars.Get('cl_builder_distro'):
if newprofile:
self.printERROR(_("wrong value for '--profile'"))
newprofile = newprofile or ""
likeProfile = filter(lambda x:newprofile in x,
self.clVars.Get('cl_builder_distro'))
if len(likeProfile) != 1:
if newprofile != "list":
if not likeProfile:
if newprofile:
self.printERROR(_("wrong value for '--profile'"))
self.printERROR(
_("specify 'list' in '--profile' value for print "
"all available assembled distro"))
else:
self.printERROR(_("need specify '--profile'"))
return False
else:
self.printERROR(
_("specified value of '--profile' is ambiguous. "
"Please specify profile more exactly."))
self.defaultPrint(_("Select profile from")+":\n")
else:
self.printERROR(_("need specify '--profile'"))
self.defaultPrint(_("Available assembled distro")+":\n")
for profile in self.clVars.Get('cl_builder_distro'):
likeProfile = self.clVars.Get('cl_builder_distro')
self.defaultPrint(_("Available assembled distro")+":\n")
for profile in likeProfile:
self.printSUCCESS(profile)
return False
newprofile = likeProfile[0]
self.clVars.Set('os_builder_profile', newprofile, True)
self.assembleIso = True
self.clVars.Set('cl_builder_path', _toUNICODE(envData.getVar(newprofile,

Loading…
Cancel
Save