mirror of
https://git.yoctoproject.org/poky
synced 2026-02-07 17:26:36 +01:00
getVar() now defaults to expanding by default, thus remove the True option from getVar() calls with a regex search and replace. Search made with the following regex: getVar ?\(( ?[^,()]*), True\) (From OE-Core rev: 7c552996597faaee2fbee185b250c0ee30ea3b5f) Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
30 lines
802 B
Python
30 lines
802 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")
|
|
if pkg_class == "rpm":
|
|
pm = RpmPM(d,
|
|
root_path,
|
|
d.getVar('TARGET_VENDOR'))
|
|
pm.create_configs()
|
|
|
|
elif pkg_class == "ipk":
|
|
pm = OpkgPM(d,
|
|
root_path,
|
|
d.getVar("IPKGCONF_TARGET"),
|
|
d.getVar("ALL_MULTILIB_PACKAGE_ARCHS"))
|
|
|
|
elif pkg_class == "deb":
|
|
pm = DpkgPM(d,
|
|
root_path,
|
|
d.getVar('PACKAGE_ARCHS'),
|
|
d.getVar('DPKG_ARCH'))
|
|
|
|
pm.write_index()
|
|
pm.update()
|
|
|
|
return pm
|