From 323c2997ba33fc3e829c1922256e933799293914 Mon Sep 17 00:00:00 2001 From: Dohyung Kim Date: Tue, 13 Mar 2018 15:31:29 +0900 Subject: [PATCH] Revert "call copy_attachment() after configure() and move attachment files" This reverts commit 7db9b0c91a5b26f96a86ec10dfad261a7d781f3b. Change-Id: Iaa242d65fd7fb14c379fff0f268ac1607005169e --- mic/imager/baseimager.py | 2 +- mic/imager/loop.py | 6 +++--- plugins/imager/fs_plugin.py | 1 - plugins/imager/loop_plugin.py | 1 - plugins/imager/qcow_plugin.py | 1 - plugins/imager/raw_plugin.py | 1 - 6 files changed, 4 insertions(+), 8 deletions(-) diff --git a/mic/imager/baseimager.py b/mic/imager/baseimager.py index ef86f0f..022d955 100755 --- a/mic/imager/baseimager.py +++ b/mic/imager/baseimager.py @@ -1195,7 +1195,7 @@ class BaseImageCreator(object): raise CreatorError("Tpk package missing.") def postinstall(self): - pass + self.copy_attachment() def _get_sign_scripts_env(self): """Return an environment dict for %post-umount scripts. diff --git a/mic/imager/loop.py b/mic/imager/loop.py index e9815c9..268ba84 100755 --- a/mic/imager/loop.py +++ b/mic/imager/loop.py @@ -507,13 +507,13 @@ class LoopImageCreator(BaseImageCreator): self._check_imgdir() - msger.info("Moving attachment files...") + msger.info("Copying attachment files...") for item in self._attachment: if not os.path.exists(item): continue dpath = os.path.join(self._imgdir, os.path.basename(item)) - msger.verbose("Move attachment %s to %s" % (item, dpath)) - shutil.move(item, dpath) + msger.verbose("Copy attachment %s to %s" % (item, dpath)) + shutil.copy(item, dpath) def move_post_umount_scripts(self): scripts_dir = self._instroot + "/var/tmp/post_umount_scripts" diff --git a/plugins/imager/fs_plugin.py b/plugins/imager/fs_plugin.py index b922b28..c639211 100755 --- a/plugins/imager/fs_plugin.py +++ b/plugins/imager/fs_plugin.py @@ -104,7 +104,6 @@ class FsPlugin(ImagerPlugin): creator.configure(creatoropts["repomd"]) creator.copy_kernel() - creator.copy_attachment() creator.unmount() creator.package(creatoropts["destdir"]) creator.create_manifest() diff --git a/plugins/imager/loop_plugin.py b/plugins/imager/loop_plugin.py index d81eb45..0b94f0e 100755 --- a/plugins/imager/loop_plugin.py +++ b/plugins/imager/loop_plugin.py @@ -104,7 +104,6 @@ class LoopPlugin(ImagerPlugin): creator.tpkinstall() creator.configure(creatoropts["repomd"]) creator.copy_kernel() - creator.copy_attachment() creator.create_cpio_image() creator.unmount() creator.copy_cpio_image() diff --git a/plugins/imager/qcow_plugin.py b/plugins/imager/qcow_plugin.py index 2cc9d43..d6758c5 100755 --- a/plugins/imager/qcow_plugin.py +++ b/plugins/imager/qcow_plugin.py @@ -135,7 +135,6 @@ class QcowPlugin(ImagerPlugin): creator.tpkinstall() creator.configure(creatoropts["repomd"]) creator.copy_kernel() - creator.copy_attachment() creator.create_cpio_image() creator.unmount() creator.copy_cpio_image() diff --git a/plugins/imager/raw_plugin.py b/plugins/imager/raw_plugin.py index 7d44bc3..e954b7b 100755 --- a/plugins/imager/raw_plugin.py +++ b/plugins/imager/raw_plugin.py @@ -102,7 +102,6 @@ class RawPlugin(ImagerPlugin): creator.tpkinstall() creator.configure(creatoropts["repomd"]) creator.copy_kernel() - creator.copy_attachment() creator.unmount() creator.generate_bmap() creator.package(creatoropts["destdir"]) -- 2.7.4