1
0
mirror of https://git.yoctoproject.org/poky synced 2026-05-31 12:49:46 +00:00

wic: Rename /mic to /wic

As well as any other stray instances of mic in the codebase that can
be removed.

We don't really need to carry around legacy naming, and the history is
in git.

(From OE-Core rev: 598b120406dc1d2b7e377bd1ab6f0acbef034b22)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Tom Zanussi
2014-08-08 15:53:52 -05:00
committed by Richard Purdie
parent a43c1f9420
commit d8f9d05bae
47 changed files with 104 additions and 106 deletions
+6 -6
View File
@@ -37,12 +37,12 @@ import subprocess
import shutil import shutil
import os, sys, errno import os, sys, errno
from mic import msger, creator from wic import msger, creator
from mic.utils import cmdln, misc, errors from wic.utils import cmdln, misc, errors
from mic.conf import configmgr from wic.conf import configmgr
from mic.plugin import pluginmgr from wic.plugin import pluginmgr
from mic.__version__ import VERSION from wic.__version__ import VERSION
from mic.utils.oe.misc import * from wic.utils.oe.misc import *
def verify_build_env(): def verify_build_env():
+4 -4
View File
@@ -144,7 +144,7 @@ DESCRIPTION
the corresponding artifacts are typically found in a normal the corresponding artifacts are typically found in a normal
OpenEmbedded build. OpenEmbedded build.
Alternatively, users can use the -e option to have 'mic' determine Alternatively, users can use the -e option to have 'wic' determine
those locations for a given image. If the -e option is used, the those locations for a given image. If the -e option is used, the
user needs to have set the appropriate MACHINE variable in user needs to have set the appropriate MACHINE variable in
local.conf, and have sourced the build environment. local.conf, and have sourced the build environment.
@@ -349,12 +349,12 @@ DESCRIPTION
implementation that populates a corresponding partition. implementation that populates a corresponding partition.
A source plugin is created as a subclass of SourcePlugin (see A source plugin is created as a subclass of SourcePlugin (see
scripts/lib/mic/pluginbase.py) and the plugin file containing it scripts/lib/wic/pluginbase.py) and the plugin file containing it
is added to scripts/lib/mic/plugins/source/ to make the plugin is added to scripts/lib/wic/plugins/source/ to make the plugin
implementation available to the wic implementation. implementation available to the wic implementation.
Source plugins can also be implemented and added by external Source plugins can also be implemented and added by external
layers - any plugins found in a scripts/lib/mic/plugins/source/ layers - any plugins found in a scripts/lib/wic/plugins/source/
directory in an external layer will also be made available. directory in an external layer will also be made available.
When the wic implementation needs to invoke a partition-specific When the wic implementation needs to invoke a partition-specific
@@ -18,15 +18,15 @@
import os, sys, re import os, sys, re
import ConfigParser import ConfigParser
from mic import msger from wic import msger
from mic import kickstart from wic import kickstart
from mic.utils import misc, runner, errors from wic.utils import misc, runner, errors
def get_siteconf(): def get_siteconf():
mic_path = os.path.dirname(__file__) wic_path = os.path.dirname(__file__)
eos = mic_path.find('scripts') + len('scripts') eos = wic_path.find('scripts') + len('scripts')
scripts_path = mic_path[:eos] scripts_path = wic_path[:eos]
return scripts_path + "/lib/image/config/wic.conf" return scripts_path + "/lib/image/config/wic.conf"
@@ -18,10 +18,10 @@
import os, sys, re import os, sys, re
from optparse import SUPPRESS_HELP from optparse import SUPPRESS_HELP
from mic import msger from wic import msger
from mic.utils import cmdln, errors from wic.utils import cmdln, errors
from mic.conf import configmgr from wic.conf import configmgr
from mic.plugin import pluginmgr from wic.plugin import pluginmgr
class Creator(cmdln.Cmdln): class Creator(cmdln.Cmdln):
@@ -34,7 +34,7 @@ class Creator(cmdln.Cmdln):
${option_list} ${option_list}
""" """
name = 'mic create(cr)' name = 'wic create(cr)'
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
cmdln.Cmdln.__init__(self, *args, **kwargs) cmdln.Cmdln.__init__(self, *args, **kwargs)
@@ -64,7 +64,7 @@ class Creator(cmdln.Cmdln):
help='Path of logfile') help='Path of logfile')
optparser.add_option('-c', '--config', type='string', dest='config', optparser.add_option('-c', '--config', type='string', dest='config',
default=None, default=None,
help='Specify config file for mic') help='Specify config file for wic')
optparser.add_option('-o', '--outdir', type='string', action='store', optparser.add_option('-o', '--outdir', type='string', action='store',
dest='outdir', default=None, dest='outdir', default=None,
help='Output directory') help='Output directory')
@@ -21,10 +21,10 @@ import os, sys
import tempfile import tempfile
import shutil import shutil
from mic import kickstart from wic import kickstart
from mic import msger from wic import msger
from mic.utils.errors import CreatorError from wic.utils.errors import CreatorError
from mic.utils import misc, runner, fs_related as fs from wic.utils import misc, runner, fs_related as fs
class BaseImageCreator(object): class BaseImageCreator(object):
"""Base class for image creation. """Base class for image creation.
@@ -34,7 +34,7 @@ class BaseImageCreator(object):
e.g. e.g.
import mic.imgcreate as imgcreate import wic.imgcreate as imgcreate
ks = imgcreate.read_kickstart("foo.ks") ks = imgcreate.read_kickstart("foo.ks")
imgcreate.ImageCreator(ks, "foo").create() imgcreate.ImageCreator(ks, "foo").create()
""" """
@@ -18,8 +18,7 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
# #
# DESCRIPTION # DESCRIPTION
# This implements the 'direct' image creator class for 'wic', based # This implements the 'direct' image creator class for 'wic'
# loosely on the raw image creator from 'mic'
# #
# AUTHORS # AUTHORS
# Tom Zanussi <tom.zanussi (at] linux.intel.com> # Tom Zanussi <tom.zanussi (at] linux.intel.com>
@@ -29,13 +28,13 @@ import os
import stat import stat
import shutil import shutil
from mic import kickstart, msger from wic import kickstart, msger
from mic.utils import fs_related, runner, misc from wic.utils import fs_related, runner, misc
from mic.utils.partitionedfs import Image from wic.utils.partitionedfs import Image
from mic.utils.errors import CreatorError, ImageError from wic.utils.errors import CreatorError, ImageError
from mic.imager.baseimager import BaseImageCreator from wic.imager.baseimager import BaseImageCreator
from mic.utils.oe.misc import * from wic.utils.oe.misc import *
from mic.plugin import pluginmgr from wic.plugin import pluginmgr
disk_methods = { disk_methods = {
"do_install_disk":None, "do_install_disk":None,
@@ -30,8 +30,8 @@ import pykickstart.version as ksversion
from pykickstart.handlers.control import commandMap from pykickstart.handlers.control import commandMap
from pykickstart.handlers.control import dataMap from pykickstart.handlers.control import dataMap
from mic import msger from wic import msger
from mic.utils import errors, misc, runner, fs_related as fs from wic.utils import errors, misc, runner, fs_related as fs
from custom_commands import wicboot, partition from custom_commands import wicboot, partition
def read_kickstart(path): def read_kickstart(path):
@@ -29,9 +29,9 @@ import os
import tempfile import tempfile
from pykickstart.commands.partition import * from pykickstart.commands.partition import *
from mic.utils.oe.misc import * from wic.utils.oe.misc import *
from mic.kickstart.custom_commands import * from wic.kickstart.custom_commands import *
from mic.plugin import pluginmgr from wic.plugin import pluginmgr
partition_methods = { partition_methods = {
"do_stage_partition":None, "do_stage_partition":None,
@@ -29,7 +29,7 @@ from pykickstart.errors import *
from pykickstart.options import * from pykickstart.options import *
from pykickstart.commands.bootloader import * from pykickstart.commands.bootloader import *
from mic.kickstart.custom_commands.micboot import * from wic.kickstart.custom_commands.micboot import *
class Wic_Bootloader(Mic_Bootloader): class Wic_Bootloader(Mic_Bootloader):
def __init__(self, writePriority=10, appendLine="", driveorder=None, def __init__(self, writePriority=10, appendLine="", driveorder=None,
@@ -17,16 +17,16 @@
import os, sys import os, sys
from mic import msger from wic import msger
from mic import pluginbase from wic import pluginbase
from mic.utils import errors from wic.utils import errors
from mic.utils.oe.misc import * from wic.utils.oe.misc import *
__ALL__ = ['PluginMgr', 'pluginmgr'] __ALL__ = ['PluginMgr', 'pluginmgr']
PLUGIN_TYPES = ["imager", "source"] PLUGIN_TYPES = ["imager", "source"]
PLUGIN_DIR = "/lib/mic/plugins" # relative to scripts PLUGIN_DIR = "/lib/wic/plugins" # relative to scripts
SCRIPTS_PLUGIN_DIR = "scripts" + PLUGIN_DIR SCRIPTS_PLUGIN_DIR = "scripts" + PLUGIN_DIR
class PluginMgr(object): class PluginMgr(object):
@@ -41,9 +41,9 @@ class PluginMgr(object):
return cls._instance return cls._instance
def __init__(self): def __init__(self):
mic_path = os.path.dirname(__file__) wic_path = os.path.dirname(__file__)
eos = mic_path.find('scripts') + len('scripts') eos = wic_path.find('scripts') + len('scripts')
scripts_path = mic_path[:eos] scripts_path = wic_path[:eos]
self.scripts_path = scripts_path self.scripts_path = scripts_path
self.plugin_dir = scripts_path + PLUGIN_DIR self.plugin_dir = scripts_path + PLUGIN_DIR
self.layers_path = None self.layers_path = None
@@ -17,8 +17,8 @@
import os import os
import shutil import shutil
from mic import msger from wic import msger
from mic.utils import errors from wic.utils import errors
class _Plugin(object): class _Plugin(object):
class __metaclass__(type): class __metaclass__(type):
@@ -26,15 +26,15 @@ class _Plugin(object):
if not hasattr(cls, 'plugins'): if not hasattr(cls, 'plugins'):
cls.plugins = {} cls.plugins = {}
elif 'mic_plugin_type' in attrs: elif 'wic_plugin_type' in attrs:
if attrs['mic_plugin_type'] not in cls.plugins: if attrs['wic_plugin_type'] not in cls.plugins:
cls.plugins[attrs['mic_plugin_type']] = {} cls.plugins[attrs['wic_plugin_type']] = {}
elif hasattr(cls, 'mic_plugin_type') and 'name' in attrs: elif hasattr(cls, 'wic_plugin_type') and 'name' in attrs:
cls.plugins[cls.mic_plugin_type][attrs['name']] = cls cls.plugins[cls.wic_plugin_type][attrs['name']] = cls
def show_plugins(cls): def show_plugins(cls):
for cls in cls.plugins[cls.mic_plugin_type]: for cls in cls.plugins[cls.wic_plugin_type]:
print cls print cls
def get_plugins(cls): def get_plugins(cls):
@@ -42,11 +42,11 @@ class _Plugin(object):
class ImagerPlugin(_Plugin): class ImagerPlugin(_Plugin):
mic_plugin_type = "imager" wic_plugin_type = "imager"
class SourcePlugin(_Plugin): class SourcePlugin(_Plugin):
mic_plugin_type = "source" wic_plugin_type = "source"
""" """
The methods that can be implemented by --source plugins. The methods that can be implemented by --source plugins.
@@ -18,8 +18,7 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
# #
# DESCRIPTION # DESCRIPTION
# This implements the 'direct' imager plugin class for 'wic', based # This implements the 'direct' imager plugin class for 'wic'
# loosely on the raw imager plugin from 'mic'
# #
# AUTHORS # AUTHORS
# Tom Zanussi <tom.zanussi (at] linux.intel.com> # Tom Zanussi <tom.zanussi (at] linux.intel.com>
@@ -30,13 +29,13 @@ import shutil
import re import re
import tempfile import tempfile
from mic import msger from wic import msger
from mic.utils import misc, fs_related, errors, runner, cmdln from wic.utils import misc, fs_related, errors, runner, cmdln
from mic.conf import configmgr from wic.conf import configmgr
from mic.plugin import pluginmgr from wic.plugin import pluginmgr
import mic.imager.direct as direct import wic.imager.direct as direct
from mic.pluginbase import ImagerPlugin from wic.pluginbase import ImagerPlugin
class DirectPlugin(ImagerPlugin): class DirectPlugin(ImagerPlugin):
name = 'direct' name = 'direct'
@@ -29,14 +29,14 @@ import shutil
import re import re
import tempfile import tempfile
from mic import kickstart, msger from wic import kickstart, msger
from mic.utils import misc, fs_related, errors, runner, cmdln from wic.utils import misc, fs_related, errors, runner, cmdln
from mic.conf import configmgr from wic.conf import configmgr
from mic.plugin import pluginmgr from wic.plugin import pluginmgr
import mic.imager.direct as direct import wic.imager.direct as direct
from mic.pluginbase import SourcePlugin from wic.pluginbase import SourcePlugin
from mic.utils.oe.misc import * from wic.utils.oe.misc import *
from mic.imager.direct import DirectImageCreator from wic.imager.direct import DirectImageCreator
class BootimgEFIPlugin(SourcePlugin): class BootimgEFIPlugin(SourcePlugin):
name = 'bootimg-efi' name = 'bootimg-efi'
@@ -29,14 +29,14 @@ import shutil
import re import re
import tempfile import tempfile
from mic import kickstart, msger from wic import kickstart, msger
from mic.utils import misc, fs_related, errors, runner, cmdln from wic.utils import misc, fs_related, errors, runner, cmdln
from mic.conf import configmgr from wic.conf import configmgr
from mic.plugin import pluginmgr from wic.plugin import pluginmgr
import mic.imager.direct as direct import wic.imager.direct as direct
from mic.pluginbase import SourcePlugin from wic.pluginbase import SourcePlugin
from mic.utils.oe.misc import * from wic.utils.oe.misc import *
from mic.imager.direct import DirectImageCreator from wic.imager.direct import DirectImageCreator
class BootimgPcbiosPlugin(SourcePlugin): class BootimgPcbiosPlugin(SourcePlugin):
name = 'bootimg-pcbios' name = 'bootimg-pcbios'
@@ -30,14 +30,14 @@ import shutil
import re import re
import tempfile import tempfile
from mic import kickstart, msger from wic import kickstart, msger
from mic.utils import misc, fs_related, errors, runner, cmdln from wic.utils import misc, fs_related, errors, runner, cmdln
from mic.conf import configmgr from wic.conf import configmgr
from mic.plugin import pluginmgr from wic.plugin import pluginmgr
import mic.imager.direct as direct import wic.imager.direct as direct
from mic.pluginbase import SourcePlugin from wic.pluginbase import SourcePlugin
from mic.utils.oe.misc import * from wic.utils.oe.misc import *
from mic.imager.direct import DirectImageCreator from wic.imager.direct import DirectImageCreator
class RootfsPlugin(SourcePlugin): class RootfsPlugin(SourcePlugin):
name = 'rootfs' name = 'rootfs'
@@ -26,10 +26,10 @@ import string
import time import time
import uuid import uuid
from mic import msger from wic import msger
from mic.utils import runner from wic.utils import runner
from mic.utils.errors import * from wic.utils.errors import *
from mic.utils.oe.misc import * from wic.utils.oe.misc import *
def find_binary_path(binary): def find_binary_path(binary):
if os.environ.has_key("PATH"): if os.environ.has_key("PATH"):
@@ -1,5 +1,5 @@
# #
# OpenEmbedded mic utils library # OpenEmbedded wic utils library
# #
# Copyright (c) 2013, Intel Corporation. # Copyright (c) 2013, Intel Corporation.
# All rights reserved. # All rights reserved.
@@ -18,15 +18,15 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
# #
# DESCRIPTION # DESCRIPTION
# This module provides a place to collect various mic-related utils # This module provides a place to collect various wic-related utils
# for the OpenEmbedded Image Tools. # for the OpenEmbedded Image Tools.
# #
# AUTHORS # AUTHORS
# Tom Zanussi <tom.zanussi (at] linux.intel.com> # Tom Zanussi <tom.zanussi (at] linux.intel.com>
# #
from mic import msger from wic import msger
from mic.utils import runner from wic.utils import runner
def __exec_cmd(cmd_and_args, as_shell = False, catch = 3): def __exec_cmd(cmd_and_args, as_shell = False, catch = 3):
""" """
@@ -20,11 +20,11 @@
import os import os
from mic import msger from wic import msger
from mic.utils import runner from wic.utils import runner
from mic.utils.errors import ImageError from wic.utils.errors import ImageError
from mic.utils.fs_related import * from wic.utils.fs_related import *
from mic.utils.oe.misc import * from wic.utils.oe.misc import *
# Overhead of the MBR partitioning scheme (just one sector) # Overhead of the MBR partitioning scheme (just one sector)
MBR_OVERHEAD = 1 MBR_OVERHEAD = 1
@@ -18,7 +18,7 @@
import os import os
import subprocess import subprocess
from mic import msger from wic import msger
def runtool(cmdln_or_args, catch=1): def runtool(cmdln_or_args, catch=1):
""" wrapper for most of the subprocess calls """ wrapper for most of the subprocess calls