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

View File

@ -37,12 +37,12 @@ import subprocess
import shutil
import os, sys, errno
from mic import msger, creator
from mic.utils import cmdln, misc, errors
from mic.conf import configmgr
from mic.plugin import pluginmgr
from mic.__version__ import VERSION
from mic.utils.oe.misc import *
from wic import msger, creator
from wic.utils import cmdln, misc, errors
from wic.conf import configmgr
from wic.plugin import pluginmgr
from wic.__version__ import VERSION
from wic.utils.oe.misc import *
def verify_build_env():

View File

@ -144,7 +144,7 @@ DESCRIPTION
the corresponding artifacts are typically found in a normal
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
user needs to have set the appropriate MACHINE variable in
local.conf, and have sourced the build environment.
@ -349,12 +349,12 @@ DESCRIPTION
implementation that populates a corresponding partition.
A source plugin is created as a subclass of SourcePlugin (see
scripts/lib/mic/pluginbase.py) and the plugin file containing it
is added to scripts/lib/mic/plugins/source/ to make the plugin
scripts/lib/wic/pluginbase.py) and the plugin file containing it
is added to scripts/lib/wic/plugins/source/ to make the plugin
implementation available to the wic implementation.
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.
When the wic implementation needs to invoke a partition-specific

View File

@ -18,15 +18,15 @@
import os, sys, re
import ConfigParser
from mic import msger
from mic import kickstart
from mic.utils import misc, runner, errors
from wic import msger
from wic import kickstart
from wic.utils import misc, runner, errors
def get_siteconf():
mic_path = os.path.dirname(__file__)
eos = mic_path.find('scripts') + len('scripts')
scripts_path = mic_path[:eos]
wic_path = os.path.dirname(__file__)
eos = wic_path.find('scripts') + len('scripts')
scripts_path = wic_path[:eos]
return scripts_path + "/lib/image/config/wic.conf"

View File

@ -18,10 +18,10 @@
import os, sys, re
from optparse import SUPPRESS_HELP
from mic import msger
from mic.utils import cmdln, errors
from mic.conf import configmgr
from mic.plugin import pluginmgr
from wic import msger
from wic.utils import cmdln, errors
from wic.conf import configmgr
from wic.plugin import pluginmgr
class Creator(cmdln.Cmdln):
@ -34,7 +34,7 @@ class Creator(cmdln.Cmdln):
${option_list}
"""
name = 'mic create(cr)'
name = 'wic create(cr)'
def __init__(self, *args, **kwargs):
cmdln.Cmdln.__init__(self, *args, **kwargs)
@ -64,7 +64,7 @@ class Creator(cmdln.Cmdln):
help='Path of logfile')
optparser.add_option('-c', '--config', type='string', dest='config',
default=None,
help='Specify config file for mic')
help='Specify config file for wic')
optparser.add_option('-o', '--outdir', type='string', action='store',
dest='outdir', default=None,
help='Output directory')

View File

@ -21,10 +21,10 @@ import os, sys
import tempfile
import shutil
from mic import kickstart
from mic import msger
from mic.utils.errors import CreatorError
from mic.utils import misc, runner, fs_related as fs
from wic import kickstart
from wic import msger
from wic.utils.errors import CreatorError
from wic.utils import misc, runner, fs_related as fs
class BaseImageCreator(object):
"""Base class for image creation.
@ -34,7 +34,7 @@ class BaseImageCreator(object):
e.g.
import mic.imgcreate as imgcreate
import wic.imgcreate as imgcreate
ks = imgcreate.read_kickstart("foo.ks")
imgcreate.ImageCreator(ks, "foo").create()
"""

View File

@ -18,8 +18,7 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# DESCRIPTION
# This implements the 'direct' image creator class for 'wic', based
# loosely on the raw image creator from 'mic'
# This implements the 'direct' image creator class for 'wic'
#
# AUTHORS
# Tom Zanussi <tom.zanussi (at] linux.intel.com>
@ -29,13 +28,13 @@ import os
import stat
import shutil
from mic import kickstart, msger
from mic.utils import fs_related, runner, misc
from mic.utils.partitionedfs import Image
from mic.utils.errors import CreatorError, ImageError
from mic.imager.baseimager import BaseImageCreator
from mic.utils.oe.misc import *
from mic.plugin import pluginmgr
from wic import kickstart, msger
from wic.utils import fs_related, runner, misc
from wic.utils.partitionedfs import Image
from wic.utils.errors import CreatorError, ImageError
from wic.imager.baseimager import BaseImageCreator
from wic.utils.oe.misc import *
from wic.plugin import pluginmgr
disk_methods = {
"do_install_disk":None,

View File

@ -30,8 +30,8 @@ import pykickstart.version as ksversion
from pykickstart.handlers.control import commandMap
from pykickstart.handlers.control import dataMap
from mic import msger
from mic.utils import errors, misc, runner, fs_related as fs
from wic import msger
from wic.utils import errors, misc, runner, fs_related as fs
from custom_commands import wicboot, partition
def read_kickstart(path):

View File

@ -29,9 +29,9 @@ import os
import tempfile
from pykickstart.commands.partition import *
from mic.utils.oe.misc import *
from mic.kickstart.custom_commands import *
from mic.plugin import pluginmgr
from wic.utils.oe.misc import *
from wic.kickstart.custom_commands import *
from wic.plugin import pluginmgr
partition_methods = {
"do_stage_partition":None,

View File

@ -29,7 +29,7 @@ from pykickstart.errors import *
from pykickstart.options 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):
def __init__(self, writePriority=10, appendLine="", driveorder=None,

View File

@ -17,16 +17,16 @@
import os, sys
from mic import msger
from mic import pluginbase
from mic.utils import errors
from mic.utils.oe.misc import *
from wic import msger
from wic import pluginbase
from wic.utils import errors
from wic.utils.oe.misc import *
__ALL__ = ['PluginMgr', 'pluginmgr']
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
class PluginMgr(object):
@ -41,9 +41,9 @@ class PluginMgr(object):
return cls._instance
def __init__(self):
mic_path = os.path.dirname(__file__)
eos = mic_path.find('scripts') + len('scripts')
scripts_path = mic_path[:eos]
wic_path = os.path.dirname(__file__)
eos = wic_path.find('scripts') + len('scripts')
scripts_path = wic_path[:eos]
self.scripts_path = scripts_path
self.plugin_dir = scripts_path + PLUGIN_DIR
self.layers_path = None

View File

@ -17,8 +17,8 @@
import os
import shutil
from mic import msger
from mic.utils import errors
from wic import msger
from wic.utils import errors
class _Plugin(object):
class __metaclass__(type):
@ -26,15 +26,15 @@ class _Plugin(object):
if not hasattr(cls, 'plugins'):
cls.plugins = {}
elif 'mic_plugin_type' in attrs:
if attrs['mic_plugin_type'] not in cls.plugins:
cls.plugins[attrs['mic_plugin_type']] = {}
elif 'wic_plugin_type' in attrs:
if attrs['wic_plugin_type'] not in cls.plugins:
cls.plugins[attrs['wic_plugin_type']] = {}
elif hasattr(cls, 'mic_plugin_type') and 'name' in attrs:
cls.plugins[cls.mic_plugin_type][attrs['name']] = cls
elif hasattr(cls, 'wic_plugin_type') and 'name' in attrs:
cls.plugins[cls.wic_plugin_type][attrs['name']] = 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
def get_plugins(cls):
@ -42,11 +42,11 @@ class _Plugin(object):
class ImagerPlugin(_Plugin):
mic_plugin_type = "imager"
wic_plugin_type = "imager"
class SourcePlugin(_Plugin):
mic_plugin_type = "source"
wic_plugin_type = "source"
"""
The methods that can be implemented by --source plugins.

View File

@ -18,8 +18,7 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# DESCRIPTION
# This implements the 'direct' imager plugin class for 'wic', based
# loosely on the raw imager plugin from 'mic'
# This implements the 'direct' imager plugin class for 'wic'
#
# AUTHORS
# Tom Zanussi <tom.zanussi (at] linux.intel.com>
@ -30,13 +29,13 @@ import shutil
import re
import tempfile
from mic import msger
from mic.utils import misc, fs_related, errors, runner, cmdln
from mic.conf import configmgr
from mic.plugin import pluginmgr
from wic import msger
from wic.utils import misc, fs_related, errors, runner, cmdln
from wic.conf import configmgr
from wic.plugin import pluginmgr
import mic.imager.direct as direct
from mic.pluginbase import ImagerPlugin
import wic.imager.direct as direct
from wic.pluginbase import ImagerPlugin
class DirectPlugin(ImagerPlugin):
name = 'direct'

