<feed xmlns='http://www.w3.org/2005/Atom'>
<title>openembedded-core.git/meta/classes/update-rc.d.bbclass, branch pyro</title>
<subtitle>Mirror of openembedded-core</subtitle>
<link rel='alternate' type='text/html' href='https://git.multitech.net/cgit/openembedded-core.git/'/>
<entry>
<title>classes: Drop now unneeded update_data calls</title>
<updated>2017-02-15T17:29:41+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2017-02-09T17:11:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.multitech.net/cgit/openembedded-core.git/commit/?id=8de0c5d3bd01919e2bf0394f9c485936d6098cec'/>
<id>8de0c5d3bd01919e2bf0394f9c485936d6098cec</id>
<content type='text'>
Now that the datastore works dynamically we don't need the update_data calls
so we can just remove them. They're not actually done anything at all for
a while.

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Now that the datastore works dynamically we don't need the update_data calls
so we can just remove them. They're not actually done anything at all for
a while.

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>update-rc.d: Add PACKAGE_WRITE_DEPS for postinst</title>
<updated>2017-01-19T22:51:09+00:00</updated>
<author>
<name>Jussi Kukkonen</name>
<email>jussi.kukkonen@intel.com</email>
</author>
<published>2017-01-19T08:39:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.multitech.net/cgit/openembedded-core.git/commit/?id=0db5328ee2a80152904b9f82b738f92e9e38da55'/>
<id>0db5328ee2a80152904b9f82b738f92e9e38da55</id>
<content type='text'>
use_updatercd() will always return true in rootfs generation so
checking that is not required.

Signed-off-by: Jussi Kukkonen &lt;jussi.kukkonen@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
use_updatercd() will always return true in rootfs generation so
checking that is not required.

Signed-off-by: Jussi Kukkonen &lt;jussi.kukkonen@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>classes: Fix alternatives and rc.d ordering</title>
<updated>2017-01-09T13:27:01+00:00</updated>
<author>
<name>David Vincent</name>
<email>freesilicon@gmail.com</email>
</author>
<published>2016-12-20T09:47:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.multitech.net/cgit/openembedded-core.git/commit/?id=aa87b1a4dcc14e4dfe719b6c55045c5662bc59c2'/>
<id>aa87b1a4dcc14e4dfe719b6c55045c5662bc59c2</id>
<content type='text'>
When using an alternative as an initscript, the ordering between
update-rc.d and update-alternatives tasks during prerm and postinst
tasks must always be the following in order to work:
  * prerm:
    - stop daemon
    - remove alternative

  * postinst:
    - add alternative
    - start daemon

This patchset adds comments to the scripts generated by both classes and
organize the generated sections based on those comments.

[YOCTO #10433]

Changes since v5:
    - Remove boolean in d.getVar() calls

Signed-off-by: David Vincent &lt;freesilicon@gmail.com&gt;
Signed-off-by: Ross Burton &lt;ross.burton@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When using an alternative as an initscript, the ordering between
update-rc.d and update-alternatives tasks during prerm and postinst
tasks must always be the following in order to work:
  * prerm:
    - stop daemon
    - remove alternative

  * postinst:
    - add alternative
    - start daemon

This patchset adds comments to the scripts generated by both classes and
organize the generated sections based on those comments.

[YOCTO #10433]

Changes since v5:
    - Remove boolean in d.getVar() calls

Signed-off-by: David Vincent &lt;freesilicon@gmail.com&gt;
Signed-off-by: Ross Burton &lt;ross.burton@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>meta: remove True option to getVar calls</title>
<updated>2016-12-16T08:30:03+00:00</updated>
<author>
<name>Joshua Lock</name>
<email>joshua.g.lock@intel.com</email>
</author>
<published>2016-12-14T21:13:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.multitech.net/cgit/openembedded-core.git/commit/?id=7c552996597faaee2fbee185b250c0ee30ea3b5f'/>
<id>7c552996597faaee2fbee185b250c0ee30ea3b5f</id>
<content type='text'>
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\)

Signed-off-by: Joshua Lock &lt;joshua.g.lock@intel.com&gt;
Signed-off-by: Ross Burton &lt;ross.burton@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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\)

Signed-off-by: Joshua Lock &lt;joshua.g.lock@intel.com&gt;
Signed-off-by: Ross Burton &lt;ross.burton@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>update-rc.d: ignore initscript in prerm and preinst when systemd is active</title>
<updated>2016-12-08T10:26:13+00:00</updated>
<author>
<name>Andreas Oberritter</name>
<email>obi@opendreambox.org</email>
</author>
<published>2016-11-30T12:27:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.multitech.net/cgit/openembedded-core.git/commit/?id=f2cc0fdfd97b097145e40bc52674e17378cec863'/>
<id>f2cc0fdfd97b097145e40bc52674e17378cec863</id>
<content type='text'>
In hybrid systemd/sysvinit builds, if the recipe inherits systemd and systemd
is installed, we can safely assume that the service gets stopped by the prerm
script fragment from systemd.bbclass. This fixes deinstallation of packages
with initscripts returning errors when no running service was found. The preinst
shouldn't run the initscript either, because postinst will call systemctl restart.

Signed-off-by: Andreas Oberritter &lt;obi@opendreambox.org&gt;
Signed-off-by: Ross Burton &lt;ross.burton@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In hybrid systemd/sysvinit builds, if the recipe inherits systemd and systemd
is installed, we can safely assume that the service gets stopped by the prerm
script fragment from systemd.bbclass. This fixes deinstallation of packages
with initscripts returning errors when no running service was found. The preinst
shouldn't run the initscript either, because postinst will call systemctl restart.

Signed-off-by: Andreas Oberritter &lt;obi@opendreambox.org&gt;
Signed-off-by: Ross Burton &lt;ross.burton@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>update-rc.d.bbclass: ignore init script return code</title>
<updated>2016-10-11T21:18:36+00:00</updated>
<author>
<name>Markus Lehtonen</name>
<email>markus.lehtonen@linux.intel.com</email>
</author>
<published>2016-10-11T12:43:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.multitech.net/cgit/openembedded-core.git/commit/?id=daa3c266a7ffa060b52381fa00df518102fceda8'/>
<id>daa3c266a7ffa060b52381fa00df518102fceda8</id>
<content type='text'>
We need to ignore the return code from the init script 'stop' command in
the preinst and prerm scriptlets. Otherwise package upgrade or
deinstallation (at least when opkg is used) is likely to fail if the
daemon is not running. That is because an init script possibly returns
'1' if you try to stop a service that is not running which, in turn,
causes the scriptlet to fail which, in turn, causes the package
(de-)installation to fail.

