Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Alexander Kanavin <alexander.kanavin@linux.intel.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH 2/8] package_manager.py: move target_rootfs property to common ancestor class
Date: Tue,  3 Apr 2018 18:45:18 +0300	[thread overview]
Message-ID: <20180403154524.31588-2-alexander.kanavin@linux.intel.com> (raw)
In-Reply-To: <20180403154524.31588-1-alexander.kanavin@linux.intel.com>

This will be useful when also moving postinst_intercept handling to
package manager class from rootfs class.

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
---
 meta/lib/oe/package_manager.py | 16 +++++++---------
 1 file changed, 7 insertions(+), 9 deletions(-)

diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py
index e006dc6215d..e0a114c3325 100644
--- a/meta/lib/oe/package_manager.py
+++ b/meta/lib/oe/package_manager.py
@@ -326,8 +326,9 @@ class PackageManager(object, metaclass=ABCMeta):
     This is an abstract class. Do not instantiate this directly.
     """
 
-    def __init__(self, d):
+    def __init__(self, d, target_rootfs):
         self.d = d
+        self.target_rootfs = target_rootfs
         self.deploy_dir = None
         self.deploy_lock = None
 
@@ -585,8 +586,7 @@ class RpmPM(PackageManager):
                  os_var=None,
                  rpm_repo_workdir="oe-rootfs-repo",
                  filterbydependencies=True):
-        super(RpmPM, self).__init__(d)
-        self.target_rootfs = target_rootfs
+        super(RpmPM, self).__init__(d, target_rootfs)
         self.target_vendor = target_vendor
         self.task_name = task_name
         if arch_var == None:
@@ -919,11 +919,11 @@ class RpmPM(PackageManager):
 
 
 class OpkgDpkgPM(PackageManager):
-    def __init__(self, d):
+    def __init__(self, d, target_rootfs):
         """
         This is an abstract class. Do not instantiate this directly.
         """
-        super(OpkgDpkgPM, self).__init__(d)
+        super(OpkgDpkgPM, self).__init__(d, target_rootfs)
 
     def package_info(self, pkg, cmd):
         """
@@ -988,9 +988,8 @@ class OpkgDpkgPM(PackageManager):
 
 class OpkgPM(OpkgDpkgPM):
     def __init__(self, d, target_rootfs, config_file, archs, task_name='target'):
-        super(OpkgPM, self).__init__(d)
+        super(OpkgPM, self).__init__(d, target_rootfs)
 
-        self.target_rootfs = target_rootfs
         self.config_file = config_file
         self.pkg_archs = archs
         self.task_name = task_name
@@ -1367,8 +1366,7 @@ class OpkgPM(OpkgDpkgPM):
 
 class DpkgPM(OpkgDpkgPM):
     def __init__(self, d, target_rootfs, archs, base_archs, apt_conf_dir=None):
-        super(DpkgPM, self).__init__(d)
-        self.target_rootfs = target_rootfs
+        super(DpkgPM, self).__init__(d, target_rootfs)
         self.deploy_dir = self.d.getVar('DEPLOY_DIR_DEB')
         if apt_conf_dir is None:
             self.apt_conf_dir = self.d.expand("${APTCONF_TARGET}/apt")
-- 
2.16.1



  reply	other threads:[~2018-04-03 15:51 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-03 15:45 [PATCH 1/8] nativesdk-postinst-intercept: remove the recipe Alexander Kanavin
2018-04-03 15:45 ` Alexander Kanavin [this message]
2018-04-03 15:45 ` [PATCH 3/8] package_manager.py: move postinst_intercept dir initialization from RootFS to PackageManager class Alexander Kanavin
2018-04-03 15:45 ` [PATCH 4/8] package_manager.py: move intercept running logic from rootfs class " Alexander Kanavin
2018-04-03 15:45 ` [PATCH 5/8] package_manager.py: do not hardcode the task name when referring to log files Alexander Kanavin
2018-04-03 15:45 ` [PATCH 6/8] sdk.py: run postinst intercepts Alexander Kanavin
2018-04-03 15:45 ` [PATCH 7/8] gio-module-cache.bbclass: pass in ${libexecdir} Alexander Kanavin
2018-04-03 15:45 ` [PATCH 8/8] glib-2.0/glib.inc: apply MLPREFIX renaming to all package classes Alexander Kanavin
2018-04-03 16:03 ` ✗ patchtest: failure for "nativesdk-postinst-intercept: ..." and 7 more Patchwork

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=20180403154524.31588-2-alexander.kanavin@linux.intel.com \
    --to=alexander.kanavin@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