Re: [Tracker] [PATCH] Port tracker from libdevkit-power-gobject to libupower-glib
2010/4/14 Martyn Russell : > On 14/04/10 09:11, Philip Van Hoof wrote: >> >> On Wed, 2010-04-14 at 04:32 +0200, Michael Biebl wrote: >>> >>> The attached patch ports tracker from libdevkit-power-gobject to >>> libupower-glib. >>> >>> The patch is based on my latest patch series, so does not directly >>> apply on top of master. >>> If you prefer, I can rebase the patch on master and resend it. >> >> >> Please do Attached is new patch rebased on current master. >>> fwiw, I set the minimum version of libupower-glib to 0.9.2, because >>> that is the version I tested the patch with. It most likely should >>> also work with earlier releases like 0.9.0 if that is a concern. > > Hmm, from a brief Google for the packages hitting the next Ubuntu version, > 0.9.0 looks like the version they're shipping with. I would try to use that > if possible. I've set the minimum version to 0.9.0 on your request. Updated patch is attached. I'd appreciate a review. Michael -- Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth? From edaedffd693a83d0692ab981587f6f95dc932c13 Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Wed, 14 Apr 2010 03:49:31 +0200 Subject: [PATCH] Port from libdevkit-power-gobject to libupower-glib --- configure.ac| 54 +++--- src/libtracker-common/Makefile.am | 11 +- src/libtracker-common/tracker-power-devicekit.c | 247 --- src/libtracker-common/tracker-power-upower.c| 247 +++ src/miners/fs/tracker-miner-files.c | 16 +- 5 files changed, 287 insertions(+), 288 deletions(-) delete mode 100644 src/libtracker-common/tracker-power-devicekit.c create mode 100644 src/libtracker-common/tracker-power-upower.c diff --git a/configure.ac b/configure.ac index a90af4a..361d6bb 100644 --- a/configure.ac +++ b/configure.ac @@ -139,7 +139,7 @@ GTK_REQUIRED=2.18.0 LIBXML2_REQUIRED=2.6 LIBNOTIFY_REQUIRED=0.4.3 HAL_REQUIRED=0.5 -DEVKIT_POWER_REQUIRED=007 +UPOWER_REQUIRED=0.9.0 GDKPIXBUF_REQUIRED=2.12.0 QUILL_REQUIRED=1.0.0 UNAC_REQUIRED=1.0.0 @@ -398,36 +398,36 @@ fi ## -# Check for DeviceKit-power +# Check for UPower ## -AC_ARG_ENABLE(devkit_power, - AS_HELP_STRING([--disable-devkit-power], - [disable DeviceKit-power support for AC power detection [[default=auto]]]),, - [enable_devkit_power=auto]) - -if test "x$enable_devkit_power" != "xno"; then - PKG_CHECK_MODULES(DEVKIT_POWER, - [devkit-power-gobject >= $DEVKIT_POWER_REQUIRED], - [have_devkit_power=yes] , - [have_devkit_power=no]) - AC_SUBST(DEVKIT_POWER_CFLAGS) - AC_SUBST(DEVKIT_POWER_LIBS) - - if test "x$have_devkit_power" = "xyes"; then - AC_DEFINE(HAVE_DEVKIT_POWER, [], [Define if we have DEVKIT_POWER]) +AC_ARG_ENABLE(upower, + AS_HELP_STRING([--disable-upower], + [disable UPower support for AC power detection [[default=auto]]]),, + [enable_upower=auto]) + +if test "x$enable_upower" != "xno"; then + PKG_CHECK_MODULES(UPOWER, + [upower-glib >= $UPOWER_REQUIRED], + [have_upower=yes] , + [have_upower=no]) + AC_SUBST(UPOWER_CFLAGS) + AC_SUBST(UPOWER_LIBS) + + if test "x$have_upower" = "xyes"; then + AC_DEFINE(HAVE_UPOWER, [], [Define if we have UPOWER]) fi else - have_devkit_power="no (disabled)" + have_upower="no (disabled)" fi -if test "x$enable_devkit_power" = "xyes"; then - if test "x$have_devkit_power" != "xyes"; then - AC_MSG_ERROR([Couldn't find devkit_power >= $DEVKIT_POWER_REQUIRED.]) +if test "x$enable_upower" = "xyes"; then + if test "x$have_upower" != "xyes"; then + AC_MSG_ERROR([Couldn't find upower >= $UPOWER_REQUIRED.]) fi fi -AM_CONDITIONAL(HAVE_DEVKIT_POWER, test "x$have_devkit_power" = "xyes") +AM_CONDITIONAL(HAVE_UPOWER, test "x$have_upower" = "xyes") ## # Check for HAL @@ -438,7 +438,7 @@ AC_ARG_ENABLE(hal, [disable HAL support for AC power detection [[default=auto]]]),, [enable_hal=auto]) -if test "x$have_devkit_power" != "xyes" && test "x$enable_hal" != "xno"; then +if test "x$have_upower" != "xyes" && test "x$enable_hal" != "xno"; then PKG_CHECK_MODULES(HAL, [hal >= $HAL_REQUIRED], [have_hal=yes] , @@ -454,8 +454,8 @@ else fi if test "x$enable_hal" = "xyes"; then - if test "x$have_devkit_power" = "xyes"; then - AC_MSG_ERROR([Only one of DeviceKit-power and HAL can be used.]) + if test "x$have_upower" = "xyes"; then + AC_MSG_ERROR([Only one of UPower and HAL can be used.]) elif test "x$have_hal" != "xyes"; then AC_MSG_ERROR([Couldn't find hal >= $HAL_REQUIRED.]) fi @@ -1749,8 +1749,8 @@ Build Configuration: Enable unit tests: $have_unit_tes
Re: [Tracker] [PATCH] Port tracker from libdevkit-power-gobject to libupower-glib
2010/4/14 Martyn Russell : > On 14/04/10 10:13, Philip Van Hoof wrote: >> >> Looks like this was about another patch. A larger one (not just >> Makefiles) that was attached to the first E-mail of this thread. > > Hmm? > > The one attached to the start of this thread is the one being applied - my > question is, does the patch in this thread depend on the smaller Makefile > patches from earlier? If so, then no rebase should be done, if not, then yes > it probably should be done. Just to clarify: this patch is on top of the 5 small Makefile patches. As Martyn has merged them now, the patch should directly apply to current master. Cheers, Michael -- Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth? ___ tracker-list mailing list tracker-list@gnome.org http://mail.gnome.org/mailman/listinfo/tracker-list
Re: [Tracker] [PATCH] Port tracker from libdevkit-power-gobject to libupower-glib
On 14/04/10 10:13, Philip Van Hoof wrote: Looks like this was about another patch. A larger one (not just Makefiles) that was attached to the first E-mail of this thread. Hmm? The one attached to the start of this thread is the one being applied - my question is, does the patch in this thread depend on the smaller Makefile patches from earlier? If so, then no rebase should be done, if not, then yes it probably should be done. -- Regards, Martyn ___ tracker-list mailing list tracker-list@gnome.org http://mail.gnome.org/mailman/listinfo/tracker-list
Re: [Tracker] [PATCH] Port tracker from libdevkit-power-gobject to libupower-glib
On Wed, 2010-04-14 at 09:52 +0100, Martyn Russell wrote: > On 14/04/10 09:11, Philip Van Hoof wrote: > > On Wed, 2010-04-14 at 04:32 +0200, Michael Biebl wrote: [CUT] > Assuming of course you refer to the patches you posted here just > recently to fix the Makefiles? > > If so, then no! Please don't rebase for master. It is extra work and for > no point whatsoever. I plan to push those changes almost immediately. Looks like this was about another patch. A larger one (not just Makefiles) that was attached to the first E-mail of this thread. -- Philip Van Hoof freelance software developer Codeminded BVBA - http://codeminded.be ___ tracker-list mailing list tracker-list@gnome.org http://mail.gnome.org/mailman/listinfo/tracker-list
Re: [Tracker] [PATCH] Port tracker from libdevkit-power-gobject to libupower-glib
On 14/04/10 09:11, Philip Van Hoof wrote: On Wed, 2010-04-14 at 04:32 +0200, Michael Biebl wrote: Hi, Hi, as you are probably aware, devicekit-power has been deprecated and replaced by upower. upower still ships a compat library libdevkit-power-gobjec, which tracker currently uses, but it's recommended to use the new library libupower-glib. The attached patch ports tracker from libdevkit-power-gobject to libupower-glib. The patch is based on my latest patch series, so does not directly apply on top of master. If you prefer, I can rebase the patch on master and resend it. Please do Assuming of course you refer to the patches you posted here just recently to fix the Makefiles? If so, then no! Please don't rebase for master. It is extra work and for no point whatsoever. I plan to push those changes almost immediately. fwiw, I set the minimum version of libupower-glib to 0.9.2, because that is the version I tested the patch with. It most likely should also work with earlier releases like 0.9.0 if that is a concern. Hmm, from a brief Google for the packages hitting the next Ubuntu version, 0.9.0 looks like the version they're shipping with. I would try to use that if possible. -- Regards, Martyn ___ tracker-list mailing list tracker-list@gnome.org http://mail.gnome.org/mailman/listinfo/tracker-list
Re: [Tracker] [PATCH] Port tracker from libdevkit-power-gobject to libupower-glib
On Wed, 2010-04-14 at 04:32 +0200, Michael Biebl wrote: > Hi, > > as you are probably aware, devicekit-power has been deprecated and > replaced by upower. > upower still ships a compat library libdevkit-power-gobjec, which > tracker currently uses, but it's recommended to use the new library > libupower-glib. > > The attached patch ports tracker from libdevkit-power-gobject to > libupower-glib. > > The patch is based on my latest patch series, so does not directly > apply on top of master. > If you prefer, I can rebase the patch on master and resend it. Please do > fwiw, I set the minimum version of libupower-glib to 0.9.2, because > that is the version I tested the patch with. It most likely should > also work with earlier releases like 0.9.0 if that is a concern. > > Cheers, > Michael > ___ > tracker-list mailing list > tracker-list@gnome.org > http://mail.gnome.org/mailman/listinfo/tracker-list -- Philip Van Hoof freelance software developer Codeminded BVBA - http://codeminded.be ___ tracker-list mailing list tracker-list@gnome.org http://mail.gnome.org/mailman/listinfo/tracker-list
[Tracker] [PATCH] Port tracker from libdevkit-power-gobject to libupower-glib
Hi, as you are probably aware, devicekit-power has been deprecated and replaced by upower. upower still ships a compat library libdevkit-power-gobjec, which tracker currently uses, but it's recommended to use the new library libupower-glib. The attached patch ports tracker from libdevkit-power-gobject to libupower-glib. The patch is based on my latest patch series, so does not directly apply on top of master. If you prefer, I can rebase the patch on master and resend it. fwiw, I set the minimum version of libupower-glib to 0.9.2, because that is the version I tested the patch with. It most likely should also work with earlier releases like 0.9.0 if that is a concern. Cheers, Michael -- Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth? From fa5e7f5c0c3934a6327261eff32fcbc18d9d2aab Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Wed, 14 Apr 2010 03:49:31 +0200 Subject: [PATCH] Port from libdevkit-power-gobject to libupower-glib --- configure.ac| 54 +++--- src/libtracker-common/Makefile.am | 11 +- src/libtracker-common/tracker-power-devicekit.c | 247 --- src/libtracker-common/tracker-power-upower.c| 247 +++ src/miners/fs/tracker-miner-files.c | 16 +- 5 files changed, 287 insertions(+), 288 deletions(-) delete mode 100644 src/libtracker-common/tracker-power-devicekit.c create mode 100644 src/libtracker-common/tracker-power-upower.c diff --git a/configure.ac b/configure.ac index f2745e3..b8796cc 100644 --- a/configure.ac +++ b/configure.ac @@ -139,7 +139,7 @@ GTK_REQUIRED=2.18.0 LIBXML2_REQUIRED=2.6 LIBNOTIFY_REQUIRED=0.4.3 HAL_REQUIRED=0.5 -DEVKIT_POWER_REQUIRED=007 +UPOWER_REQUIRED=0.9.2 GDKPIXBUF_REQUIRED=2.12.0 QUILL_REQUIRED=1.0.0 UNAC_REQUIRED=1.0.0 @@ -420,36 +420,36 @@ fi ## -# Check for DeviceKit-power +# Check for UPower ## -AC_ARG_ENABLE(devkit_power, - AS_HELP_STRING([--disable-devkit-power], - [disable DeviceKit-power support for AC power detection [[default=auto]]]),, - [enable_devkit_power=auto]) - -if test "x$enable_devkit_power" != "xno"; then - PKG_CHECK_MODULES(DEVKIT_POWER, - [devkit-power-gobject >= $DEVKIT_POWER_REQUIRED], - [have_devkit_power=yes] , - [have_devkit_power=no]) - AC_SUBST(DEVKIT_POWER_CFLAGS) - AC_SUBST(DEVKIT_POWER_LIBS) - - if test "x$have_devkit_power" = "xyes"; then - AC_DEFINE(HAVE_DEVKIT_POWER, [], [Define if we have DEVKIT_POWER]) +AC_ARG_ENABLE(upower, + AS_HELP_STRING([--disable-upower], + [disable UPower support for AC power detection [[default=auto]]]),, + [enable_upower=auto]) + +if test "x$enable_upower" != "xno"; then + PKG_CHECK_MODULES(UPOWER, + [upower-glib >= $UPOWER_REQUIRED], + [have_upower=yes] , + [have_upower=no]) + AC_SUBST(UPOWER_CFLAGS) + AC_SUBST(UPOWER_LIBS) + + if test "x$have_upower" = "xyes"; then + AC_DEFINE(HAVE_UPOWER, [], [Define if we have UPOWER]) fi else - have_devkit_power="no (disabled)" + have_upower="no (disabled)" fi -if test "x$enable_devkit_power" = "xyes"; then - if test "x$have_devkit_power" != "xyes"; then - AC_MSG_ERROR([Couldn't find devkit_power >= $DEVKIT_POWER_REQUIRED.]) +if test "x$enable_upower" = "xyes"; then + if test "x$have_upower" != "xyes"; then + AC_MSG_ERROR([Couldn't find upower >= $UPOWER_REQUIRED.]) fi fi -AM_CONDITIONAL(HAVE_DEVKIT_POWER, test "x$have_devkit_power" = "xyes") +AM_CONDITIONAL(HAVE_UPOWER, test "x$have_upower" = "xyes") ## # Check for HAL @@ -460,7 +460,7 @@ AC_ARG_ENABLE(hal, [disable HAL support for AC power detection [[default=auto]]]),, [enable_hal=auto]) -if test "x$have_devkit_power" != "xyes" && test "x$enable_hal" != "xno"; then +if test "x$have_upower" != "xyes" && test "x$enable_hal" != "xno"; then PKG_CHECK_MODULES(HAL, [hal >= $HAL_REQUIRED], [have_hal=yes] , @@ -476,8 +476,8 @@ else fi if test "x$enable_hal" = "xyes"; then - if test "x$have_devkit_power" = "xyes"; then - AC_MSG_ERROR([Only one of DeviceKit-power and HAL can be used.]) + if test "x$have_upower" = "xyes"; then + AC_MSG_ERROR([Only one of UPower and HAL can be used.]) elif test "x$have_hal" != "xyes"; then AC_MSG_ERROR([Couldn't find hal >= $HAL_REQUIRED.]) fi @@ -1767,8 +1767,8 @@ Build Configuration: Enable unit tests: $have_unit_tests Support for ioprio: $tracker_cv_have_ioprio - Support for HAL: $have_hal - Support for DeviceKit-power: $have_devkit_power + Support for HAL: $have_hal + Support for UPower: $have_upower Support for file monitoring: