[OE-core] [PATCH 14/18] wic: move oe/misc.py one level up
Ed Bartosh
ed.bartosh at linux.intel.com
Wed Feb 1 13:48:21 UTC 2017
Flattened directory structure:
moved wic/utils/oe/misc.py -> wic/utils/misc.py
[YOCTO #10619]
Signed-off-by: Ed Bartosh <ed.bartosh at linux.intel.com>
---
scripts/lib/wic/engine.py | 4 ++--
scripts/lib/wic/partition.py | 4 ++--
scripts/lib/wic/plugin.py | 2 +-
scripts/lib/wic/plugins/imager/direct.py | 2 +-
scripts/lib/wic/plugins/source/bootimg-efi.py | 4 ++--
scripts/lib/wic/plugins/source/bootimg-partition.py | 2 +-
scripts/lib/wic/plugins/source/bootimg-pcbios.py | 4 ++--
scripts/lib/wic/plugins/source/fsimage.py | 2 +-
scripts/lib/wic/plugins/source/isoimage-isohybrid.py | 2 +-
scripts/lib/wic/plugins/source/rawcopy.py | 2 +-
scripts/lib/wic/plugins/source/rootfs.py | 2 +-
scripts/lib/wic/plugins/source/rootfs_pcbios_ext.py | 8 ++++----
scripts/lib/wic/utils/{oe => }/misc.py | 0
scripts/lib/wic/utils/partitionedfs.py | 2 +-
scripts/wic | 2 +-
15 files changed, 21 insertions(+), 21 deletions(-)
rename scripts/lib/wic/utils/{oe => }/misc.py (100%)
diff --git a/scripts/lib/wic/engine.py b/scripts/lib/wic/engine.py
index 4abea87..685bc88 100644
--- a/scripts/lib/wic/engine.py
+++ b/scripts/lib/wic/engine.py
@@ -33,7 +33,7 @@ import sys
from wic import msger, creator
from wic.plugin import pluginmgr
-from wic.utils.oe import misc
+from wic.utils.misc import get_bitbake_var
def verify_build_env():
@@ -54,7 +54,7 @@ SCRIPTS_CANNED_IMAGE_DIR = "scripts/" + CANNED_IMAGE_DIR
WIC_DIR = "wic"
def build_canned_image_list(path):
- layers_path = misc.get_bitbake_var("BBLAYERS")
+ layers_path = get_bitbake_var("BBLAYERS")
canned_wks_layer_dirs = []
if layers_path is not None:
diff --git a/scripts/lib/wic/partition.py b/scripts/lib/wic/partition.py
index 094a8c3..31a0350 100644
--- a/scripts/lib/wic/partition.py
+++ b/scripts/lib/wic/partition.py
@@ -27,8 +27,8 @@
import os
import tempfile
-from wic.utils.oe.misc import msger
-from wic.utils.oe.misc import exec_cmd, exec_native_cmd, get_bitbake_var
+from wic import msger
+from wic.utils.misc import exec_cmd, exec_native_cmd, get_bitbake_var
from wic.plugin import pluginmgr
class Partition():
diff --git a/scripts/lib/wic/plugin.py b/scripts/lib/wic/plugin.py
index 306b324..6b06ed6 100644
--- a/scripts/lib/wic/plugin.py
+++ b/scripts/lib/wic/plugin.py
@@ -20,7 +20,7 @@ import os, sys
from wic import msger
from wic import pluginbase
from wic.utils import errors
-from wic.utils.oe.misc import get_bitbake_var
+from wic.utils.misc import get_bitbake_var
__ALL__ = ['PluginMgr', 'pluginmgr']
diff --git a/scripts/lib/wic/plugins/imager/direct.py b/scripts/lib/wic/plugins/imager/direct.py
index 9cd7068..592412a 100644
--- a/scripts/lib/wic/plugins/imager/direct.py
+++ b/scripts/lib/wic/plugins/imager/direct.py
@@ -37,7 +37,7 @@ from wic.plugin import pluginmgr
from wic.pluginbase import ImagerPlugin
from wic.utils import errors
from wic.utils.errors import CreatorError, ImageError
-from wic.utils.oe.misc import get_bitbake_var, exec_cmd, exec_native_cmd
+from wic.utils.misc import get_bitbake_var, exec_cmd, exec_native_cmd
from wic.utils.partitionedfs import Image
class DirectPlugin(ImagerPlugin):
diff --git a/scripts/lib/wic/plugins/source/bootimg-efi.py b/scripts/lib/wic/plugins/source/bootimg-efi.py
index 28b941e..2b66a58 100644
--- a/scripts/lib/wic/plugins/source/bootimg-efi.py
+++ b/scripts/lib/wic/plugins/source/bootimg-efi.py
@@ -30,8 +30,8 @@ import shutil
from wic import msger
from wic.engine import get_custom_config
from wic.pluginbase import SourcePlugin
-from wic.utils.oe.misc import exec_cmd, exec_native_cmd, get_bitbake_var, \
- BOOTDD_EXTRA_SPACE
+from wic.utils.misc import (exec_cmd, exec_native_cmd, get_bitbake_var,
+ BOOTDD_EXTRA_SPACE)
class BootimgEFIPlugin(SourcePlugin):
"""
diff --git a/scripts/lib/wic/plugins/source/bootimg-partition.py b/scripts/lib/wic/plugins/source/bootimg-partition.py
index b76c121..f94dfab 100644
--- a/scripts/lib/wic/plugins/source/bootimg-partition.py
+++ b/scripts/lib/wic/plugins/source/bootimg-partition.py
@@ -28,7 +28,7 @@ import re
from wic import msger
from wic.pluginbase import SourcePlugin
-from wic.utils.oe.misc import exec_cmd, get_bitbake_var
+from wic.utils.misc import exec_cmd, get_bitbake_var
from glob import glob
class BootimgPartitionPlugin(SourcePlugin):
diff --git a/scripts/lib/wic/plugins/source/bootimg-pcbios.py b/scripts/lib/wic/plugins/source/bootimg-pcbios.py
index 283b834..d796433 100644
--- a/scripts/lib/wic/plugins/source/bootimg-pcbios.py
+++ b/scripts/lib/wic/plugins/source/bootimg-pcbios.py
@@ -31,8 +31,8 @@ from wic.engine import get_custom_config
from wic.utils import runner
from wic.utils.errors import ImageError
from wic.pluginbase import SourcePlugin
-from wic.utils.oe.misc import exec_cmd, exec_native_cmd, \
- get_bitbake_var, BOOTDD_EXTRA_SPACE
+from wic.utils.misc import (exec_cmd, exec_native_cmd,
+ get_bitbake_var, BOOTDD_EXTRA_SPACE)
class BootimgPcbiosPlugin(SourcePlugin):
"""
diff --git a/scripts/lib/wic/plugins/source/fsimage.py b/scripts/lib/wic/plugins/source/fsimage.py
index f894e89..9193892 100644
--- a/scripts/lib/wic/plugins/source/fsimage.py
+++ b/scripts/lib/wic/plugins/source/fsimage.py
@@ -19,7 +19,7 @@ import os
from wic import msger
from wic.pluginbase import SourcePlugin
-from wic.utils.oe.misc import get_bitbake_var
+from wic.utils.misc import get_bitbake_var
class FSImagePlugin(SourcePlugin):
"""
diff --git a/scripts/lib/wic/plugins/source/isoimage-isohybrid.py b/scripts/lib/wic/plugins/source/isoimage-isohybrid.py
index 4979d8e..6df3756 100644
--- a/scripts/lib/wic/plugins/source/isoimage-isohybrid.py
+++ b/scripts/lib/wic/plugins/source/isoimage-isohybrid.py
@@ -28,7 +28,7 @@ import glob
from wic import msger
from wic.engine import get_custom_config
from wic.pluginbase import SourcePlugin
-from wic.utils.oe.misc import exec_cmd, exec_native_cmd, get_bitbake_var
+from wic.utils.misc import exec_cmd, exec_native_cmd, get_bitbake_var
class IsoImagePlugin(SourcePlugin):
"""
diff --git a/scripts/lib/wic/plugins/source/rawcopy.py b/scripts/lib/wic/plugins/source/rawcopy.py
index 5bd22fd..79e41ca 100644
--- a/scripts/lib/wic/plugins/source/rawcopy.py
+++ b/scripts/lib/wic/plugins/source/rawcopy.py
@@ -19,7 +19,7 @@ import os
from wic import msger
from wic.pluginbase import SourcePlugin
-from wic.utils.oe.misc import exec_cmd, get_bitbake_var
+from wic.utils.misc import exec_cmd, get_bitbake_var
from wic.filemap import sparse_copy
class RawCopyPlugin(SourcePlugin):
diff --git a/scripts/lib/wic/plugins/source/rootfs.py b/scripts/lib/wic/plugins/source/rootfs.py
index 425da8b..891f095 100644
--- a/scripts/lib/wic/plugins/source/rootfs.py
+++ b/scripts/lib/wic/plugins/source/rootfs.py
@@ -29,7 +29,7 @@ import os
from wic import msger
from wic.pluginbase import SourcePlugin
-from wic.utils.oe.misc import get_bitbake_var
+from wic.utils.misc import get_bitbake_var
class RootfsPlugin(SourcePlugin):
"""
diff --git a/scripts/lib/wic/plugins/source/rootfs_pcbios_ext.py b/scripts/lib/wic/plugins/source/rootfs_pcbios_ext.py
index 3d60e6f..1032019 100644
--- a/scripts/lib/wic/plugins/source/rootfs_pcbios_ext.py
+++ b/scripts/lib/wic/plugins/source/rootfs_pcbios_ext.py
@@ -22,7 +22,7 @@ import os
from wic import msger
from wic.utils import syslinux
from wic.utils import runner
-from wic.utils.oe import misc
+from wic.utils.misc import get_bitbake_var, exec_cmd, exec_native_cmd
from wic.utils.errors import ImageError
from wic.pluginbase import SourcePlugin
@@ -58,7 +58,7 @@ class RootfsPlugin(SourcePlugin):
if os.path.isdir(rootfs_dir):
return rootfs_dir
- image_rootfs_dir = misc.get_bitbake_var("IMAGE_ROOTFS", rootfs_dir)
+ image_rootfs_dir = get_bitbake_var("IMAGE_ROOTFS", rootfs_dir)
if not os.path.isdir(image_rootfs_dir):
msg = "No valid artifact IMAGE_ROOTFS from image named"
msg += " %s has been found at %s, exiting.\n" % \
@@ -119,7 +119,7 @@ class RootfsPlugin(SourcePlugin):
native_syslinux_nomtools = os.path.join(native_sysroot, "usr/bin/syslinux-nomtools")
if not is_exe(native_syslinux_nomtools):
msger.info("building syslinux-native...")
- misc.exec_cmd("bitbake syslinux-native")
+ exec_cmd("bitbake syslinux-native")
if not is_exe(native_syslinux_nomtools):
msger.error("Couldn't find syslinux-nomtools (%s), exiting\n" %
native_syslinux_nomtools)
@@ -145,7 +145,7 @@ class RootfsPlugin(SourcePlugin):
# install syslinux into rootfs partition
syslinux_cmd = "syslinux-nomtools -d /boot -i %s" % part.source_file
- misc.exec_native_cmd(syslinux_cmd, native_sysroot)
+ exec_native_cmd(syslinux_cmd, native_sysroot)
@classmethod
def do_install_disk(cls, disk, disk_name, image_creator, workdir, oe_builddir,
diff --git a/scripts/lib/wic/utils/oe/misc.py b/scripts/lib/wic/utils/misc.py
similarity index 100%
rename from scripts/lib/wic/utils/oe/misc.py
rename to scripts/lib/wic/utils/misc.py
diff --git a/scripts/lib/wic/utils/partitionedfs.py b/scripts/lib/wic/utils/partitionedfs.py
index ed67b9a..eb4d7e6 100644
--- a/scripts/lib/wic/utils/partitionedfs.py
+++ b/scripts/lib/wic/utils/partitionedfs.py
@@ -21,7 +21,7 @@
import os
from wic import msger
from wic.utils.errors import ImageError
-from wic.utils.oe.misc import exec_cmd, exec_native_cmd
+from wic.utils.misc import exec_cmd, exec_native_cmd
from wic.filemap import sparse_copy
# Overhead of the MBR partitioning scheme (just one sector)
diff --git a/scripts/wic b/scripts/wic
index 54cbe96..33355ee 100755
--- a/scripts/wic
+++ b/scripts/wic
@@ -51,7 +51,7 @@ if bitbake_exe:
else:
bitbake_main = None
-from wic.utils.oe.misc import get_bitbake_var, BB_VARS
+from wic.utils.misc import get_bitbake_var, BB_VARS
from wic.utils.errors import WicError
from wic import engine
from wic import help as hlp
--
2.1.4
More information about the Openembedded-core
mailing list