mirror of
https://git.yoctoproject.org/poky
synced 2026-02-08 01:36:38 +01:00
This new file just contain one function to return an OE package manager, this depends in the current packaging method. [YOCTO #8694] (From OE-Core rev: 9b4b150ccbcd2f7a0b27d083eb406578584af3fa) Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
30 lines
838 B
Python
30 lines
838 B
Python
def get_package_manager(d, root_path):
|
|
"""
|
|
Returns an OE package manager that can install packages in root_path.
|
|
"""
|
|
from oe.package_manager import RpmPM, OpkgPM, DpkgPM
|
|
|
|
pkg_class = d.getVar("IMAGE_PKGTYPE", True)
|
|
if pkg_class == "rpm":
|
|
pm = RpmPM(d,
|
|
root_path,
|
|
d.getVar('TARGET_VENDOR', True))
|
|
pm.create_configs()
|
|
|
|
elif pkg_class == "ipk":
|
|
pm = OpkgPM(d,
|
|
root_path,
|
|
d.getVar("IPKGCONF_TARGET", True),
|
|
d.getVar("ALL_MULTILIB_PACKAGE_ARCHS", True))
|
|
|
|
elif pkg_class == "deb":
|
|
pm = DpkgPM(d,
|
|
root_path,
|
|
d.getVar('PACKAGE_ARCHS', True),
|
|
d.getVar('DPKG_ARCH', True))
|
|
|
|
pm.write_index()
|
|
pm.update()
|
|
|
|
return pm
|