[YOCTO #10299]

Signed-off-by: Markus Lehtonen &lt;markus.lehtonen@linux.intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We need to ignore the return code from the init script 'stop' command in
the preinst and prerm scriptlets. Otherwise package upgrade or
deinstallation (at least when opkg is used) is likely to fail if the
daemon is not running. That is because an init script possibly returns
'1' if you try to stop a service that is not running which, in turn,
causes the scriptlet to fail which, in turn, causes the package
(de-)installation to fail.

[YOCTO #10299]

Signed-off-by: Markus Lehtonen &lt;markus.lehtonen@linux.intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>update-rc.d.bbclass: check that init script is executable before running it</title>
<updated>2016-10-07T15:53:15+00:00</updated>
<author>
<name>Markus Lehtonen</name>
<email>markus.lehtonen@linux.intel.com</email>
</author>
<published>2016-10-06T13:37:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.multitech.net/cgit/openembedded-core.git/commit/?id=aabb87c9dbd60fe9467ca0354ec05c275a3f1b1a'/>
<id>aabb87c9dbd60fe9467ca0354ec05c275a3f1b1a</id>
<content type='text'>
Check that the init script that is going to be called in the prerm()
script really exists and is executable. There might be a packaging bug
or the script might've been removed already earlier in prerm().

[YOCTO #10299]

Signed-off-by: Markus Lehtonen &lt;markus.lehtonen@linux.intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Check that the init script that is going to be called in the prerm()
script really exists and is executable. There might be a packaging bug
or the script might've been removed already earlier in prerm().

[YOCTO #10299]

Signed-off-by: Markus Lehtonen &lt;markus.lehtonen@linux.intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>update-rc.d.bbclass: Use bb.fatal() instead of raising FuncFailed</title>
<updated>2016-10-03T14:46:21+00:00</updated>
<author>
<name>Ulf Magnusson</name>
<email>ulfalizer@gmail.com</email>
</author>
<published>2016-10-01T02:46:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.multitech.net/cgit/openembedded-core.git/commit/?id=a77b4e543407eee133fbd38ac9b69e90bea541e0'/>
<id>a77b4e543407eee133fbd38ac9b69e90bea541e0</id>
<content type='text'>
This sets a good example and avoids unnecessarily contributing to
perceived complexity and cargo culting.

Motivating quote below:

&lt; kergoth&gt; the *original* intent was for the function/task to error via
           whatever appropriate means, bb.fatal, whatever, and
           funcfailed was what you'd catch if you were calling
           exec_func/exec_task. that is, it's what those functions
           raise, not what metadata functions should be raising
&lt; kergoth&gt; it didn't end up being used that way
&lt; kergoth&gt; but there's really never a reason to raise it yourself

FuncFailed.__init__ takes a 'name' argument rather than a 'msg'
argument, which also shows that the original purpose got lost.

Signed-off-by: Ulf Magnusson &lt;ulfalizer@gmail.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This sets a good example and avoids unnecessarily contributing to
perceived complexity and cargo culting.

Motivating quote below:

&lt; kergoth&gt; the *original* intent was for the function/task to error via
           whatever appropriate means, bb.fatal, whatever, and
           funcfailed was what you'd catch if you were calling
           exec_func/exec_task. that is, it's what those functions
           raise, not what metadata functions should be raising
&lt; kergoth&gt; it didn't end up being used that way
&lt; kergoth&gt; but there's really never a reason to raise it yourself

FuncFailed.__init__ takes a 'name' argument rather than a 'msg'
argument, which also shows that the original purpose got lost.

Signed-off-by: Ulf Magnusson &lt;ulfalizer@gmail.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>update-rc.d.bbclass: Disable class when sysvinit is not in DISTRO_FEATURES</title>
<updated>2016-06-15T16:36:35+00:00</updated>
<author>
<name>Mariano Lopez</name>
<email>mariano.lopez@linux.intel.com</email>
</author>
<published>2016-06-10T11:48:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.multitech.net/cgit/openembedded-core.git/commit/?id=5b2139a79cd8c280e755923016b3a6e84413184e'/>
<id>5b2139a79cd8c280e755923016b3a6e84413184e</id>
<content type='text'>
When sysvinit is not in use, update-rd.d class adds build dependencies
that won't be needed, this patch removes the build dependecies and
won't add the task to PACKAGESPLITFUNCS.

[YOCTO #9515]

Signed-off-by: Mariano Lopez &lt;mariano.lopez@linux.intel.com&gt;
Signed-off-by: Ross Burton &lt;ross.burton@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When sysvinit is not in use, update-rd.d class adds build dependencies
that won't be needed, this patch removes the build dependecies and
won't add the task to PACKAGESPLITFUNCS.

[YOCTO #9515]

Signed-off-by: Mariano Lopez &lt;mariano.lopez@linux.intel.com&gt;
Signed-off-by: Ross Burton &lt;ross.burton@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>update-rc.d.bbclass: explicitly dep on initscripts</title>
<updated>2015-08-30T11:34:18+00:00</updated>
<author>
<name>Christopher Larson</name>
<email>chris_larson@mentor.com</email>
</author>
<published>2015-08-24T22:18:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.multitech.net/cgit/openembedded-core.git/commit/?id=833302761df924bb503cc2ad04ecae1023381f8f'/>
<id>833302761df924bb503cc2ad04ecae1023381f8f</id>
<content type='text'>
update-rc.d doesn't just want an initscripts package, it wants
initscripts-functions. In the case where VIRTUAL-RUNTIME_initscripts is set to
nothing, update-rc.d still needs initscripts-functions to satisfy its runtime
dependencies. Further, we shouldn't be using a *runtime* virtual in a *build
time* variable. This should resolve image creation failures with
configurations without sysv initscripts when a recipe inherits update-rc.d and
doesn't inherit systemd.

(From OE-Core rev: e6642ae0849e5ac3174c643a7693af25d829d6d1)

Signed-off-by: Christopher Larson &lt;chris_larson@mentor.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
update-rc.d doesn't just want an initscripts package, it wants
initscripts-functions. In the case where VIRTUAL-RUNTIME_initscripts is set to
nothing, update-rc.d still needs initscripts-functions to satisfy its runtime
dependencies. Further, we shouldn't be using a *runtime* virtual in a *build
time* variable. This should resolve image creation failures with
configurations without sysv initscripts when a recipe inherits update-rc.d and
doesn't inherit systemd.

(From OE-Core rev: e6642ae0849e5ac3174c643a7693af25d829d6d1)

Signed-off-by: Christopher Larson &lt;chris_larson@mentor.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
