From: Kei Yamashita <kei@openmailbox.org>
To: Danny Milosavljevic <dannym@scratchpost.org>
Cc: guix-devel@gnu.org
Subject: Re: [PATCH] gnu: Add wmbattery
Date: Sat, 14 May 2016 22:38:51 -0400 [thread overview]
Message-ID: <20160514223851.0615794f@openmailbox.org> (raw)
In-Reply-To: <20160513122507.127a7227@scratchpost.org>
[-- Attachment #1.1: Type: text/plain, Size: 1260 bytes --]
On Fri, 13 May 2016 12:25:07 +0200
Danny Milosavljevic <dannym@scratchpost.org> wrote:
> On Mon, 4 Apr 2016 17:04:51 -0400
> Kei Yamashita <kei@openmailbox.org> wrote:
>
> > The source tarball comes from Debian.
>
> The wmbattery version
> <http://http.debian.net/debian/pool/main/w/wmbattery/wmbattery_2.50.orig.tar.gz>
> that we use in Guix has a memory leak. It's been eating up all memory
> of my laptop for some time now, so I tracked it down.
>
> The fix would be:
>
> diff -ur orig/dockapps-30b9edb/upower.c dockapps-30b9edb/upower.c
> --- orig/dockapps-30b9edb/upower.c 2015-08-31
> 01:58:13.000000000 +0200 +++ dockapps-30b9edb/upower.c
> 2016-05-12 07:21:27.550374114 +0200 @@ -56,7 +56,8 @@
>
> int upower_supported(void)
> {
> - up = up_client_new();
> + if (!up)
> + up = up_client_new();
>
> if (!up) {
> return 0;
> @@ -78,7 +79,8 @@
> GPtrArray *devices = NULL;
> static int retries = 0;
>
> - up = up_client_new();
> + if (!up)
> + up = up_client_new();
>
> if (!up)
> return -1;
>
> I added Joey Hess, the author of the program, to Cc.
>
> @Joey Hess: what do you think?
Until the patch is applied upstream, this patch should keep things in
order within Guix.
[-- Attachment #1.2: 0001-gnu-wmbattery-Add-patch-upower-phase.patch --]
[-- Type: text/plain, Size: 1231 bytes --]
From e07912c6b5ea2ff45d5b923dccad26fef3ca932d Mon Sep 17 00:00:00 2001
From: Kei Yamashita <kei@openmailbox.org>
Date: Sat, 14 May 2016 22:27:15 -0400
Subject: [PATCH] gnu: wmbattery: Add `patch-upower' phase.
* gnu/packages/gnustep.scm (wmbattery): Add `patch-upower' phase.
---
gnu/packages/gnustep.scm | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/gnustep.scm b/gnu/packages/gnustep.scm
index 31fca5b..961df0e 100644
--- a/gnu/packages/gnustep.scm
+++ b/gnu/packages/gnustep.scm
@@ -108,7 +108,13 @@ interface. It is fast, feature rich, easy to configure, and easy to use.")
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'autoconf
- (lambda _ (zero? (system* "autoreconf" "-vfi")))))))
+ (lambda _ (zero? (system* "autoreconf" "-vfi"))))
+ (add-before 'configure 'patch-upower
+ (lambda _
+ (substitute* "upower.c"
+ (("up = up_client_new\\(\\);")
+ (string-append "if (!up)\n"
+ " up = up_client_new();"))))))))
(inputs
`(("glib" ,glib)
("libx11" ,libx11)
--
2.7.4
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
next prev parent reply other threads:[~2016-05-16 18:13 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-04 21:04 [PATCH] gnu: Add wmbattery Kei Yamashita
2016-04-04 22:42 ` Danny Milosavljevic
2016-04-05 8:24 ` Leo Famulari
2016-04-05 8:52 ` Alex Kost
2016-05-13 10:25 ` Danny Milosavljevic
2016-05-13 15:17 ` Joey Hess
2016-05-15 2:38 ` Kei Yamashita [this message]
2016-05-17 21:05 ` Ludovic Courtès
2016-05-17 22:58 ` Kei Kebreau
2016-05-18 13:35 ` Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160514223851.0615794f@openmailbox.org \
--to=kei@openmailbox.org \
--cc=dannym@scratchpost.org \
--cc=guix-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
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.