break
# try to fix disable charsets/locales/locale-code compile fail
- if oe.utils.contains('DISTRO_FEATURES', 'libc-charsets', True, False, d) and \
- oe.utils.contains('DISTRO_FEATURES', 'libc-locales', True, False, d) and \
- oe.utils.contains('DISTRO_FEATURES', 'libc-locale-code', True, False, d):
+ if bb.utils.contains('DISTRO_FEATURES', 'libc-charsets', True, False, d) and \
+ bb.utils.contains('DISTRO_FEATURES', 'libc-locales', True, False, d) and \
+ bb.utils.contains('DISTRO_FEATURES', 'libc-locale-code', True, False, d):
d.setVar('PACKAGE_NO_GCONV', '0')
else:
d.setVar('PACKAGE_NO_GCONV', '1')
# If the distro features have systemd but not sysvinit, inhibit update-rcd
# from doing any work so that pure-systemd images don't have redundant init
# files.
- if oe.utils.contains('DISTRO_FEATURES', 'systemd', True, False, d):
+ if bb.utils.contains('DISTRO_FEATURES', 'systemd', True, False, d):
d.appendVar("DEPENDS", " systemd-systemctl-native")
- if not oe.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
+ if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1")
}
systemd_populate_packages[vardeps] += "systemd_prerm systemd_postinst"
python systemd_populate_packages() {
- if not oe.utils.contains('DISTRO_FEATURES', 'systemd', True, False, d):
+ if not bb.utils.contains('DISTRO_FEATURES', 'systemd', True, False, d):
return
def get_package_var(d, var, pkg):
python rm_systemd_unitdir (){
import shutil
- if not oe.utils.contains('DISTRO_FEATURES', 'systemd', True, False, d):
+ if not bb.utils.contains('DISTRO_FEATURES', 'systemd', True, False, d):
systemd_unitdir = oe.path.join(d.getVar("D", True), d.getVar('systemd_unitdir', True))
if os.path.exists(systemd_unitdir):
shutil.rmtree(systemd_unitdir)
import shutil
sysv_initddir = oe.path.join(d.getVar("D", True), (d.getVar('INIT_D_DIR', True) or "/etc/init.d"))
- if oe.utils.contains('DISTRO_FEATURES', 'systemd', True, False, d) and \
- not oe.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d) and \
+ if bb.utils.contains('DISTRO_FEATURES', 'systemd', True, False, d) and \
+ not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d) and \
os.path.exists(sysv_initddir):
systemd_unitdir = oe.path.join(d.getVar("D", True), d.getVar('systemd_unitdir', True), "system")
# Check that this class isn't being inhibited (generally, by
# systemd.bbclass) before doing any work.
- if oe.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d) and \
+ if bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d) and \
not d.getVar("INHIBIT_UPDATERCD_BBCLASS", True):
pkgs = d.getVar('INITSCRIPT_PACKAGES', True)
if pkgs == None:
return oe.utils.version_less_or_equal(variable, checkvalue, truevalue, falsevalue, d)
def base_contains(variable, checkvalues, truevalue, falsevalue, d):
- return oe.utils.contains(variable, checkvalues, truevalue, falsevalue, d)
+ return bb.utils.contains(variable, checkvalues, truevalue, falsevalue, d)
def base_both_contain(variable1, variable2, checkvalue, d):
return oe.utils.both_contain(variable1, variable2, checkvalue, d)
from abc import ABCMeta, abstractmethod
from oe.utils import execute_pre_post_process
-from oe.utils import contains as base_contains
from oe.package_manager import *
from oe.manifest import *
import oe.path
pass
def _insert_feed_uris(self):
- if base_contains("IMAGE_FEATURES", "package-management",
+ if bb.utils.contains("IMAGE_FEATURES", "package-management",
True, False, self.d):
self.pm.insert_feeds_uris()
execute_pre_post_process(self.d, post_process_cmds)
- if base_contains("IMAGE_FEATURES", "read-only-rootfs",
+ if bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs",
True, False, self.d):
delayed_postinsts = self._get_delayed_postinsts()
if delayed_postinsts is not None:
self._cleanup()
def _uninstall_uneeded(self):
- if base_contains("IMAGE_FEATURES", "package-management",
+ if bb.utils.contains("IMAGE_FEATURES", "package-management",
True, False, self.d):
return
else:
return falsevalue
-def contains(variable, checkvalues, truevalue, falsevalue, d):
- val = d.getVar(variable, True)
- if not val:
- return falsevalue
- val = set(val.split())
- if isinstance(checkvalues, basestring):
- checkvalues = set(checkvalues.split())
- else:
- checkvalues = set(checkvalues)
- if checkvalues.issubset(val):
- return truevalue
- return falsevalue
-
def both_contain(variable1, variable2, checkvalue, d):
if d.getVar(variable1,1).find(checkvalue) != -1 and d.getVar(variable2,1).find(checkvalue) != -1:
return checkvalue
INITSCRIPT_PARAMS = "start 02 5 3 2 . stop 20 0 1 6 ."
python __anonymous() {
- if not oe.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
+ if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1")
}
# As this package is tied to systemd, only build it when we're also building systemd.
python () {
- if not oe.utils.contains ('DISTRO_FEATURES', 'systemd', True, False, d):
+ if not bb.utils.contains ('DISTRO_FEATURES', 'systemd', True, False, d):
raise bb.parse.SkipPackage("'systemd' not in DISTRO_FEATURES")
}
INITSCRIPT_PARAMS_udev = "start 03 S ."
python __anonymous() {
- if not oe.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
+ if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1")
}
# As this recipe builds udev, respect systemd being in DISTRO_FEATURES so
# that we don't build both udev and systemd in world builds.
python () {
- if not oe.utils.contains ('DISTRO_FEATURES', 'systemd', True, False, d):
+ if not bb.utils.contains ('DISTRO_FEATURES', 'systemd', True, False, d):
raise bb.parse.SkipPackage("'systemd' not in DISTRO_FEATURES")
}
# As systemd also builds udev, skip this package if we're doing a systemd build.
python () {
- if oe.utils.contains ('DISTRO_FEATURES', 'systemd', True, False, d):
+ if bb.utils.contains ('DISTRO_FEATURES', 'systemd', True, False, d):
raise bb.parse.SkipPackage("'systemd' in DISTRO_FEATURES")
}
do_compile_ptest() {
inherit autotools gettext perlnative pkgconfig systemd
python () {
- if not oe.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
+ if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
pn = d.getVar('PN', True)
d.setVar('SYSTEMD_SERVICE_%s' % (pn), 'dpkg-configure.service')
}
get_gcc_fpu_setting[vardepvalue] = "${@get_gcc_fpu_setting(bb, d)}"
def get_gcc_mips_plt_setting(bb, d):
- if d.getVar('TRANSLATED_TARGET_ARCH', True) in [ 'mips', 'mipsel' ] and oe.utils.contains('DISTRO_FEATURES', 'mplt', True, False, d):
+ if d.getVar('TRANSLATED_TARGET_ARCH', True) in [ 'mips', 'mipsel' ] and bb.utils.contains('DISTRO_FEATURES', 'mplt', True, False, d):
return "--with-mips-plt"
return ""
"sparc": "--enable-targets=all",
}
- if oe.utils.contains('DISTRO_FEATURES', 'multiarch', True, False, d):
+ if bb.utils.contains('DISTRO_FEATURES', 'multiarch', True, False, d):
if target_arch in multiarch_options :
return multiarch_options[target_arch]
return ""
inherit autotools pkgconfig systemd
python () {
- if not oe.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
+ if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
pn = d.getVar('PN', True)
d.setVar('SYSTEMD_SERVICE_%s' % (pn), 'opkg-configure.service')
}
# Put all *.t files from the lib dir in the ptest package
# do_split_packages requires a pair of () in the regex, but we have nothing
# to match, so use an empty pair.
- if oe.utils.contains('DISTRO_FEATURES', 'ptest', True, False, d):
+ if bb.utils.contains('DISTRO_FEATURES', 'ptest', True, False, d):
do_split_packages(d, d.expand('${libdir}/perl/${PV}'), '.*\.t()',
'${PN}-ptest%s', '%s', recursive=True, match_path=True)
}
}
python () {
- if not oe.utils.contains ('DISTRO_FEATURES', 'opengl', True, False, d):
+ if not bb.utils.contains ('DISTRO_FEATURES', 'opengl', True, False, d):
raise bb.parse.SkipPackage("'opengl' not in DISTRO_FEATURES")
}