BaseTools/Upt: Update error message

Update error message of installation failure to avoid confusion.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hess Chen <hesheng.chen@intel.com>
Reviewed-by: lhauch <larry.hauch@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17661 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
Hess Chen 2015-06-19 00:02:34 +00:00 committed by hchen30
parent 6ef586442e
commit af0c61aefc
3 changed files with 15 additions and 13 deletions

View File

@ -1,7 +1,7 @@
## @file ## @file
# Install distribution package. # Install distribution package.
# #
# Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR> # Copyright (c) 2011 - 2015, Intel Corporation. All rights reserved.<BR>
# #
# This program and the accompanying materials are licensed and made available # This program and the accompanying materials are licensed and made available
# under the terms and conditions of the BSD License which accompanies this # under the terms and conditions of the BSD License which accompanies this
@ -556,6 +556,7 @@ def Main(Options = None):
Logger.Quiet(ST.MSG_PYTHON_ON % (python_version(), Logger.Quiet(ST.MSG_PYTHON_ON % (python_version(),
platform) + format_exc()) platform) + format_exc())
finally: finally:
if ReturnCode != UPT_ALREADY_INSTALLED_ERROR:
Logger.Quiet(ST.MSG_REMOVE_TEMP_FILE_STARTED) Logger.Quiet(ST.MSG_REMOVE_TEMP_FILE_STARTED)
if DistFile: if DistFile:
DistFile.Close() DistFile.Close()

View File

@ -1,7 +1,7 @@
## @file ## @file
# This file is used to define strings used in the UPT tool # This file is used to define strings used in the UPT tool
# #
# Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR> # Copyright (c) 2011 - 2015, Intel Corporation. All rights reserved.<BR>
# #
# This program and the accompanying materials are licensed and made available # This program and the accompanying materials are licensed and made available
# under the terms and conditions of the BSD License which accompanies this # under the terms and conditions of the BSD License which accompanies this
@ -781,7 +781,7 @@ WRN_MODULE_EXISTED = _("This module already exists: %s")
WRN_FILE_EXISTED = _("This file already exists: %s") WRN_FILE_EXISTED = _("This file already exists: %s")
WRN_FILE_NOT_OVERWRITTEN = \ WRN_FILE_NOT_OVERWRITTEN = \
_("This file already exist and cannot be overwritten: %s") _("This file already exist and cannot be overwritten: %s")
WRN_DIST_PKG_INSTALLED = _("This distribution package has been installed") WRN_DIST_PKG_INSTALLED = _("This distribution package has previously been installed.")
WRN_DIST_NOT_FOUND = _( WRN_DIST_NOT_FOUND = _(
"Distribution is not found at location %s") "Distribution is not found at location %s")
WRN_MULTI_PCD_RANGES = _( WRN_MULTI_PCD_RANGES = _(

View File

@ -38,6 +38,7 @@ from Logger.ToolError import OPTION_MISSING
from Logger.ToolError import FILE_TYPE_MISMATCH from Logger.ToolError import FILE_TYPE_MISMATCH
from Logger.ToolError import OPTION_CONFLICT from Logger.ToolError import OPTION_CONFLICT
from Logger.ToolError import FatalError from Logger.ToolError import FatalError
from Logger.ToolError import UPT_ALREADY_INSTALLED_ERROR
import MkPkg import MkPkg
import InstallPkg import InstallPkg
@ -282,7 +283,7 @@ def Main():
format_exc()) format_exc())
finally: finally:
try: try:
if ReturnCode != 0: if ReturnCode != 0 and ReturnCode != UPT_ALREADY_INSTALLED_ERROR:
Logger.Quiet(ST.MSG_RECOVER_START) Logger.Quiet(ST.MSG_RECOVER_START)
GlobalData.gDB.RollBack() GlobalData.gDB.RollBack()
Mgr.rollback() Mgr.rollback()