|
|
|
@ -13,7 +13,9 @@
|
|
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
|
# See the License for the specific language governing permissions and
|
|
|
|
|
# limitations under the License.
|
|
|
|
|
from cl_install import cl_install, InstallError, __app__, __version__, get_install_errors
|
|
|
|
|
|
|
|
|
|
from cl_install import cl_install, InstallError, __app__, __version__,\
|
|
|
|
|
get_install_errors
|
|
|
|
|
from cl_opt import opt
|
|
|
|
|
from cl_share_cmd import share_cmd
|
|
|
|
|
import re
|
|
|
|
@ -140,6 +142,17 @@ class install_cmd(cl_install,share_cmd):
|
|
|
|
|
self.checkIncompatibleInstallUninstall()
|
|
|
|
|
if values.live:
|
|
|
|
|
self.checkIncompatibleLive()
|
|
|
|
|
if not values.v:
|
|
|
|
|
if values.filter:
|
|
|
|
|
errMsg = _("incorrect option") + ":" + " %s" %"--filter" +\
|
|
|
|
|
": " + _("use with option '-v'")
|
|
|
|
|
self.optobj.error(errMsg)
|
|
|
|
|
return False
|
|
|
|
|
if values.xml:
|
|
|
|
|
errMsg = _("incorrect option") + ":" + " %s" %"--xml" +\
|
|
|
|
|
": " + _("use with option '-v'")
|
|
|
|
|
self.optobj.error(errMsg)
|
|
|
|
|
return False
|
|
|
|
|
if not (values.install or values.uninstall or values.live):
|
|
|
|
|
if values.v is False and \
|
|
|
|
|
values.d is None and not self.clVars.Get('os_install_dev_from'):
|
|
|
|
@ -254,9 +267,24 @@ class install_cmd(cl_install,share_cmd):
|
|
|
|
|
return False
|
|
|
|
|
return True
|
|
|
|
|
|
|
|
|
|
def displayVars(self,vars):
|
|
|
|
|
def displayVars(self, optObj):
|
|
|
|
|
"""Process displaying variables"""
|
|
|
|
|
self.clVars.printVars()
|
|
|
|
|
if optObj.v:
|
|
|
|
|
varsFilter = None
|
|
|
|
|
varsNames = []
|
|
|
|
|
format = "default"
|
|
|
|
|
# Фильтрование переменных
|
|
|
|
|
if optObj.filter:
|
|
|
|
|
optCmd = optObj.filter
|
|
|
|
|
if ',' in optCmd:
|
|
|
|
|
varsNames = optCmd.split(",")
|
|
|
|
|
elif '*' in optCmd:
|
|
|
|
|
varsFilter = optCmd.replace("*", ".*")
|
|
|
|
|
else:
|
|
|
|
|
varsNames.append(optCmd)
|
|
|
|
|
if optObj.xml:
|
|
|
|
|
format = "xml"
|
|
|
|
|
self.clVars.printVars(varsFilter, varsNames, outFormat=format)
|
|
|
|
|
|
|
|
|
|
def _parseOptSwap(self, listOpt):
|
|
|
|
|
"""Parse value cmd option --swap"""
|
|
|
|
|