summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXiao Jin <jin.xiao@samsung.com>2018-08-03 11:12:47 +0800
committerXiao Jin <jin.xiao@samsung.com>2018-08-03 15:40:50 +0800
commit23097fe3923a2570ab49dcb9a31ff22dbaeb0d86 (patch)
tree3e806918a9c9e72e48b40b5333fca9c632aeee5e
parent86255c637f931e0a70f20c43957164eb20920ea5 (diff)
downloadmic-23097fe3923a2570ab49dcb9a31ff22dbaeb0d86.tar.gz
mic-23097fe3923a2570ab49dcb9a31ff22dbaeb0d86.tar.bz2
mic-23097fe3923a2570ab49dcb9a31ff22dbaeb0d86.zip
remove tmp dir in runscript period
Change-Id: I6cfd6e09f8565bae074fe5736a4298fea2461a9d
-rw-r--r--mic/imager/baseimager.py15
1 files changed, 2 insertions, 13 deletions
diff --git a/mic/imager/baseimager.py b/mic/imager/baseimager.py
index 3762884..f33138e 100644
--- a/mic/imager/baseimager.py
+++ b/mic/imager/baseimager.py
@@ -1247,17 +1247,9 @@ class BaseImageCreator(object):
os.close(fd)
os.chmod(path, 0700)
- for item in os.listdir(self._imgdir):
- sub = os.path.splitext(item)[1]
- if sub == ".img":
- shutil.move(os.path.join(self._imgdir, item),
- os.path.join(self._instroot + "/tmp", item))
- oldoutdir = os.getcwd()
- os.chdir(self._instroot + "/tmp")
-
env = self._get_sign_scripts_env()
- #*.img files are moved to self._instroot + "/tmp" directory in running runscripts
- env['IMG_PATHS'] = env['IMG_PATHS'].replace(self._imgdir,self._instroot + "/tmp")
+ oldoutdir = os.getcwd()
+ os.chdir(self._imgdir)
try:
try:
p = subprocess.Popen([s.interp, path],
@@ -1275,9 +1267,6 @@ class BaseImageCreator(object):
finally:
os.chdir(oldoutdir)
os.unlink(path)
- for item in os.listdir(self._instroot + "/tmp"):
- shutil.move(os.path.join(self._instroot + "/tmp", item),
- os.path.join(self._imgdir, item))
def __run_post_scripts(self):
msger.info("Running post scripts ...")