Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Ed Bartosh <ed.bartosh@linux.intel.com>
To: openembedded-core@lists.openembedded.org
Subject: [wic][PATCH 3/6] wic: Add new argument to direct plugin
Date: Tue, 23 Jun 2015 12:52:59 +0300	[thread overview]
Message-ID: <1435053182-8028-4-git-send-email-ed.bartosh@linux.intel.com> (raw)
In-Reply-To: <1435053182-8028-1-git-send-email-ed.bartosh@linux.intel.com>

Added 'compressor' argument to Direct plugin API to
pass a name of compressor utility.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>

diff --git a/scripts/lib/image/engine.py b/scripts/lib/image/engine.py
index 047c40d..d5c34b4 100644
--- a/scripts/lib/image/engine.py
+++ b/scripts/lib/image/engine.py
@@ -217,6 +217,7 @@ def wic_create(wks_file, rootfs_dir, bootimg_dir, kernel_dir,
         sys.exit(1)
 
     direct_args = list()
+    direct_args.insert(0, compressor or "")
     direct_args.insert(0, oe_builddir)
     direct_args.insert(0, image_output_dir)
     direct_args.insert(0, wks_file)
diff --git a/scripts/lib/wic/imager/direct.py b/scripts/lib/wic/imager/direct.py
index 2290ecd..f3f20e0 100644
--- a/scripts/lib/wic/imager/direct.py
+++ b/scripts/lib/wic/imager/direct.py
@@ -50,7 +50,7 @@ class DirectImageCreator(BaseImageCreator):
     """
 
     def __init__(self, oe_builddir, image_output_dir, rootfs_dir, bootimg_dir,
-                 kernel_dir, native_sysroot, creatoropts=None):
+                 kernel_dir, native_sysroot, compressor, creatoropts=None):
         """
         Initialize a DirectImageCreator instance.
 
diff --git a/scripts/lib/wic/plugins/imager/direct_plugin.py b/scripts/lib/wic/plugins/imager/direct_plugin.py
index 07811bd..db01c41 100644
--- a/scripts/lib/wic/plugins/imager/direct_plugin.py
+++ b/scripts/lib/wic/plugins/imager/direct_plugin.py
@@ -62,7 +62,7 @@ class DirectPlugin(ImagerPlugin):
         """
         Create direct image, called from creator as 'direct' cmd
         """
-        if len(args) != 7:
+        if len(args) != 8:
             raise errors.Usage("Extra arguments given")
 
         native_sysroot = args[0]
@@ -75,6 +75,7 @@ class DirectPlugin(ImagerPlugin):
 
         image_output_dir = args[5]
         oe_builddir = args[6]
+        compressor = args[7]
 
         krootfs_dir = cls.__rootfs_dir_to_dict(rootfs_dir)
 
@@ -86,6 +87,7 @@ class DirectPlugin(ImagerPlugin):
                                             bootimg_dir,
                                             kernel_dir,
                                             native_sysroot,
+                                            compressor,
                                             creatoropts)
 
         try:
-- 
2.1.4



  parent reply	other threads:[~2015-06-23  9:54 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-23  9:52 [wic][PATCH 0/6] Implemented image compressing: poky-contrib:ed/wic/compress-with Ed Bartosh
2015-06-23  9:52 ` [wic][PATCH 1/6] wic: Add --compress-with command line option Ed Bartosh
2015-06-23  9:52 ` [wic][PATCH 2/6] wic: Add new argument to wic_create function Ed Bartosh
2015-06-23  9:52 ` Ed Bartosh [this message]
2015-06-23  9:53 ` [wic][PATCH 4/6] wic: Implement image compressing Ed Bartosh
2015-06-23 11:22   ` Philip Balister
2015-06-24 15:23     ` Ed Bartosh
2015-06-27 22:20       ` João Henrique Ferreira de Freitas
2015-06-29 15:45         ` Philip Balister
2015-08-16  5:37       ` Khem Raj
2015-06-23  9:53 ` [wic][PATCH 5/6] wic: Make code more pythonic Ed Bartosh
2015-06-23  9:53 ` [wic][PATCH 6/6] wic: oe-selftest: Test image compressing Ed Bartosh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1435053182-8028-4-git-send-email-ed.bartosh@linux.intel.com \
    --to=ed.bartosh@linux.intel.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox