Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH][V2] avahi: unset FILES_avahi to avoid packaging files there
@ 2014-08-15 16:55 Ross Burton
  2014-08-16  1:59 ` Robert Yang
  0 siblings, 1 reply; 2+ messages in thread
From: Ross Burton @ 2014-08-15 16:55 UTC (permalink / raw)
  To: openembedded-core

The main avahi recipe doesn't package anything into ${PN}.  If a library is
enabled but not put into a separate package it ends up in ${PN} and all the
packages are renamed using it's soname - ie libdns-sd-daemon.

Avoid this by clearing FILES_avahi so extra files are unpackaged instead of
creating a new package.  Also actually remove /var as the comments claim so the
avahi package is truly empty.

Signed-off-by: Ross Burton <ross.burton@intel.com>
---
 meta/recipes-connectivity/avahi/avahi.inc |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-connectivity/avahi/avahi.inc b/meta/recipes-connectivity/avahi/avahi.inc
index 3318f40..b97c4c5 100644
--- a/meta/recipes-connectivity/avahi/avahi.inc
+++ b/meta/recipes-connectivity/avahi/avahi.inc
@@ -73,6 +73,9 @@ do_configure_prepend() {
 
 PACKAGES =+ "avahi-daemon libavahi-common libavahi-core libavahi-client avahi-dnsconfd libavahi-glib libavahi-ui avahi-autoipd avahi-utils"
 
+# As avahi doesn't put any files into PN, clear the files list to avoid problems
+# if extra libraries appear.
+FILES_avahi = ""
 FILES_avahi-autoipd = "${sbindir}/avahi-autoipd \
                        ${sysconfdir}/avahi/avahi-autoipd.action \
                        ${sysconfdir}/dhcp/*/avahi-autoipd \
@@ -122,7 +125,8 @@ do_install() {
 	# don't install /var/run when populating rootfs. Do it through volatile
 	# /var/run of current version is empty, so just remove it.
 	# if /var/run become non-empty in the future, need to install it via volatile
-	rm -rf ${D}/var/run
+	rm -rf ${D}${localstatedir}/run
+	rmdir --ignore-fail-on-non-empty ${D}${localstatedir}
 	rm -rf ${D}${datadir}/dbus-1/interfaces
 	rmdir --ignore-fail-on-non-empty ${D}${datadir}/dbus-1
 	rm -rf ${D}${libdir}/avahi
-- 
1.7.10.4



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH][V2] avahi: unset FILES_avahi to avoid packaging files there
  2014-08-15 16:55 [PATCH][V2] avahi: unset FILES_avahi to avoid packaging files there Ross Burton
@ 2014-08-16  1:59 ` Robert Yang
  0 siblings, 0 replies; 2+ messages in thread
From: Robert Yang @ 2014-08-16  1:59 UTC (permalink / raw)
  To: Ross Burton, openembedded-core



On 08/16/2014 12:55 AM, Ross Burton wrote:
> The main avahi recipe doesn't package anything into ${PN}.  If a library is
> enabled but not put into a separate package it ends up in ${PN} and all the
> packages are renamed using it's soname - ie libdns-sd-daemon.
>
> Avoid this by clearing FILES_avahi so extra files are unpackaged instead of
> creating a new package.  Also actually remove /var as the comments claim so the
> avahi package is truly empty.
>
> Signed-off-by: Ross Burton <ross.burton@intel.com>
> ---
>   meta/recipes-connectivity/avahi/avahi.inc |    6 +++++-
>   1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/meta/recipes-connectivity/avahi/avahi.inc b/meta/recipes-connectivity/avahi/avahi.inc
> index 3318f40..b97c4c5 100644
> --- a/meta/recipes-connectivity/avahi/avahi.inc
> +++ b/meta/recipes-connectivity/avahi/avahi.inc
> @@ -73,6 +73,9 @@ do_configure_prepend() {
>
>   PACKAGES =+ "avahi-daemon libavahi-common libavahi-core libavahi-client avahi-dnsconfd libavahi-glib libavahi-ui avahi-autoipd avahi-utils"
>
> +# As avahi doesn't put any files into PN, clear the files list to avoid problems
> +# if extra libraries appear.
> +FILES_avahi = ""
>   FILES_avahi-autoipd = "${sbindir}/avahi-autoipd \
>                          ${sysconfdir}/avahi/avahi-autoipd.action \
>                          ${sysconfdir}/dhcp/*/avahi-autoipd \
> @@ -122,7 +125,8 @@ do_install() {
>   	# don't install /var/run when populating rootfs. Do it through volatile
>   	# /var/run of current version is empty, so just remove it.
>   	# if /var/run become non-empty in the future, need to install it via volatile
> -	rm -rf ${D}/var/run
> +	rm -rf ${D}${localstatedir}/run
> +	rmdir --ignore-fail-on-non-empty ${D}${localstatedir}

Got a do_install error because of this:

rmdir: failed to remove `/path/to/avahi-ui/0.6.31-r11.0/image/var': No such file 
or directory

This is because there is a "rmdir ${D}${localstatedir}" in do_install_append(),
once the first one removes it successfully, the later one would cause errors.

// Robert

>   	rm -rf ${D}${datadir}/dbus-1/interfaces
>   	rmdir --ignore-fail-on-non-empty ${D}${datadir}/dbus-1
>   	rm -rf ${D}${libdir}/avahi
>


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-08-16  1:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-15 16:55 [PATCH][V2] avahi: unset FILES_avahi to avoid packaging files there Ross Burton
2014-08-16  1:59 ` Robert Yang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox