Skip to contentSkip to conversation

efl: remove 'upower' ecore module.

PATCH New Gustavo Sverzut Barbieri 3 participants 10 messages Dec 29, 2016 – Jan 8, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 efl: remove 'upower' ecore module.

Ecore will reach 'upower' using D-Bus in order to detect if the system state changes. This is optional, but done by default and if D-Bus itself fails, then an error message will be presented.

Since we do not ship upower target package, just remove that from target. Since it's useless for host, remove it as well.

---
 package/efl/efl.mk | 10 ++++++++++
 1 file changed, 10 insertions(+)
package/efl/efl.mk +10 -0
index 7a8e47f4c..f7c99a965 100644
@@ -272,6 +272,11 @@ else
 EFL_CONF_OPTS += --disable-librsvg
 endif
 
+define EFL_HOOK_REMOVE_UPOWER
+	rm -fr $(TARGET_DIR)/usr/lib/ecore/system/upower
+endef
+EFL_POST_INSTALL_TARGET_HOOKS = EFL_HOOK_REMOVE_UPOWER
+
 $(eval $(autotools-package))
 
 ################################################################################
@@ -352,4 +357,9 @@ else
 HOST_EFL_CONF_OPTS += --disable-cxx-bindings
 endif
 
+define HOST_EFL_HOOK_REMOVE_UPOWER
+	rm -fr $(HOST_DIR)/usr/lib/ecore/system/upower
+endef
+HOST_EFL_POST_INSTALL_HOOKS = HOST_EFL_HOOK_REMOVE_UPOWER
+
 $(eval $(host-autotools-package))
Signature · 1 line
2.11.0
#1 lore raw

PATCH 1/1 efl: remove 'upower' ecore module.

Hi Gustavo,

Le 29/12/2016 ? 15:56, Gustavo Sverzut Barbieri a ?crit :

Quoted 3 lines

Ecore will reach 'upower' using D-Bus in order to detect if the system state changes. This is optional, but done by default and if D-Bus itself fails, then an error message will be presented.

What's the error message ?
I don't see any dbus message related to upower.

Quoted 3 lines

Since we do not ship upower target package, just remove that from target. Since it's useless for host, remove it as well.

The efl upower module is used by the enlightenment battery module. It's started here but I'm not sure it's really working (100% Battery).

Also, the efl package install several build tools and files on the target. It would be difficult to update all of these hooks between release. I recommend to use a post-build script in this case.

I admit, I didn't noticed this module until now :p

Maybe it easier to package upower and add it to efl dependencies ?

Best regards,
Romain

Quoted 33 lines
---
 package/efl/efl.mk | 10 ++++++++++
 1 file changed, 10 insertions(+)
package/efl/efl.mk +10 -0
index 7a8e47f4c..f7c99a965 100644
@@ -272,6 +272,11 @@ else
 EFL_CONF_OPTS += --disable-librsvg
 endif
 
+define EFL_HOOK_REMOVE_UPOWER
+	rm -fr $(TARGET_DIR)/usr/lib/ecore/system/upower
+endef
+EFL_POST_INSTALL_TARGET_HOOKS = EFL_HOOK_REMOVE_UPOWER
+
 $(eval $(autotools-package))
 
 ################################################################################
@@ -352,4 +357,9 @@ else
 HOST_EFL_CONF_OPTS += --disable-cxx-bindings
 endif
 
+define HOST_EFL_HOOK_REMOVE_UPOWER
+	rm -fr $(HOST_DIR)/usr/lib/ecore/system/upower
+endef
+HOST_EFL_POST_INSTALL_HOOKS = HOST_EFL_HOOK_REMOVE_UPOWER
+
 $(eval $(host-autotools-package))
#2 lore raw

PATCH 1/1 efl: remove 'upower' ecore module.

Le 29/12/2016 ? 17:20, Romain Naour a ?crit :

Quoted 9 lines

Hi Gustavo,

Le 29/12/2016 ? 15:56, Gustavo Sverzut Barbieri a ?crit :

Quoted 3 lines

Ecore will reach 'upower' using D-Bus in order to detect if the system state changes. This is optional, but done by default and if D-Bus itself fails, then an error message will be presented.

What's the error message ?
I don't see any dbus message related to upower.

Which efl version did you use ?

Some warning related to upower has been removed in efl 1.18 [1].

[1]
https://git.enlightenment.org/core/efl.git/commit/?id=f54a2eb5703381f9e80604cdca84f91b72ae0090

Quoted 8 lines
Quoted 4 lines

Since we do not ship upower target package, just remove that from target. Since it's useless for host, remove it as well.

The efl upower module is used by the enlightenment battery module. It's started here but I'm not sure it's really working (100% Battery).

Quoted 7 lines

Also, the efl package install several build tools and files on the target. It would be difficult to update all of these hooks between release. I recommend to use a post-build script in this case.

I admit, I didn't noticed this module until now :p

Maybe it easier to package upower and add it to efl dependencies ?

Can you try upower added with this patch ?

http://patchwork.ozlabs.org/patch/709564/

Best regards,
Romain

Quoted 4 lines

Best regards,
Romain

#3 lore raw

PATCH 1/1 efl: remove 'upower' ecore module.

In reply to Romain Naour
Quoted 9 lines · Romain Naour

Hi Gustavo,

Le 29/12/2016 ? 15:56, Gustavo Sverzut Barbieri a ?crit :

Quoted 3 lines

Ecore will reach 'upower' using D-Bus in order to detect if the system state changes. This is optional, but done by default and if D-Bus itself fails, then an error message will be presented.

What's the error message ?
I don't see any dbus message related to upower.

It's something along these lines:

ERR<pid>:eina_safety lib/eldbus/eldbus_core.c:1392 eldbus_name_owner_changed_callback_del() safety check failed: conn == NULL

ERR<pid>:eldbus lib/eldbus/eldbus_core.c:1021 _connection_get() Error connecting to bus of type 2. error name:
org.freedesktop.DBus.Error.FileNotFound error message: Failed to connect to socket /path/to/buildroot/output/host/var/run/dbus/system_bus_socket

that is, some apps will try to use eldbus to reach *host* system DBus, but it can't as it's trying to reach the socket inside the /path/to/buildroot/output/host/, not outside.

At first I was thinking this was related to edje_cc and would add ecore_app_no_system_modules() to it in order to skip such modules as upower... but it's already there. So maybe it's another binary used during my build.

Quoted 5 lines
Quoted 2 lines

Since we do not ship upower target package, just remove that from target. Since it's useless for host, remove it as well.

The efl upower module is used by the enlightenment battery module. It's started here but I'm not sure it's really working (100% Battery).

well, enlightenment + upower works on my desktop :-)

but E ships with alternative method to check battery if there's no upower.

also, that ecore module is not used by Enlightenment as the WM needs more information. That ecore module will only emit main loop events such as "battery low" so apps can save their state and start to save power (that was my intent when I added it, not sure any app uses that for real).

Quoted 2 lines

Also, the efl package install several build tools and files on the target. It would be difficult to update all of these hooks between release.

But the list of modules is pretty small. Usually they would reflect --enable-XXX, but since dbus is mandatory we always generate the upower module.

Quoted 1 line

I recommend to use a post-build script in this case.

that's what I'm doing atm.

Quoted 1 line

I admit, I didn't noticed this module until now :p

;-)

Quoted 1 line

Maybe it easier to package upower and add it to efl dependencies ?

I saw that patch and IMO it's a nice addition. However the error I'm noticing also happens on my build system as per above log.

Signature · 6 lines
Gustavo Sverzut Barbieri
http://profusion.mobi embedded systems
--------------------------------------
MSN, GTalk, FaceTime: barbieri at gmail.com
Skype: gsbarbieri
Mobile: +55 (16) 99354-9890
#4 lore raw

PATCH 1/1 efl: remove 'upower' ecore module.

Hi Gustavo,

Le 30/12/2016 ? 03:57, Gustavo Sverzut Barbieri a ?crit :

Quoted 23 lines · Romain Naour
Quoted 9 lines

Hi Gustavo,

Le 29/12/2016 ? 15:56, Gustavo Sverzut Barbieri a ?crit :

Quoted 3 lines

Ecore will reach 'upower' using D-Bus in order to detect if the system state changes. This is optional, but done by default and if D-Bus itself fails, then an error message will be presented.

What's the error message ?
I don't see any dbus message related to upower.

It's something along these lines:

ERR<pid>:eina_safety lib/eldbus/eldbus_core.c:1392 eldbus_name_owner_changed_callback_del() safety check failed: conn == NULL

ERR<pid>:eldbus lib/eldbus/eldbus_core.c:1021 _connection_get() Error connecting to bus of type 2. error name:
org.freedesktop.DBus.Error.FileNotFound error message: Failed to connect to socket /path/to/buildroot/output/host/var/run/dbus/system_bus_socket

Quoted 8 lines

that is, some apps will try to use eldbus to reach *host* system DBus, but it can't as it's trying to reach the socket inside the /path/to/buildroot/output/host/, not outside.

At first I was thinking this was related to edje_cc and would add ecore_app_no_system_modules() to it in order to skip such modules as upower... but it's already there. So maybe it's another binary used during my build.

Yes, I know these noisy one...

Indeed, there is no error messages after removing $(HOST_DIR)/usr/lib/ecore/system/upower :)
It would be great to add these explanation in the commit log.

I don't use E on my build machine so no other efl binary can be used.

Tested with efl, terminology and enlightenment package.

Quoted 33 lines
Quoted 6 lines
Quoted 3 lines

Since we do not ship upower target package, just remove that from target. Since it's useless for host, remove it as well.

The efl upower module is used by the enlightenment battery module. It's started here but I'm not sure it's really working (100% Battery).

well, enlightenment + upower works on my desktop :-)

but E ships with alternative method to check battery if there's no upower.

also, that ecore module is not used by Enlightenment as the WM needs more information. That ecore module will only emit main loop events such as "battery low" so apps can save their state and start to save power (that was my intent when I added it, not sure any app uses that for real).

Quoted 2 lines

Also, the efl package install several build tools and files on the target. It would be difficult to update all of these hooks between release.

But the list of modules is pretty small. Usually they would reflect --enable-XXX, but since dbus is mandatory we always generate the upower module.

Quoted 1 line

I recommend to use a post-build script in this case.

that's what I'm doing atm.

Quoted 1 line

I admit, I didn't noticed this module until now :p

Quoted 8 lines

;-)

Quoted 1 line

Maybe it easier to package upower and add it to efl dependencies ?

I saw that patch and IMO it's a nice addition. However the error I'm noticing also happens on my build system as per above log.

I don't think we want to remove $(TARGET_DIR)/usr/lib/ecore/system/upower if upower is selected. Maybe add a condition on upower package ?

Best regards,
Romain

#5 lore raw

PATCH 1/1 efl: remove 'upower' ecore module.

Quoted 35 lines · Romain Naour

Hi Gustavo,

Le 30/12/2016 ? 03:57, Gustavo Sverzut Barbieri a ?crit :

Quoted 23 lines · Romain Naour
Quoted 9 lines

Hi Gustavo,

Le 29/12/2016 ? 15:56, Gustavo Sverzut Barbieri a ?crit :

Quoted 3 lines

Ecore will reach 'upower' using D-Bus in order to detect if the system state changes. This is optional, but done by default and if D-Bus itself fails, then an error message will be presented.

What's the error message ?
I don't see any dbus message related to upower.

It's something along these lines:

ERR<pid>:eina_safety lib/eldbus/eldbus_core.c:1392 eldbus_name_owner_changed_callback_del() safety check failed: conn == NULL

ERR<pid>:eldbus lib/eldbus/eldbus_core.c:1021 _connection_get() Error connecting to bus of type 2. error name:
org.freedesktop.DBus.Error.FileNotFound error message: Failed to connect to socket /path/to/buildroot/output/host/var/run/dbus/system_bus_socket

Quoted 8 lines

that is, some apps will try to use eldbus to reach *host* system DBus, but it can't as it's trying to reach the socket inside the /path/to/buildroot/output/host/, not outside.

At first I was thinking this was related to edje_cc and would add ecore_app_no_system_modules() to it in order to skip such modules as upower... but it's already there. So maybe it's another binary used during my build.

Quoted 5 lines

Yes, I know these noisy one...

Indeed, there is no error messages after removing $(HOST_DIR)/usr/lib/ecore/system/upower :)
It would be great to add these explanation in the commit log.

ok, will rework the message.

Quoted 1 line

I don't use E on my build machine so no other efl binary can be used.

what you mean with "no other efl can be used"? EFL can be used regardless of the window manager. I suppose you meant "needs to be used"?

Quoted 2 lines

I don't think we want to remove $(TARGET_DIR)/usr/lib/ecore/system/upower if upower is selected. Maybe add a condition on upower package ?

fair enough now that we have the upower package. will add that to the new patch.

Signature · 6 lines
Gustavo Sverzut Barbieri
http://profusion.mobi embedded systems
--------------------------------------
MSN, GTalk, FaceTime: barbieri at gmail.com
Skype: gsbarbieri
Mobile: +55 (16) 99354-9890
#6 lore raw

PATCH 1/1 efl: remove 'upower' ecore module.

Le 30/12/2016 ? 15:02, Gustavo Sverzut Barbieri a ?crit :

Quoted 42 lines · Romain Naour
Quoted 35 lines

Hi Gustavo,

Le 30/12/2016 ? 03:57, Gustavo Sverzut Barbieri a ?crit :

Quoted 23 lines · Romain Naour
Quoted 9 lines

Hi Gustavo,

Le 29/12/2016 ? 15:56, Gustavo Sverzut Barbieri a ?crit :

Quoted 3 lines

Ecore will reach 'upower' using D-Bus in order to detect if the system state changes. This is optional, but done by default and if D-Bus itself fails, then an error message will be presented.

What's the error message ?
I don't see any dbus message related to upower.

It's something along these lines:

ERR<pid>:eina_safety lib/eldbus/eldbus_core.c:1392 eldbus_name_owner_changed_callback_del() safety check failed: conn == NULL

ERR<pid>:eldbus lib/eldbus/eldbus_core.c:1021 _connection_get() Error connecting to bus of type 2. error name:
org.freedesktop.DBus.Error.FileNotFound error message: Failed to connect to socket /path/to/buildroot/output/host/var/run/dbus/system_bus_socket

Quoted 8 lines

that is, some apps will try to use eldbus to reach *host* system DBus, but it can't as it's trying to reach the socket inside the /path/to/buildroot/output/host/, not outside.

At first I was thinking this was related to edje_cc and would add ecore_app_no_system_modules() to it in order to skip such modules as upower... but it's already there. So maybe it's another binary used during my build.

Quoted 5 lines

Yes, I know these noisy one...

Indeed, there is no error messages after removing $(HOST_DIR)/usr/lib/ecore/system/upower :)
It would be great to add these explanation in the commit log.

Quoted 8 lines

ok, will rework the message.

Quoted 1 line

I don't use E on my build machine so no other efl binary can be used.

what you mean with "no other efl can be used"? EFL can be used regardless of the window manager. I suppose you meant "needs to be used"?

I mean, no efl binary installed on the build machine can "leak" (be used) during the build.
But it shouldn't happen since we use these options in EFL_CONF_OPTS:

	--with-edje-cc=$(HOST_DIR)/usr/bin/edje_cc \
	--with-eet-eet=$(HOST_DIR)/usr/bin/eet \
	--with-eldbus_codegen=$(HOST_DIR)/usr/bin/eldbus-codegen \
	--with-elementary-codegen=$(HOST_DIR)/usr/bin/elementary_codegen \
	--with-elm-prefs-cc=$(HOST_DIR)/usr/bin/elm_prefs_cc \
	--with-elua=$(HOST_DIR)/usr/bin/elua \
	--with-eolian-gen=$(HOST_DIR)/usr/bin/eolian_gen \
Quoted 7 lines
Quoted 4 lines

I don't think we want to remove $(TARGET_DIR)/usr/lib/ecore/system/upower if upower is selected. Maybe add a condition on upower package ?

fair enough now that we have the upower package. will add that to the new patch.

Ok thanks.

Best regards,
Romain

#7 lore raw

PATCH 1/1 efl: optional 'upower' ecore system module.

In reply to Gustavo Sverzut Barbieri

Ecore will reach 'upower' using D-Bus system bus in order to detect if the system state changes and let applications know about the power state such as low battery or AC power in order to optimize their power consumption.

For host this is not needed and would not work, since output/host DBus declares its own output/host/var/run/dbus/system_bus_socket, which has no dbus-daemon and thus no services in it.

For target it's optional and only installed if BR2_PACKAGE_UPOWER=y, otherwise it prints error messages about missing upower service.

---
 package/efl/efl.mk | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
package/efl/efl.mk +21 -0
index 7a8e47f4c..2fe140a30 100644
@@ -272,6 +272,18 @@ else
 EFL_CONF_OPTS += --disable-librsvg
 endif
 
+ifeq ($(BR2_PACKAGE_UPOWER),)
+# upower ecore system module is only useful if upower
+# dbus service is available.
+# It's not essential, only used to notify applications
+# of power state, such as low battery or AC power, so
+# they can adapt their power consumption.
+define EFL_HOOK_REMOVE_UPOWER
+	rm -fr $(TARGET_DIR)/usr/lib/ecore/system/upower
+endef
+EFL_POST_INSTALL_TARGET_HOOKS = EFL_HOOK_REMOVE_UPOWER
+endif
+
 $(eval $(autotools-package))
 
 ################################################################################
@@ -352,4 +364,13 @@ else
 HOST_EFL_CONF_OPTS += --disable-cxx-bindings
 endif
 
+# Always disable upower system module from host as it's
+# not useful and would try to use the output/host/var
+# system bus which is non-existent and does not contain
+# any upower service in it.
+define HOST_EFL_HOOK_REMOVE_UPOWER
+	rm -fr $(HOST_DIR)/usr/lib/ecore/system/upower
+endef
+HOST_EFL_POST_INSTALL_HOOKS = HOST_EFL_HOOK_REMOVE_UPOWER
+
 $(eval $(host-autotools-package))
Signature · 1 line
2.11.0
#8 lore raw

PATCH 1/1 efl: optional 'upower' ecore system module.

Le 30/12/2016 ? 15:51, Gustavo Sverzut Barbieri a ?crit :

Quoted 5 lines

Ecore will reach 'upower' using D-Bus system bus in order to detect if the system state changes and let applications know about the power state such as low battery or AC power in order to optimize their power consumption.

Quoted 8 lines

For host this is not needed and would not work, since output/host DBus declares its own output/host/var/run/dbus/system_bus_socket, which has no dbus-daemon and thus no services in it.

For target it's optional and only installed if BR2_PACKAGE_UPOWER=y, otherwise it prints error messages about missing upower service.

Obviously after the commit of upower package:
http://patchwork.ozlabs.org/patch/709564/

Thanks!

Best regards,
Romain

Quoted 42 lines
---
 package/efl/efl.mk | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
package/efl/efl.mk +21 -0
index 7a8e47f4c..2fe140a30 100644
@@ -272,6 +272,18 @@ else
 EFL_CONF_OPTS += --disable-librsvg
 endif
 
+ifeq ($(BR2_PACKAGE_UPOWER),)
+# upower ecore system module is only useful if upower
+# dbus service is available.
+# It's not essential, only used to notify applications
+# of power state, such as low battery or AC power, so
+# they can adapt their power consumption.
+define EFL_HOOK_REMOVE_UPOWER
+	rm -fr $(TARGET_DIR)/usr/lib/ecore/system/upower
+endef
+EFL_POST_INSTALL_TARGET_HOOKS = EFL_HOOK_REMOVE_UPOWER
+endif
+
 $(eval $(autotools-package))
 
 ################################################################################
@@ -352,4 +364,13 @@ else
 HOST_EFL_CONF_OPTS += --disable-cxx-bindings
 endif
 
+# Always disable upower system module from host as it's
+# not useful and would try to use the output/host/var
+# system bus which is non-existent and does not contain
+# any upower service in it.
+define HOST_EFL_HOOK_REMOVE_UPOWER
+	rm -fr $(HOST_DIR)/usr/lib/ecore/system/upower
+endef
+HOST_EFL_POST_INSTALL_HOOKS = HOST_EFL_HOOK_REMOVE_UPOWER
+
 $(eval $(host-autotools-package))
#9 lore raw

PATCH 1/1 efl: optional 'upower' ecore system module.

In reply to Gustavo Sverzut Barbieri
Quoted 7 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Gustavo" == Gustavo Sverzut Barbieri <[email protected]> writes:

Ecore will reach 'upower' using D-Bus system bus in order to detect if the system state changes and let applications know about the power state such as low battery or AC power in order to optimize their power consumption.

Quoted 8 lines

For host this is not needed and would not work, since output/host DBus declares its own output/host/var/run/dbus/system_bus_socket, which has no dbus-daemon and thus no services in it.

For target it's optional and only installed if BR2_PACKAGE_UPOWER=y, otherwise it prints error messages about missing upower service.

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard