Commit Graph

33 Commits

Author SHA1 Message Date
Richard Purdie 479fcbfd30 udpated-rc.d: Track postinst/prerm/postrm in task checksum
When these functions change, the package should rebuild but currently it
does not. We need to add the dependencies manually as the dependency
code can't track dynamically created variables.

(From OE-Core rev: 4003218f774c38bb5de0d95a43153f8b8d7fc4ce)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-07 09:37:31 +01:00
Richard Purdie db8217f6b8 classes: Use modern exception raising syntax
Modern expection rasing syntax is function call format, convert to this
to keep python 3 happy and model correct coding style in the core.

(From OE-Core rev: f4b382754603d3f1caa13824bcc8d06b568bbc59)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-09 14:06:50 +01:00
Ross Burton 8cab6d76f8 update-rc.d: correctly look up the initscript params with overrides
The creation of a clone of d with extra OVERRIDES was removed in
72c1fd72d3b479c728e249eaa763116d352e945b but some of the lookups are essential
so that variables such as ${INITSCRIPT_PARAMS} get overriden and resolved
correctly on a per-package basis.

[ YOCTO #3960 ]

(From OE-Core rev: b016bc9aaabc90fe4dc98af8c5e73dfcb4526ef4)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-10 12:56:52 +01:00
Martin Jansa c0910f26ea update-rc.d, systemd: redirect also stderr from type
* different shells different behavior?
  bash prints 'type: update-rc.d: not found' on stderr
  busybox's sh on stdout

(From OE-Core rev: 45e22312c48b23480bd6dff98702b0691a48f7d1)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-02 18:16:24 +01:00
Ross Burton d82e303921 update-rc.d/systemd: change communication variable name
Rename SYSTEMD_BBCLASS_ENABLED to INHIBIT_UPDATERCD_BBCLASS to reflect the
action, for clarity.

(From OE-Core rev: cf43320c343437659aee94acd005bf7712f273cd)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-26 22:43:03 +00:00
Ross Burton 49ae578774 update-rcd: drop depends to recommends, check for update-rcd in scripts
(From OE-Core rev: 2c403979c03898c679c5a1e1092aec784dbeb77c)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-26 22:43:03 +00:00
Ross Burton 55ba8ea863 update-rcd.bbclass: handle both sysvinit and systemd features being present
Run the helper if the sysvinit feature is present, or if the systemd feature is
present but the systemd class hasn't been inherited.  We want to run in the
latter case as systemd has sysvinit compatibility, but we don't want to always
run so that pure systemd images don't have redundant sysvinit files.

(From OE-Core rev: a3856ab19f1d4ae312f559521785ad4384700729)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-26 22:43:03 +00:00
Richard Purdie 069a332d1c classes: Drop none package specific packaging variable accesses
(From OE-Core rev: 24cbe88429ba021d7c461e0271b67106d11d5eb2)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-17 22:32:03 +00:00
Ross Burton 3936cef145 update-rc.d: don't do anything if systemd.bbclass is inherited
We need the update-rc.d class to work when systemd is being used so that
packages that only have SysV init scripts still work.  However if a recipe
supports both we don't want to install SysV and systemd files under systemd.

To solve this, before doing real work in update-rc.d check if the systemd class
has been inherited and don't do anything if it has.

(From OE-Core rev: 0273a22fec3c9360df2510b759c5bf9af610551f)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-11 14:46:10 +00:00
Saul Wold d69d193a96 Revert: update-rc.d: disable update-rc.d.bbclass when systemd enabled
This was just wrong - when systemd is being used there'll still be packages that
use SysV-style init scripts, which systemd supports fine.

This reverts commit b94227f729.

(From OE-Core rev: 3f50b61c77406f87d36437cca53573f86f314641)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-08 14:50:36 +00:00
Radu Moisan b94227f729 update-rc.d: disable update-rc.d.bbclass when systemd enabled
update-rc.d is not necessary when systemd is enabled,
systemctl is the replacement

(From OE-Core rev: eaa82c842d3197e0251a887ba16028c22f9d8d94)

Signed-off-by: Radu Moisan <radu.moisan@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-20 12:58:55 +00:00
Hongxu Jia ee5333b0bd update-rc.d:fix support postrm at image creation time
updatercd_postrm failed at image creation time because "-f -r ${D}" is not
used as update-rc.d's option.

[YOCTO #3633]

(From OE-Core rev: deb8ac868a989f41c0664312a5fb855358be2296)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-18 13:28:08 +00:00
Robert Yang 51c7ad682f classes: replace virtclass-native(sdk) with class-native(sdk)
The overrides virtclass-native and virtclass-nativesdk are deprecated,
which should be replaced by class-native and class-nativesdk.

[YOCTO #3297]

(From OE-Core rev: 9fbeab63315fef0dbcc91c5e7051665764758a6e)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-02 16:18:27 +00:00
Richard Purdie bfd279de32 Convert tab indentation in python functions into four-space
(From OE-Core rev: 604d46c686d06d62d5a07b9c7f4fa170f99307d8)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-19 10:24:50 +01:00
Richard Purdie 06f2f8ce0a meta: Convert getVar/getVarFlag(xxx, 1) -> (xxx, True)
Using "1" with getVar is bad coding style and "True" is preferred.
This patch is a sed over the meta directory of the form:

sed \
 -e 's:\(\.getVar([^,()]*, \)1 *):\1True):g' \
 -e 's:\(\.getVarFlag([^,()]*, [^,()]*, \)1 *):\1True):g' \
 -i `grep -ril getVar *`

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-05 10:22:56 -08:00
Otavio Salvador 5aca6a7e94 update-rc.d.bbclass: do nothing for extended cross packages
(From OE-Core rev: a1f23a7cc527afdd1ce6cc7cd6083ee78fde09b3)

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-02-24 00:47:51 +00:00
Bernhard Guillon 45d3f0c801 update-rc.d.bbclass: override UPDATERCD for nativesdk
Override UPDATERCD for nativesdk.
Without, update-rc.d is installed to /usr/sbin/update-rc.d
with meta-toolchain if nativesdk recipe inherits update-rc.d. An
example recipe for this is dbus.

(From OE-Core rev: bf10cc692491acd615b503779c44e6d7ab3ffe68)

Signed-off-by: Bernhard Guillon <Bernhard.Guillon@hale.at>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-12-16 16:12:46 +00:00
Richard Purdie 0a434ac101 getVar/setVar cleanups
Complete the bb.data.getVar/setVar replacements with accesses
directly to the data store object.

(From OE-Core rev: 2864ff6a4b3c3f9b3bbb6d2597243cc5d3715939)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-11-27 10:25:34 +00:00
Richard Purdie c8dee9b92d Convert to use direct access to the data store (instead of bb.data.*Var*())
This is the result of running the following over the metadata:

sed \
-e 's:bb.data.\(setVar([^,()]*,[^,()]*\), *\([^ )]*\) *):\2.\1):g' \
-e 's:bb.data.\(setVarFlag([^,()]*,[^,()]*,[^,()]*\), *\([^) ]*\) *):\2.\1):g' \
-e 's:bb.data.\(getVar([^,()]*\), *\([^(), ]*\) *,\([^)]*\)):\2.\1,\3):g' \
-e 's:bb.data.\(getVarFlag([^,()]*,[^,()]*\), *\([^(), ]*\) *,\([^)]*\)):\2.\1,\3):g' \
-e 's:bb.data.\(getVarFlag([^,()]*,[^,()]*\), *\([^() ]*\) *):\2.\1):g' \
-e 's:bb.data.\(getVar([^,()]*\), *\([^) ]*\) *):\2.\1):g' \
-i `grep -ril bb.data *`

(From OE-Core rev: b22831fd63164c4db9c0b72934d7d734a6585251)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-11-10 11:51:19 +00:00
Saul Wold e144427cb9 update-rc.d.bbclass: Changed RDEPENDS for native
Signed-off-by: Saul Wold <sgw@linux.intel.com>
2011-01-24 14:09:14 -08:00
Richard Purdie 8e7680b629 update-rc.d: Allow the primary deamon package to be specified in UPDATERCPN, update gsmd to use this
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-12-30 10:03:10 +00:00
Kevin Tian 54d6d75445 update-rc.d.bbclass: adjust order on tweaking postinst
So far unlike prerm/postrm, update-rc.d has its own postinst method prepended
to pkg_postinst, which may result "System startup links for xxx already exist"
warning in the 1st boot of target image. Some pkg_postinst requires to run on
the target, and thus prepend here makes update-rc.d method executed twice: one
in rootfs creation and the other in the 1st target boot. So adjust the order
to append.

Signed-off-by: Kevin Tian <kevin.tian@intel.com>
2010-08-17 22:57:33 +01:00
Richard Purdie 668ae67a4f update-rc.d: Add native version, add native dependency to class, convert staging function
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2009-11-16 22:00:22 +00:00
Richard Purdie c54117458a classes: Remove and sanitise import statements
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2009-11-13 12:15:28 +00:00
Richard Purdie 0341841061 update-rc.d.bbclass: Only change the main package RDEPENDS, not all the RDEPENDS as this affects things like the -doc packages 2009-01-07 16:30:28 +00:00
Marcin Juszkiewicz 5e12400fcb update-rc.d.bbclass: add code at start of post install scripts so it will be called on host
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@4976 311d38ba-8fff-0310-9ca6-ca027cbcb966
2008-07-29 10:12:13 +00:00
Richard Purdie 9933215adf update-rc.d.bbclass: Tweak change
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@2370 311d38ba-8fff-0310-9ca6-ca027cbcb966
2007-08-06 07:34:52 +00:00
Richard Purdie e03c1d25ca update-rc.d.bbclass: Stop the class corrupting the D variable
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@2369 311d38ba-8fff-0310-9ca6-ca027cbcb966
2007-08-06 07:33:58 +00:00
Richard Purdie e09dab0614 classes: Sync with OE - mainly quoting fixes or other minor updates
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@885 311d38ba-8fff-0310-9ca6-ca027cbcb966
2006-11-20 15:19:39 +00:00
Ross Burton 99498a127e Fix whitespace
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@883 311d38ba-8fff-0310-9ca6-ca027cbcb966
2006-11-20 14:58:47 +00:00
Richard Purdie 9101515a49 update-rc.d.bbclass: 'Fix' whitespace
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@881 311d38ba-8fff-0310-9ca6-ca027cbcb966
2006-11-20 14:37:01 +00:00
Richard Purdie 8aee6b32a0 classes: Standardise whitespace in anonymous python methods and factor out functions for more efficent use by bitbake (as also patched in OE)
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@875 311d38ba-8fff-0310-9ca6-ca027cbcb966
2006-11-20 09:16:34 +00:00
Richard Purdie b2f192faab Rename /openembedded/ -> /meta/
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@530 311d38ba-8fff-0310-9ca6-ca027cbcb966
2006-07-21 10:10:31 +00:00