aboutsummaryrefslogtreecommitdiffstats
path: root/meta/classes/update-rc.d.bbclass
AgeCommit message (Expand)Author
2015-08-30update-rc.d.bbclass: explicitly dep on initscriptsChristopher Larson
2015-07-26updated-rc.d: Only add dependencies in target caseRichard Purdie
2015-07-25update-rc.d: Include updated-rc.d in DEPENDSRichard Purdie
2015-06-23meta: Add explict getVar param for (non) expansionRichard Purdie
2015-06-11update-rc.d.bbclass: add MLPREFIX when set RRECOMMENDSRobert Yang
2015-05-27update-rc.d: Improve RRECOMMENDS handlingRichard Purdie
2015-02-17update-rc.d: use '-f' option in updatercd_postrmChen Qi
2014-09-23update-rc.d/systemd: Remove OVERRIDES dependencyRichard Purdie
2014-09-03update-rc.d: fix logic in populate_packages_updatercdChen Qi
2014-06-10update-rc.d: Allow to use different initscripts providerMartin Jansa
2014-06-06update-rc.d/useradd: Add additional dependeciesSaul Wold
2014-05-11update-rc.d: Handle multilib case for initscriptsSaul Wold
2014-04-25Globally replace oe.utils.contains to bb.utils.containsOtavio Salvador
2014-02-20update-rc.d.bbclass: fix inhibit checkKai Kang
2014-02-12meta/recipes: Remove virtclass referencesRichard Purdie
2014-02-02update-rc.d: automatically rdepend on initscripts-funtionsChen Qi
2013-12-05classes/recipes: More optimal DISTRO_FEATURES referencesRichard Purdie
2013-10-31update-rc.d.bbclass: Cleanup package scriptsJacob Kroon
2013-10-29update-rc.d.bbclass: Fix host/target test in postinstJacob Kroon
2013-10-16update-rcd.bbclass: fix host/target testRoss Burton
2013-10-14update-rc: Stop and remove service if updating packageFelipe F. Tonello
2013-10-04udpated-rc.d: Track postinst/prerm/postrm in task checksumRichard Purdie
2013-05-09classes: Use modern exception raising syntaxRichard Purdie
2013-04-10update-rc.d: correctly look up the initscript params with overridesRoss Burton
2013-04-02update-rc.d, systemd: redirect also stderr from typeMartin Jansa
2013-03-26update-rc.d/systemd: change communication variable nameRoss Burton
2013-03-26update-rcd: drop depends to recommends, check for update-rcd in scriptsRoss Burton
2013-03-26update-rcd.bbclass: handle both sysvinit and systemd features being presentRoss Burton
2013-02-17classes: Drop none package specific packaging variable accessesRichard Purdie
2013-02-11update-rc.d: don't do anything if systemd.bbclass is inheritedRoss Burton
2013-02-08Revert: update-rc.d: disable update-rc.d.bbclass when systemd enabledSaul Wold
2013-01-20update-rc.d: disable update-rc.d.bbclass when systemd enabledRadu Moisan
2013-01-18update-rc.d:fix support postrm at image creation timeHongxu Jia
2012-11-02classes: replace virtclass-native(sdk) with class-native(sdk)Robert Yang
2012-07-19Convert tab indentation in python functions into four-spaceRichard Purdie
2012-03-05meta: Convert getVar/getVarFlag(xxx, 1) -> (xxx, True)Richard Purdie
2012-02-24update-rc.d.bbclass: do nothing for extended cross packagesOtavio Salvador
2011-12-16update-rc.d.bbclass: override UPDATERCD for nativesdkBernhard Guillon
2011-11-26getVar/setVar cleanupsRichard Purdie
2011-11-10Convert to use direct access to the data store (instead of bb.data.*Var*())Richard Purdie
2011-01-24update-rc.d.bbclass: Changed RDEPENDS for nativeSaul Wold
2010-12-30update-rc.d: Allow the primary deamon package to be specified in UPDATERCPN, ...Richard Purdie
2010-08-17update-rc.d.bbclass: adjust order on tweaking postinstKevin Tian
2009-11-16update-rc.d: Add native version, add native dependency to class, convert stag...Richard Purdie
2009-11-13classes: Remove and sanitise import statementsRichard Purdie
2009-01-07update-rc.d.bbclass: Only change the main package RDEPENDS, not all the RDEPE...Richard Purdie
2008-07-29update-rc.d.bbclass: add code at start of post install scripts so it will be ...Marcin Juszkiewicz
2007-08-06update-rc.d.bbclass: Tweak changeRichard Purdie
2007-08-06update-rc.d.bbclass: Stop the class corrupting the D variableRichard Purdie
2006-11-20classes: Sync with OE - mainly quoting fixes or other minor updatesRichard Purdie
>islink(self, path): """Test whether a path is a symbolic link""" st = self.calllstat(path) if not st: return False return statmod.S_ISLNK(st.st_mode) # Does a path exist? # This is false for dangling symbolic links on systems that support them. def exists(self, path): """Test whether a path exists. Returns False for broken symbolic links""" if self.callstat(path): return True return False def lexists(self, path): """Test whether a path exists. Returns True for broken symbolic links""" if self.calllstat(path): return True return False def stat(self, path): return self.callstat(path) def lstat(self, path): return self.calllstat(path) def walk(self, top, topdown=True, onerror=None, followlinks=False): # Matches os.walk, not os.path.walk() # We may not have read permission for top, in which case we can't # get a list of the files the directory contains. os.path.walk # always suppressed the exception then, rather than blow up for a # minor reason when (say) a thousand readable directories are still # left to visit. That logic is copied here. try: names = os.listdir(top) except os.error as err: if onerror is not None: onerror(err) return dirs, nondirs = [], [] for name in names: if self.isdir(os.path.join(top, name)): dirs.append(name) else: nondirs.append(name) if topdown: yield top, dirs, nondirs for name in dirs: new_path = os.path.join(top, name) if followlinks or not self.islink(new_path): for x in self.walk(new_path, topdown, onerror, followlinks): yield x if not topdown: yield top, dirs, nondirs ## realpath() related functions def __is_path_below(self, file, root): return (file + os.path.sep).startswith(root) def __realpath_rel(self, start, rel_path, root, loop_cnt, assume_dir): """Calculates real path of symlink 'start' + 'rel_path' below 'root'; no part of 'start' below 'root' must contain symlinks. """ have_dir = True for d in rel_path.split(os.path.sep): if not have_dir and not assume_dir: raise OSError(errno.ENOENT, "no such directory %s" % start) if d == os.path.pardir: # '..' if len(start) >= len(root): # do not follow '..' before root start = os.path.dirname(start) else: # emit warning? pass else: (start, have_dir) = self.__realpath(os.path.join(start, d), root, loop_cnt, assume_dir) assert(self.__is_path_below(start, root)) return start def __realpath(self, file, root, loop_cnt, assume_dir): while self.islink(file) and len(file) >= len(root): if loop_cnt == 0: raise OSError(errno.ELOOP, file) loop_cnt -= 1 target = os.path.normpath(os.readlink(file)) if not os.path.isabs(target): tdir = os.path.dirname(file) assert(self.__is_path_below(tdir, root)) else: tdir = root file = self.__realpath_rel(tdir, target, root, loop_cnt, assume_dir) try: is_dir = self.isdir(file) except: is_dir = False return (file, is_dir) def realpath(self, file, root, use_physdir = True, loop_cnt = 100, assume_dir = False): """ Returns the canonical path of 'file' with assuming a toplevel 'root' directory. When 'use_physdir' is set, all preceding path components of 'file' will be resolved first; this flag should be set unless it is guaranteed that there is no symlink in the path. When 'assume_dir' is not set, missing path components will raise an ENOENT error""" root = os.path.normpath(root) file = os.path.normpath(file) if not root.endswith(os.path.sep): # letting root end with '/' makes some things easier root = root + os.path.sep if not self.__is_path_below(file, root): raise OSError(errno.EINVAL, "file '%s' is not below root" % file) try: if use_physdir: file = self.__realpath_rel(root, file[(len(root) - 1):], root, loop_cnt, assume_dir) else: file = self.__realpath(file, root, loop_cnt, assume_dir)[0] except OSError as e: if e.errno == errno.ELOOP: # make ELOOP more readable; without catching it, there will # be printed a backtrace with 100s of OSError exceptions # else raise OSError(errno.ELOOP, "too much recursions while resolving '%s'; loop in '%s'" % (file, e.strerror)) raise return file