* [meta-xfce][PATCH] xfce4-session: ensure ip for machine is found by adding to hosts
@ 2015-06-22 14:12 Andreas Müller
2015-06-24 23:54 ` Ash Charles
0 siblings, 1 reply; 3+ messages in thread
From: Andreas Müller @ 2015-06-22 14:12 UTC (permalink / raw)
To: openembedded-devel, ashcharles
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>
---
meta-xfce/recipes-xfce/xfce4-session/machine-host.bb | 17 +++++++++++++++++
.../recipes-xfce/xfce4-session/xfce4-session_4.12.1.bb | 2 ++
2 files changed, 19 insertions(+)
create mode 100644 meta-xfce/recipes-xfce/xfce4-session/machine-host.bb
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 0000000..03bd205
--- /dev/null
+++ b/meta-xfce/recipes-xfce/xfce4-session/machine-host.bb
@@ -0,0 +1,17 @@
+SUMMARY = "Meta package adding machine name to known hosts"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690"
+
+ALLOW_EMPTY_${PN} = "1"
+
+LOCALHOSTMACHINE = "127.0.0.1 ${MACHINE}"
+
+# on some machines starting applications as xfce4-terminal take ages without
+# machine name in hosts
+pkg_postinst_${PN} () {
+if ! grep -q '${LOCALHOSTMACHINE}' $D/etc/hosts ; then
+ echo '${LOCALHOSTMACHINE}' >> $D/etc/hosts
+fi
+}
+
+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 81c56cc..215aec3 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} += " \
"
FILES_${PN}-dbg += "${libdir}/xfce4/*/*/.debug"
+
+RDEPENDS_${PN} += "machine-host"
--
1.9.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [meta-xfce][PATCH] xfce4-session: ensure ip for machine is found by adding to hosts
2015-06-22 14:12 [meta-xfce][PATCH] xfce4-session: ensure ip for machine is found by adding to hosts Andreas Müller
@ 2015-06-24 23:54 ` Ash Charles
2015-06-25 5:25 ` Andreas Müller
0 siblings, 1 reply; 3+ messages in thread
From: Ash Charles @ 2015-06-24 23:54 UTC (permalink / raw)
To: Andreas Müller; +Cc: openembedded-devel
On Mon, Jun 22, 2015 at 7:12 AM, Andreas Müller
<schnitzeltony@googlemail.com> wrote:
> 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>
> ---
> meta-xfce/recipes-xfce/xfce4-session/machine-host.bb | 17 +++++++++++++++++
> .../recipes-xfce/xfce4-session/xfce4-session_4.12.1.bb | 2 ++
> 2 files changed, 19 insertions(+)
> create mode 100644 meta-xfce/recipes-xfce/xfce4-session/machine-host.bb
>
> 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 0000000..03bd205
> --- /dev/null
> +++ b/meta-xfce/recipes-xfce/xfce4-session/machine-host.bb
> @@ -0,0 +1,17 @@
> +SUMMARY = "Meta package adding machine name to known hosts"
> +LICENSE = "MIT"
> +LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690"
> +
> +ALLOW_EMPTY_${PN} = "1"
> +
> +LOCALHOSTMACHINE = "127.0.0.1 ${MACHINE}"
> +
> +# on some machines starting applications as xfce4-terminal take ages without
> +# machine name in hosts
> +pkg_postinst_${PN} () {
> +if ! grep -q '${LOCALHOSTMACHINE}' $D/etc/hosts ; then
> + echo '${LOCALHOSTMACHINE}' >> $D/etc/hosts
> +fi
> +}
> +
> +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 81c56cc..215aec3 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} += " \
> "
>
> FILES_${PN}-dbg += "${libdir}/xfce4/*/*/.debug"
> +
> +RDEPENDS_${PN} += "machine-host"
> --
> 1.9.3
>
Thanks Andreas. I gave this a try and the patch work for me. That
said, I don't see a long hang in any case---likely because
systemd-hostnamed is taking care of providing this resolution. In any
case:
Acked-by: Ash Charles <ashcharles@gmail.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [meta-xfce][PATCH] xfce4-session: ensure ip for machine is found by adding to hosts
2015-06-24 23:54 ` Ash Charles
@ 2015-06-25 5:25 ` Andreas Müller
0 siblings, 0 replies; 3+ messages in thread
From: Andreas Müller @ 2015-06-25 5:25 UTC (permalink / raw)
To: Ash Charles; +Cc: openembedded-devel
On Thu, Jun 25, 2015 at 1:54 AM, Ash Charles <ashcharles@gmail.com> wrote:
> Thanks Andreas. I gave this a try and the patch work for me. That
> said, I don't see a long hang in any case---likely because
> systemd-hostnamed is taking care of providing this resolution. In any
> case:
> Acked-by: Ash Charles <ashcharles@gmail.com>
Funny side note: This does not happen on all machines - some - e.g
overo - work without issues.
Andreas
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-06-25 5:25 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-22 14:12 [meta-xfce][PATCH] xfce4-session: ensure ip for machine is found by adding to hosts Andreas Müller
2015-06-24 23:54 ` Ash Charles
2015-06-25 5:25 ` Andreas Müller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.