summaryrefslogtreecommitdiffstats
path: root/meta/lib/oe/package_manager.py
diff options
context:
space:
mode:
authorAlexander Kanavin <alexander.kanavin@linux.intel.com>2018-04-03 18:45:18 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-04-05 14:49:07 +0100
commitb224c4e1526f6b2c574c19a7782b90e456e64f6d (patch)
treed9e32ae0eaf6eff6e7d19d2a3aa23c377bfdd5d9 /meta/lib/oe/package_manager.py
parentf2a19a7fd1bf38ba37ca54fd03ec8b238862ea17 (diff)
downloadpoky-b224c4e1526f6b2c574c19a7782b90e456e64f6d.tar.gz
package_manager.py: move target_rootfs property to common ancestor class
This will be useful when also moving postinst_intercept handling to package manager class from rootfs class. (From OE-Core rev: a4cd69bdd5b9dfa1125887f4d9038d41996e39c7) Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oe/package_manager.py')
-rw-r--r--meta/lib/oe/package_manager.py16
1 files changed, 7 insertions, 9 deletions
diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py
index 9f22fb0ecc..a568b2a41a 100644
--- a/meta/lib/oe/package_manager.py
+++ b/meta/lib/oe/package_manager.py
@@ -326,8 +326,9 @@ class PackageManager(object, metaclass=ABCMeta):
326 This is an abstract class. Do not instantiate this directly. 326 This is an abstract class. Do not instantiate this directly.
327 """ 327 """
328 328
329 def __init__(self, d): 329 def __init__(self, d, target_rootfs):
330 self.d = d 330 self.d = d
331 self.target_rootfs = target_rootfs
331 self.deploy_dir = None 332 self.deploy_dir = None
332 self.deploy_lock = None 333 self.deploy_lock = None
333 334
@@ -585,8 +586,7 @@ class RpmPM(PackageManager):
585 os_var=None, 586 os_var=None,
586 rpm_repo_workdir="oe-rootfs-repo", 587 rpm_repo_workdir="oe-rootfs-repo",
587 filterbydependencies=True): 588 filterbydependencies=True):
588 super(RpmPM, self).__init__(d) 589 super(RpmPM, self).__init__(d, target_rootfs)
589 self.target_rootfs = target_rootfs
590 self.target_vendor = target_vendor 590 self.target_vendor = target_vendor
591 self.task_name = task_name 591 self.task_name = task_name
592 if arch_var == None: 592 if arch_var == None:
@@ -919,11 +919,11 @@ class RpmPM(PackageManager):
919 919
920 920
921class OpkgDpkgPM(PackageManager): 921class OpkgDpkgPM(PackageManager):
922 def __init__(self, d): 922 def __init__(self, d, target_rootfs):
923 """ 923 """
924 This is an abstract class. Do not instantiate this directly. 924 This is an abstract class. Do not instantiate this directly.
925 """ 925 """
926 super(OpkgDpkgPM, self).__init__(d) 926 super(OpkgDpkgPM, self).__init__(d, target_rootfs)
927 927
928 def package_info(self, pkg, cmd): 928 def package_info(self, pkg, cmd):
929 """ 929 """
@@ -988,9 +988,8 @@ class OpkgDpkgPM(PackageManager):
988 988
989class OpkgPM(OpkgDpkgPM): 989class OpkgPM(OpkgDpkgPM):
990 def __init__(self, d, target_rootfs, config_file, archs, task_name='target'): 990 def __init__(self, d, target_rootfs, config_file, archs, task_name='target'):
991 super(OpkgPM, self).__init__(d) 991 super(OpkgPM, self).__init__(d, target_rootfs)
992 992
993 self.target_rootfs = target_rootfs
994 self.config_file = config_file 993 self.config_file = config_file
995 self.pkg_archs = archs 994 self.pkg_archs = archs
996 self.task_name = task_name 995 self.task_name = task_name
@@ -1367,8 +1366,7 @@ class OpkgPM(OpkgDpkgPM):
1367 1366
1368class DpkgPM(OpkgDpkgPM): 1367class DpkgPM(OpkgDpkgPM):
1369 def __init__(self, d, target_rootfs, archs, base_archs, apt_conf_dir=None): 1368 def __init__(self, d, target_rootfs, archs, base_archs, apt_conf_dir=None):
1370 super(DpkgPM, self).__init__(d) 1369 super(DpkgPM, self).__init__(d, target_rootfs)
1371 self.target_rootfs = target_rootfs
1372 self.deploy_dir = self.d.getVar('DEPLOY_DIR_DEB') 1370 self.deploy_dir = self.d.getVar('DEPLOY_DIR_DEB')
1373 if apt_conf_dir is None: 1371 if apt_conf_dir is None:
1374 self.apt_conf_dir = self.d.expand("${APTCONF_TARGET}/apt") 1372 self.apt_conf_dir = self.d.expand("${APTCONF_TARGET}/apt")