View File

@ -29,14 +29,14 @@ import shutil
import re
import tempfile
from mic import kickstart, msger
from mic.utils import misc, fs_related, errors, runner, cmdln
from mic.conf import configmgr
from mic.plugin import pluginmgr
import mic.imager.direct as direct
from mic.pluginbase import SourcePlugin
from mic.utils.oe.misc import *
from mic.imager.direct import DirectImageCreator
from wic import kickstart, msger
from wic.utils import misc, fs_related, errors, runner, cmdln
from wic.conf import configmgr
from wic.plugin import pluginmgr
import wic.imager.direct as direct
from wic.pluginbase import SourcePlugin
from wic.utils.oe.misc import *
from wic.imager.direct import DirectImageCreator
class BootimgEFIPlugin(SourcePlugin):
name = 'bootimg-efi'

View File

@ -29,14 +29,14 @@ import shutil
import re
import tempfile
from mic import kickstart, msger
from mic.utils import misc, fs_related, errors, runner, cmdln
from mic.conf import configmgr
from mic.plugin import pluginmgr
import mic.imager.direct as direct
from mic.pluginbase import SourcePlugin
from mic.utils.oe.misc import *
from mic.imager.direct import DirectImageCreator
from wic import kickstart, msger
from wic.utils import misc, fs_related, errors, runner, cmdln
from wic.conf import configmgr
from wic.plugin import pluginmgr
import wic.imager.direct as direct
from wic.pluginbase import SourcePlugin
from wic.utils.oe.misc import *
from wic.imager.direct import DirectImageCreator
class BootimgPcbiosPlugin(SourcePlugin):
name = 'bootimg-pcbios'

View File

@ -30,14 +30,14 @@ import shutil
import re
import tempfile
from mic import kickstart, msger
from mic.utils import misc, fs_related, errors, runner, cmdln
from mic.conf import configmgr
from mic.plugin import pluginmgr
import mic.imager.direct as direct
from mic.pluginbase import SourcePlugin
from mic.utils.oe.misc import *
from mic.imager.direct import DirectImageCreator
from wic import kickstart, msger
from wic.utils import misc, fs_related, errors, runner, cmdln
from wic.conf import configmgr
from wic.plugin import pluginmgr
import wic.imager.direct as direct
from wic.pluginbase import SourcePlugin
from wic.utils.oe.misc import *
from wic.imager.direct import DirectImageCreator
class RootfsPlugin(SourcePlugin):
name = 'rootfs'

View File

@ -26,10 +26,10 @@ import string
import time
import uuid
from mic import msger
from mic.utils import runner
from mic.utils.errors import *
from mic.utils.oe.misc import *
from wic import msger
from wic.utils import runner
from wic.utils.errors import *
from wic.utils.oe.misc import *
def find_binary_path(binary):
if os.environ.has_key("PATH"):

View File

@ -1,5 +1,5 @@
#
# OpenEmbedded mic utils library
# OpenEmbedded wic utils library
#
# Copyright (c) 2013, Intel Corporation.
# All rights reserved.

View File

@ -18,15 +18,15 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# 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.
#
# AUTHORS
# Tom Zanussi <tom.zanussi (at] linux.intel.com>
#
from mic import msger
from mic.utils import runner
from wic import msger
from wic.utils import runner
def __exec_cmd(cmd_and_args, as_shell = False, catch = 3):
"""

View File

@ -20,11 +20,11 @@
import os
from mic import msger
from mic.utils import runner
from mic.utils.errors import ImageError
from mic.utils.fs_related import *
from mic.utils.oe.misc import *
from wic import msger
from wic.utils import runner
from wic.utils.errors import ImageError
from wic.utils.fs_related import *
from wic.utils.oe.misc import *
# Overhead of the MBR partitioning scheme (just one sector)
MBR_OVERHEAD = 1

View File

@ -18,7 +18,7 @@
import os
import subprocess
from mic import msger
from wic import msger
def runtool(cmdln_or_args, catch=1):
""" wrapper for most of the subprocess calls