diff options
author | Andreas Müller <schnitzeltony@googlemail.com> | 2015-06-22 15:53:07 +0200 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2015-07-16 21:09:04 +0200 |
commit | 21e17ff5f9102c9025c0ebe2cab1f75ca97b72e8 (patch) | |
tree | d81be1fa879275c0679b64565ff9b69410679bd1 /meta-xfce | |
parent | d4e5b33047e467494f4a0343f18fcab2ebf18f79 (diff) | |
download | meta-openembedded-21e17ff5f9102c9025c0ebe2cab1f75ca97b72e8.tar.gz |
xfce4-session: ensure ip for machine is found by adding to hosts
This fixes very ugly behaviour: Starting applications e.g xfce4-terminal
can delay for minutes in case network is connected.
There was a similar approach implemented for xfce4-session but this was removed
in
commit f54d3a506fef603d8d0c538d1d69a6597152c169
Author: Ash Charles <ashcharles@gmail.com>
Date: Mon Feb 23 08:40:53 2015 -0800
xfce4-session: Remove unneeded pkg_postinst
The pkg_postinst inherited from previous versions of this recipe no
longer seems necessary; no error message seen at runtime in a quick
test. As it made the generated packages unnecessarily
machine-specific, remove this post-install step. Based on the ensuring
discussion, this supersedes the original patch [1].
[1] http://lists.openembedded.org/pipermail/openembedded-devel/2015-February/100454.html
Signed-off-by: Ash Charles <ashcharles@gmail.com>
Tested-by: Andreas Müller <schnitzeltony@googlemail.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Unfortuantely my tests for that patch only checked for the messagebox:
| Could not look up internet address for <hostname>
| This will prevent Xfce from operating correctly.
| It may be possible to correct the problem by adding
| <hostname> to the file /etc/hosts on your system.
For unknown reasons this messagebox is not created but the hint is still
extremely valid.
To avoid making 'xfce4-session' machine specific an extra meta-recipe
'machine-host' was created on which 'xfce4-session' rdepends.
Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
Diffstat (limited to 'meta-xfce')
-rw-r--r-- | meta-xfce/recipes-xfce/xfce4-session/machine-host.bb | 17 | ||||
-rw-r--r-- | meta-xfce/recipes-xfce/xfce4-session/xfce4-session_4.12.1.bb | 2 |
2 files changed, 19 insertions, 0 deletions
diff --git a/meta-xfce/recipes-xfce/xfce4-session/machine-host.bb b/meta-xfce/recipes-xfce/xfce4-session/machine-host.bb new file mode 100644 index 000000000..03bd205a2 --- /dev/null +++ b/meta-xfce/recipes-xfce/xfce4-session/machine-host.bb | |||
@@ -0,0 +1,17 @@ | |||
1 | SUMMARY = "Meta package adding machine name to known hosts" | ||
2 | LICENSE = "MIT" | ||
3 | LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690" | ||
4 | |||
5 | ALLOW_EMPTY_${PN} = "1" | ||
6 | |||
7 | LOCALHOSTMACHINE = "127.0.0.1 ${MACHINE}" | ||
8 | |||
9 | # on some machines starting applications as xfce4-terminal take ages without | ||
10 | # machine name in hosts | ||
11 | pkg_postinst_${PN} () { | ||
12 | if ! grep -q '${LOCALHOSTMACHINE}' $D/etc/hosts ; then | ||
13 | echo '${LOCALHOSTMACHINE}' >> $D/etc/hosts | ||
14 | fi | ||
15 | } | ||
16 | |||
17 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
diff --git a/meta-xfce/recipes-xfce/xfce4-session/xfce4-session_4.12.1.bb b/meta-xfce/recipes-xfce/xfce4-session/xfce4-session_4.12.1.bb index 81c56ccfa..215aec32b 100644 --- a/meta-xfce/recipes-xfce/xfce4-session/xfce4-session_4.12.1.bb +++ b/meta-xfce/recipes-xfce/xfce4-session/xfce4-session_4.12.1.bb | |||
@@ -26,3 +26,5 @@ FILES_${PN} += " \ | |||
26 | " | 26 | " |
27 | 27 | ||
28 | FILES_${PN}-dbg += "${libdir}/xfce4/*/*/.debug" | 28 | FILES_${PN}-dbg += "${libdir}/xfce4/*/*/.debug" |
29 | |||
30 | RDEPENDS_${PN} += "machine-host" | ||