#10835]
Signed-off-by: Ed Bartosh
---
scripts/lib/wic/plugins/source/isoimage-isohybrid.py | 10 ++
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/scripts/lib/wic/plugins/source/isoimage-isohybrid.py
b/scripts/lib/wic/plugins/source/isoimage-isohybrid.py
index fd25190
Removed HDDDIR as it's not used by wic anymore.
Stopped usage of HDDDIR in wic test suite.
Signed-off-by: Ed Bartosh
---
meta/classes/image-wic.bbclass | 2 +-
meta/lib/oeqa/selftest/wic.py | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/meta/classes/image-wic.bb
Removed hddimg from IMAGE_FEATURES as wic code doesn't
use hddimg anymore.
[YOCTO #10835]
Signed-off-by: Ed Bartosh
---
meta/lib/oeqa/selftest/wic.py | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/meta/lib/oeqa/selftest/wic.py b/meta/lib/oeqa/selftest/wic.py
Added "iso" to IMAGE_FSTYPES to build iso artifacts required
to fix test of isoimage-isohybrid wic plugin.
Signed-off-by: Ed Bartosh
---
meta/lib/oeqa/selftest/wic.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/meta/lib/oeqa/selftest/wic.py b/meta/lib/oeq
Hi Jukka,
On Thu, Jan 26, 2017 at 05:43:33PM +0200, Jukka Laitinen wrote:
> Set proper gpt partition name for the partitions in case given
> in the configuration
>
> Signed-off-by: Jukka Laitinen
> ---
> scripts/lib/wic/utils/partitionedfs.py | 7 +++
> 1 file changed, 7 insertions(+)
>
>
17:27:30 +)
are available in the git repository at:
git://git.yoctoproject.org/poky-contrib ed/wic/wip
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=ed/wic/wip
Ed Bartosh (10):
image-wic: move wic code to image-wic.bbclass
wic: use INITRD_LIVE in isoimage-isohybrid
wic
There is a lot of wic code in image.bbclass and image_types.bbclass
Having all code separated in one file should make it more readable
and easier to maintain.
Signed-off-by: Ed Bartosh
---
meta/classes/image-wic.bbclass | 120 +++
meta/classes/image.bbclass
Removed HDDDIR as it's not used by wic anymore.
Stopped usage of HDDDIR in wic test suite.
Signed-off-by: Ed Bartosh
---
meta/classes/image-wic.bbclass | 2 +-
meta/lib/oeqa/selftest/wic.py | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/meta/classes/image-wic.bb
Renamed variable hdd_dir to deploy_dir as this variable is
assigned to the value of DEPLOY_DIR_IMAGE.
Signed-off-by: Ed Bartosh
---
scripts/lib/wic/plugins/source/isoimage-isohybrid.py | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/scripts/lib/wic/plugins/source
#10835]
Signed-off-by: Ed Bartosh
---
scripts/lib/wic/plugins/source/isoimage-isohybrid.py | 10 ++
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/scripts/lib/wic/plugins/source/isoimage-isohybrid.py
b/scripts/lib/wic/plugins/source/isoimage-isohybrid.py
index fd25190
INITRD variable is not set if hddimg is disabled.
isoimage-isohybrid can't get correct name for initrd if INITRD
variable is not set.
Added INITRD_LIVE to WICVARS and used it in isoimage-isohybrid
code to get initrd artifact name. Used INITRD if INITRD_LIVE is not set.
Signed-off-by: Ed Ba
nitrd image name.
Replaced MACHINE_ARCH->TRANSLATED_TARGET_ARCH in WICVARS variable to
make it available from .env file.
Signed-off-by: Ed Bartosh
---
meta/classes/image-wic.bbclass | 4 ++--
scripts/lib/wic/plugins/source/isoimage-isohybrid.py | 8
2 files ch
then wic will find them and place them in the image
Signed-off-by: Alejandro Hernandez
Signed-off-by: Tom Zanussi
Signed-off-by: Saul Wold
Signed-off-by: Ed Bartosh
---
meta/lib/oeqa/selftest/wic.py | 4 +--
scripts/lib/wic/plugins/source/bootimg-efi.py | 39
grub-efi recipe added 'grub-efi-' prefix to the file name of
efi binary. Changed grub-efi.bbclass accordingly.
Signed-off-by: Ed Bartosh
---
meta/classes/grub-efi.bbclass | 10 ++
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/meta/classes/grub-efi.bbclass b/me
Added systemd-boot to the list of dependencies of wic-tools
as wic bootimg-efi plugin depends on it.
Signed-off-by: Ed Bartosh
---
meta/recipes-core/meta/wic-tools.bb | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/meta/recipes-core/meta/wic-tools.bb
b/meta/recipes-core
Added "iso" to IMAGE_FSTYPES to build iso artifacts required
to fix test of isoimage-isohybrid wic plugin.
Signed-off-by: Ed Bartosh
---
meta/lib/oeqa/selftest/wic.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/meta/lib/oeqa/selftest/wic.py b/meta/lib/oeq
Removed hddimg from IMAGE_FEATURES as wic code doesn't
use hddimg anymore.
[YOCTO #10835]
Signed-off-by: Ed Bartosh
---
meta/lib/oeqa/selftest/wic.py | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/meta/lib/oeqa/selftest/wic.py b/meta/lib/oeqa/selftest/wic.py
th a dash in it.
>
Thanks for pointing out to it. Will fix it in the next versison of this
patchset.
> --
> Ola x Nilsson
>
> > -Original Message-
> > From: openembedded-core-boun...@lists.openembedded.org
> > [mailto:openembedded-core-boun...@lists.openembedded.org]
rit image_wic' is more explicit than IMAGE_CLASSES +=
"image_types"\n inherit ${IMAGE_CLASSES}
>
> On Fri, Jan 27, 2017 at 12:19 PM, Ed Bartosh
> wrote:
>
> > There is a lot of wic code in image.bbclass and image_types.bbclass
> > Having all code se
ES and it works just
fine. Why to change?
> On Mon, Jan 30, 2017 at 9:18 AM, Ed Bartosh
> wrote:
>
> > On Mon, Jan 30, 2017 at 09:27:54AM -0800, Rick Altherr wrote:
> > > Why didn't you make this image_types_wic.bbclass and use IMAGE_CLASSES to
> > > loa
mage.class and image_types.class then we can just drop this
patch. However, I personally find it more maintainable this way.
Suggesting people to change machine configs just because wic code is
moved to separate file doesn't look good to me either.
> On Mon, Jan 30, 2017 at 9:45 AM, Ed Bar
he same as 'inherit image_type_wic', just takes 2 lines, but
looks more consistent.
does this look ok?
> On Mon, Jan 30, 2017 at 10:15 AM, Ed Bartosh
> wrote:
>
> > On Mon, Jan 30, 2017 at 10:25:59AM -0800, Rick Altherr wrote:
> > > I'm not clear on which pa
19
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=ed/wic/refactoring-10619
Ed Bartosh (18):
wic: creator: stop using config manager
wic: direct_plugin: stop using config manager
wic: removed conf.py and empty config file.
wic: moved content of direct.py to direct_plugin
wic:
s and some never used functionality
like tmpfs for future use, which doesn't actually happen.
[YOCTO #10619]
Signed-off-by: Ed Bartosh
---
scripts/lib/wic/creator.py | 19 ---
1 file changed, 19 deletions(-)
diff --git a/scripts/lib/wic/creator.py b/scripts/lib/wic/creato
This move simplifies directory structure and makes
further refactoring easier. The code from direct.py was used
only in direct_plugin, so it's safe to move it there.
[YOCTO #10619]
Signed-off-by: Ed Bartosh
---
scripts/lib/wic/imager/__init__.py | 0
scripts/lib/wic/i
Removed as they're not used anymore in wic code.
Signed-off-by: Ed Bartosh
---
scripts/lib/wic/conf.py | 103
scripts/lib/wic/config/wic.conf | 6 ---
2 files changed, 109 deletions(-)
delete mode 100644 scripts/lib/wic/conf.py
delete
the
DirectImageCreator.
[YOCTO #10619]
Signed-off-by: Ed Bartosh
---
scripts/lib/wic/imager/direct.py| 10 +-
scripts/lib/wic/plugins/imager/direct_plugin.py | 22 +++---
2 files changed, 20 insertions(+), 12 deletions(-)
diff --git a/scripts/lib/wic
Replaced class method __rootfs_dir_to_dict with a list
comprehension.
[YOCTO #10619]
Signed-off-by: Ed Bartosh
---
scripts/lib/wic/plugins/imager/direct_plugin.py | 21 +
1 file changed, 5 insertions(+), 16 deletions(-)
diff --git a/scripts/lib/wic/plugins/imager
As this files is located in plugins/imager subdirectory it's
obvious that it's an imager plugin. Renamed to direct.py to
be consistent with plugin naming scheme.
[YOCTO #10619]
Signed-off-by: Ed Bartosh
---
scripts/lib/wic/plugins/imager/{direct_plugin.py => direct.py} | 0
1 fi
Removed unused methods.
Got rid of get_default_source_plugin and _full_name methods.
[YOCTO #10619]
Signed-off-by: Ed Bartosh
---
scripts/lib/wic/plugins/imager/direct_plugin.py | 24 ++--
1 file changed, 2 insertions(+), 22 deletions(-)
diff --git a/scripts/lib/wic
Fixed wrong continued indentation, unused import and
trailing new line pyling warnings.
[YOCTO #10619]
Signed-off-by: Ed Bartosh
---
scripts/lib/wic/plugins/imager/direct_plugin.py | 22 +++---
1 file changed, 7 insertions(+), 15 deletions(-)
diff --git a/scripts/lib/wic
Synchronized attribure names in DirectImageCreator and
DirectPlugin for better readability. Simplified code,
removed unneeded global variable disk_methods.
Signed-off-by: Ed Bartosh
---
scripts/lib/wic/plugins/imager/direct_plugin.py | 62 +
1 file changed, 22 insertions
This file is not used anywhere in the wic code.
[YOCTO #10619]
Signed-off-by: Ed Bartosh
---
scripts/lib/wic/test | 1 -
1 file changed, 1 deletion(-)
delete mode 100644 scripts/lib/wic/test
diff --git a/scripts/lib/wic/test b/scripts/lib/wic/test
deleted file mode 100644
index 9daeafb
Replaced parse_sourceparams function with list comprehension.
Used local variables instead of attributes.
Moved global variable to the local scope.
[YOCTO #10619]
Signed-off-by: Ed Bartosh
---
scripts/lib/wic/partition.py | 53 +++-
scripts/lib/wic/utils
Moved find_canned and get_custom_config APIs to engine module.
Removed empty wic.utils.misc module.
[YOCTO #10619]
Signed-off-by: Ed Bartosh
---
scripts/lib/wic/engine.py | 33 -
scripts/lib/wic/ksparser.py| 2 +-
scripts/lib/wic
This API is not used in wic code.
[YOCTO #10619]
Signed-off-by: Ed Bartosh
---
scripts/lib/wic/utils/misc.py | 39 ---
1 file changed, 39 deletions(-)
diff --git a/scripts/lib/wic/utils/misc.py b/scripts/lib/wic/utils/misc.py
index 1415ae9..7d09f6f 100644
The code deals with non-existing directory
and can be removed.
[YOCTO #10619]
Signed-off-by: Ed Bartosh
---
scripts/lib/wic/__init__.py | 4
1 file changed, 4 deletions(-)
diff --git a/scripts/lib/wic/__init__.py b/scripts/lib/wic/__init__.py
index 63c1d9c..e69de29 100644
--- a/scripts
Flattened directory structure:
moved wic/utils/oe/misc.py -> wic/utils/misc.py
[YOCTO #10619]
Signed-off-by: Ed Bartosh
---
scripts/lib/wic/engine.py| 4 ++--
scripts/lib/wic/partition.py | 4 ++--
scripts/lib/wic/plugin
Removed unused enable_logstderr and disable_logstderr APIs.
[YOCTO #10619]
Signed-off-by: Ed Bartosh
---
scripts/lib/wic/msger.py | 26 --
1 file changed, 26 deletions(-)
diff --git a/scripts/lib/wic/msger.py b/scripts/lib/wic/msger.py
index fb8336d..dc9b734 100644
Fixed indentation, unused imports, trailing lines etc.
[YOCTO #10619]
Signed-off-by: Ed Bartosh
---
scripts/lib/wic/__version__.py | 1 -
scripts/lib/wic/engine.py| 2 +-
scripts/lib/wic/help.py | 4 ++--
scripts
This module contains singe function serial_console_form_kargs, which
is used only by rootfs_pcbios_ext plugin. Moved it there and removed
syslinux module to make it easy to find and mainain plugin code.
[YOCTO #10619]
Signed-off-by: Ed Bartosh
---
.../lib/wic/plugins/source
BTW, to be consistent with this approach we also need to rename
image-live and image-vm, right? Actually, image-live name was the
reason for me to name image-wic.
On Mon, Jan 30, 2017 at 11:07:22AM -0800, Rick Altherr wrote:
> LGTM
>
> On Mon, Jan 30, 2017 at 10:42 AM, Ed Bartosh
Make name of the wic image type class consistent with
existing naming scheme for image types.
Signed-off-by: Ed Bartosh
---
meta/classes/image.bbclass | 5 +++--
meta/classes/{image-wic.bbclass => image_types_wic.bbclass} | 0
2 files changed, 3 insertions(+)
Removed hddimg from FSTYPES in wic test suite as
wic doesn't depend on hddimg anymore.
[YOCTO #10835]
Signed-off-by: Ed Bartosh
---
meta/lib/oeqa/selftest/wic.py | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/meta/lib/oeqa/selftest/wic.py b/meta/lib/oeqa/sel
d/wic/refactoring-10619
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=ed/wic/refactoring-10619
Ed Bartosh (3):
wic: engine: create output dir
wic: direct: fix creation of work directory
wic: get rid of image_output_dir variable
scripts/lib/wic/engine.py
Make sure output directory exists before creating an image.
Create it if it doesn't exist.
Signed-off-by: Ed Bartosh
---
scripts/lib/wic/engine.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/scripts/lib/wic/engine.py b/scripts/lib/wic/engine.py
index 592ef77..7fb6f13 100644
Used options.outdir instead of image_output_dir.
There is no sense to use extra variable for this.
Signed-off-by: Ed Bartosh
---
scripts/wic | 6 +-
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/scripts/wic b/scripts/wic
index 33355ee..17e8231 100755
--- a/scripts/wic
+++ b
space issues as mkdtemp uses
TMPDIR, TEMP or TMP environment variables to get default value
of its 'dir' parameter. Those variables are usually pointing
to /tmp, which is not the best location to create huge images.
Signed-off-by: Ed Bartosh
---
scripts/lib/wic/plugins/imager/direct.py
Removing task dependency do_wic -> do_bootimg as wic
doesn't depend on hddimg/booimg anymore.
Signed-off-by: Ed Bartosh
---
meta/classes/image_types_wic.bbclass | 5 -
1 file changed, 5 deletions(-)
diff --git a/meta/classes/image_types_wic.bbclass
b/meta/classes/image_types_wic
wic-tools recipe specific sysroot contains syslinux as wic-tools
depends on it. Used wic-tools target to get syslinux path should
guarantee that syslinux is installed there and can be used.
Signed-off-by: Ed Bartosh
---
scripts/lib/wic/plugins/source/isoimage-isohybrid.py | 2 +-
1 file changed
STAGING_DIR variable is used to get path to a boot dir.
It's better to use wic-tools recipe to it as it contains
all bootloader artifacts.
Modified test_build_artifacts and test_rootfs_artifacts to
use wic-tools target to get STAGING_DIR.
Signed-off-by: Ed Bartosh
---
meta/lib/oeqa/sel
Removed 'IMAGE_FSTYPES = "iso" as this functionality depends on
do_bootimg, which is going to be obsoleted soon.
As wic doesn't depend on bootimg it's safe to remove this.
Signed-off-by: Ed Bartosh
---
meta/lib/oeqa/selftest/wic.py | 6 +++---
1 file changed, 3 i
As syslinux module has been recently removed and
serial_consloe_form_kargs became local API in rootfs_pcbios_ext plugin
it should be called without syslinux. prefix.
Signed-off-by: Ed Bartosh
---
scripts/lib/wic/plugins/source/rootfs_pcbios_ext.py | 2 +-
1 file changed, 1 insertion(+), 1
into DirectPlugin
Changed APIs to use the same parameters names.
Passed parsed command line options as an object down the stack.
Signed-off-by: Ed Bartosh
---
scripts/lib/wic/creator.py | 106 --
scripts/lib/wic/engine.py| 32
On Mon, Feb 06, 2017 at 05:16:45PM +0100, Kristian Amlie wrote:
>
> Rebased and reran tests. Changes since last patchset:
>
> - Because of recipe specific sysroots we now need to import the PATH
> used by wic-tools into the test in order to use its tools.
>
> - Add specific '-o' parameter whil
instead of bash (2017-02-07 14:50:10 +)
are available in the git repository at:
git://git.yoctoproject.org/poky-contrib ed/wic/wip
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=ed/wic/wip
Ed Bartosh (9):
wic: partitionedfs: merged __format_disks and create
wic
3 lines long private method __add_partition is called only
from add_partition method. Merged them together to increase
readability.
Signed-off-by: Ed Bartosh
---
scripts/lib/wic/utils/partitionedfs.py | 14 --
1 file changed, 4 insertions(+), 10 deletions(-)
diff --git a/scripts
Private method __format_disks is called only from create
method making the code less readable. Merged the code
into one method.
Signed-off-by: Ed Bartosh
---
scripts/lib/wic/utils/partitionedfs.py | 15 +--
1 file changed, 5 insertions(+), 10 deletions(-)
diff --git a/scripts/lib
Renamed private methods with leading double underscores:
__create_partition -> _create_partition
__add_disk -> _add_disk
There is no point to have those names mangled, one underscore
is enough.
Signed-off-by: Ed Bartosh
---
scripts/lib/wic/utils/partitionedfs.py | 16
Replaced _get_parts getter with direct attribute
access to self.parts
Removed code that implicitly created partition
if there are no partitions mentioned in .wks file
Signed-off-by: Ed Bartosh
---
scripts/lib/wic/plugins/imager/direct.py | 36 +++-
1 file changed, 8
Partition attributes were copied to the dictionary in partitionedfs
code, which makes the code hard to follow.
Used partition object passed from direct.py module as is in
partitionedfs.
Signed-off-by: Ed Bartosh
---
scripts/lib/wic/partition.py | 2 +
scripts/lib/wic/plugins
Removed artificial _partitions_layed_out attribute and
unneeded call of layout_partitions method.
Signed-off-by: Ed Bartosh
---
scripts/lib/wic/utils/partitionedfs.py | 12
1 file changed, 12 deletions(-)
diff --git a/scripts/lib/wic/utils/partitionedfs.py
b/scripts/lib/wic/utils
Removed unused import of wic.errors module.
Signed-off-by: Ed Bartosh
---
scripts/lib/wic/plugins/imager/direct.py | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/scripts/lib/wic/plugins/imager/direct.py
b/scripts/lib/wic/plugins/imager/direct.py
index 7d6c59a..c399d47
There is no need to pass scripts_path from main wic module
down the stack as it's not used there.
Removed scripts_path argument from DirectPlugin class
and wic_create function.
Signed-off-by: Ed Bartosh
---
scripts/lib/wic/engine.py| 7 +++
scripts/lib/wic/plugins/i
Removed unused _disks, _disk_format and _disk_names
attributes from DirectPlugin class.
Signed-off-by: Ed Bartosh
---
scripts/lib/wic/plugins/imager/direct.py | 4
1 file changed, 4 deletions(-)
diff --git a/scripts/lib/wic/plugins/imager/direct.py
b/scripts/lib/wic/plugins/imager
-09 16:10:56 +0200)
are available in the git repository at:
git://git.yoctoproject.org/poky-contrib ed/wic/wip
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=ed/wic/wip
Ed Bartosh (13):
wic: move disk operations to PartitionImage class
wic: move PartitionedImage class to
files.
This functionality was removed. PartitionedImage works only with
one image. This makes the code less complex and easier to maintain.
Signed-off-by: Ed Bartosh
---
scripts/lib/wic/plugins/imager/direct.py | 97 ---
scripts/lib/wic/plugins/source/bootimg-pcbios.py
As PartitionedImage is only used in direct.py it makes sense
to move it there. It's easier to maintain (and refactor) it
this way.
Signed-off-by: Ed Bartosh
---
scripts/lib/wic/plugins/imager/direct.py | 278 +++-
scripts/lib/wic/utils/partitionedfs.py
Removed java-like setter set_bootimg_dir. It's more pythonic
to access public attributes directly.
Signed-off-by: Ed Bartosh
---
scripts/lib/wic/plugins/imager/direct.py | 9 -
scripts/lib/wic/plugins/source/bootimg-efi.py| 2 +-
scripts/lib/wic/plugins/source/bo
This file and utils/oe folder are not needed anymore as
all modules were removed or moved out of this directory.
Signed-off-by: Ed Bartosh
---
scripts/lib/wic/utils/oe/__init__.py | 22 --
1 file changed, 22 deletions(-)
delete mode 100644 scripts/lib/wic/utils/oe/__init__
Don't transform ImagerError exception into warning.
Let wic to catch it on the upper level.
Signed-off-by: Ed Bartosh
---
scripts/lib/wic/plugins/imager/direct.py | 5 +
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/scripts/lib/wic/plugins/imager/direct.py
b/scripts/li
lugin.
Signed-off-by: Ed Bartosh
---
scripts/lib/wic/plugins/imager/direct.py | 23 +++
1 file changed, 11 insertions(+), 12 deletions(-)
diff --git a/scripts/lib/wic/plugins/imager/direct.py
b/scripts/lib/wic/plugins/imager/direct.py
index ffe6c84..18cd277 100644
--- a/script
Moved code that calls prepare method of Partition objects
from DirectPlugin to PartitionedImage.prepare.
The idea is to have all code that works with partitions
in PartitionedImage class.
Signed-off-by: Ed Bartosh
---
scripts/lib/wic/plugins/imager/direct.py | 24 +++-
1
Moved setting of bootloader source from do_create method
to __init__ as it doesn't have anything to do with image
creation.
Signed-off-by: Ed Bartosh
---
scripts/lib/wic/plugins/imager/direct.py | 13 +++--
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/scripts/li
Moved the code that generates real partition numbers from DirectPlugin
to PartitionedImage.
The idea is to have all code that works with partitions
in PartitionedImage class.
Signed-off-by: Ed Bartosh
---
scripts/lib/wic/plugins/imager/direct.py | 26 +-
1 file changed
Moved creation of PartitionedImage object from DirectPlugin.create
method to init. It makes the code a bit more readable and logical.
Signed-off-by: Ed Bartosh
---
scripts/lib/wic/plugins/imager/direct.py | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/scripts/lib
Removed catching CreatorError and raising it again.
Signed-off-by: Ed Bartosh
---
scripts/lib/wic/plugins/imager/direct.py | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/scripts/lib/wic/plugins/imager/direct.py
b/scripts/lib/wic/plugins/imager/direct.py
index 9bcccb3
Set default value of --ondisk to 'sda' to ensure
we always have disk name for the partition.
This is a first step of replacing --ondisk with
disk attribute of .wks. This is better as
all partitions share the same disk.
Signed-off-by: Ed Bartosh
---
scripts/lib/wic/ksparser.py | 2
Replaced call of _get_part_num method with an attribute.
This eliminates the need to call the method and loop over
partitions every time we need to know realnum for partition.
Signed-off-by: Ed Bartosh
---
scripts/lib/wic/plugins/imager/direct.py | 46 ++--
1 file
c: direct: move creation of PartitionedImage to __init__ (2017-02-10
16:44:03 +0200)
are available in the git repository at:
git://git.yoctoproject.org/poky-contrib ed/wic/wip
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=ed/wic/wip
Ed Bartosh (11):
wic: setup logging in the
Replaced msger with wic logger in wic source plugins.
Signed-off-by: Ed Bartosh
---
scripts/lib/wic/plugins/source/bootimg-efi.py | 60 --
.../lib/wic/plugins/source/bootimg-partition.py| 28 ---
scripts/lib/wic/plugins/source/bootimg-pcbios.py | 41 +
scripts
Set up wic logger using standerd logging module.
This is going to replace custom msger module.
Signed-off-by: Ed Bartosh
---
scripts/wic | 77 +++--
1 file changed, 44 insertions(+), 33 deletions(-)
diff --git a/scripts/wic b/scripts/wic
Removed custom logger module msger as it's replaced
by wic logger.
Signed-off-by: Ed Bartosh
---
scripts/lib/wic/engine.py | 4 -
scripts/lib/wic/msger.py | 209 --
2 files changed, 213 deletions(-)
delete mode 100644 scripts/lib/wic/msg
Moved from lib/wic/utils/ to lib/wic as this is a core module.
Signed-off-by: Ed Bartosh
---
scripts/lib/wic/{utils => }/errors.py | 0
scripts/lib/wic/plugin.py | 4 ++--
scripts/lib/wic/plugins/imager/direct.py| 2 +-
scripts/lib/wic/plug
Replaced msger with wic logger in the direct plugin.
Signed-off-by: Ed Bartosh
---
scripts/lib/wic/plugins/imager/direct.py | 83 +---
1 file changed, 43 insertions(+), 40 deletions(-)
diff --git a/scripts/lib/wic/plugins/imager/direct.py
b/scripts/lib/wic/plugins
Replaced sys.exit with raising WicError in the core wic modules.
Signed-off-by: Ed Bartosh
---
scripts/lib/wic/engine.py | 21 ---
scripts/lib/wic/partition.py| 46 +++--
scripts/lib/wic/utils/misc.py | 6 +++---
scripts/lib/wic
Replaced msger with wic logger in the core wic modules.
Signed-off-by: Ed Bartosh
---
scripts/lib/wic/engine.py | 19 ++-
scripts/lib/wic/help.py | 8 +++--
scripts/lib/wic/ksparser.py | 7 ++--
scripts/lib/wic/partition.py| 72
There is no need to raise special exceptions. Raising
WicError should be enough.
Signed-off-by: Ed Bartosh
---
scripts/lib/wic/plugin.py | 4 ++--
scripts/lib/wic/plugins/imager/direct.py| 6 +++---
scripts/lib/wic/plugins/source/bootimg-pcbios.py| 4
Removed unused exceptions from error.py
Moved definition of WicError to lib/wic/__init__.py
Signed-off-by: Ed Bartosh
---
scripts/lib/wic/__init__.py| 20 +++
scripts/lib/wic/engine.py | 2 +-
scripts/lib/wic/errors.py
Replaced sys.exit with raising WicError in wic plugins.
Signed-off-by: Ed Bartosh
---
scripts/lib/wic/plugins/imager/direct.py | 6 +--
scripts/lib/wic/plugins/source/bootimg-efi.py | 32 +--
.../lib/wic/plugins/source/bootimg-partition.py| 11 ++--
scripts/lib/wic
Replaced sys.exit with raising WicError in main module.
Signed-off-by: Ed Bartosh
---
scripts/wic | 56 +++-
1 file changed, 23 insertions(+), 33 deletions(-)
diff --git a/scripts/wic b/scripts/wic
index b12c743..b8be5b8 100755
--- a/scripts
Hi Kristian,
Thank you for the patch. It looks good to me. Just one thing needs to be
changed. See my comment below.
On Thu, Feb 16, 2017 at 11:30:12AM +0100, Kristian Amlie wrote:
> We don't need the gap that the extended partition occupies if we
> already know that we have less than five partit
move WicError to lib/wic/__init__.py (2017-02-16 13:24:03 +0200)
are available in the git repository at:
git://git.yoctoproject.org/poky-contrib ed/wic/wip
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=ed/wic/wip
Ed Bartosh (10):
wic: use PluginMgr directly
wic: r
Instead of making a singleton object of PluginMgr class
it's simpler to use PluginMgr class directly as any class
is a singleton.
Signed-off-by: Ed Bartosh
---
scripts/lib/wic/engine.py| 6 +--
scripts/lib/wic/help.py | 4 +-
scripts/lib/wic/partiti
Simplified the implementation of get_plugin_methods:
- get rid of looping over the dicrtionary, used access by key instead
- get rid of filling a dictionary that passed as a parameter
Signed-off-by: Ed Bartosh
---
scripts/lib/wic/help.py | 2 +-
scripts/lib/wic/partition.py
Used more readable syntax to specify metaclass for
the base plugin classes.
Signed-off-by: Ed Bartosh
---
scripts/lib/wic/pluginbase.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/scripts/lib/wic/pluginbase.py b/scripts/lib/wic/pluginbase.py
index aea9c02..07ccf62
Removed all private methods and complicated logic.
Put all code to get plugins into get_plugins method.
Signed-off-by: Ed Bartosh
---
scripts/lib/wic/plugin.py | 99 +--
1 file changed, 27 insertions(+), 72 deletions(-)
diff --git a/scripts/lib/wic
Throw WicError if do_create method of imager plugin is
not implemented.
Signed-off-by: Ed Bartosh
---
scripts/lib/wic/pluginbase.py | 6 ++
1 file changed, 6 insertions(+)
diff --git a/scripts/lib/wic/pluginbase.py b/scripts/lib/wic/pluginbase.py
index 07ccf62..743170a 100644
--- a/scripts
Store results of PluginMgr.get_plugins to avoid
loading plugins more than once.
This should speed up finding plugins.
Signed-off-by: Ed Bartosh
---
scripts/lib/wic/plugin.py | 22 --
1 file changed, 12 insertions(+), 10 deletions(-)
diff --git a/scripts/lib/wic/plugin.py b
Call methods directly instead of getting them with
get_plugin_methods and then calling.
Signed-off-by: Ed Bartosh
---
scripts/lib/wic/help.py | 7 +--
scripts/lib/wic/partition.py | 20
scripts/lib/wic/plugin.py| 17
601 - 700 of 1100 matches
Mail list logo