From: Artem Bityutskiy Date: Wed, 26 Jun 2013 09:08:49 +0000 (+0300) Subject: baseimager: move environment variable definitions X-Git-Tag: 0.20~12 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e0f308119a330dc2d017cf8839ba788183bc8d47;p=tools%2Fmic.git baseimager: move environment variable definitions It is cleaner to have a single place where we define all the environement variables. Move a couple of historical variables to the '_get_post_scripts_env()' function. Change-Id: I58e5d2dbe4477effccf254c48a1f74ccad484c8c Signed-off-by: Artem Bityutskiy --- diff --git a/mic/imager/baseimager.py b/mic/imager/baseimager.py index 39bb6dd..fed1ad7 100644 --- a/mic/imager/baseimager.py +++ b/mic/imager/baseimager.py @@ -463,6 +463,11 @@ class BaseImageCreator(object): # Name of the image creation tool env[self.installerfw_prefix + "INSTALLER_NAME"] = "mic" + # These are historical variables which lack the common name prefix + if not in_chroot: + env["INSTALL_ROOT"] = self._instroot + env["IMG_NAME"] = self._name + return env def __get_imgname(self): @@ -1055,8 +1060,6 @@ class BaseImageCreator(object): env = self._get_post_scripts_env(s.inChroot) if not s.inChroot: - env["INSTALL_ROOT"] = self._instroot - env["IMG_NAME"] = self._name preexec = None script = path else: