From: Arun Isaac <arunisaac@systemreboot.net>
To: "Clément Lassieur" <clement@lassieur.org>
Cc: 32102@debbugs.gnu.org
Subject: [bug#32102] [PATCH v2 2/2] gnu: gajim: Combine wrap-program phases.
Date: Sun, 29 Jul 2018 02:12:58 +0530 [thread overview]
Message-ID: <cu7h8kjjdm5.fsf@systemreboot.net> (raw)
In-Reply-To: <cu74lh3tqnc.fsf@systemreboot.net>
[-- Attachment #1: Type: text/plain, Size: 202 bytes --]
Please find attached the updated patches. Sorry this took so long. I was
working on another project, and couldn't spare the computing time to
build the whole system from scratch due to these patches.
[-- Attachment #2: v3-0001-build-system-python-Do-not-double-wrap-executable.patch --]
[-- Type: text/x-patch, Size: 3267 bytes --]
From 6ee5cf4423109ab64df58c85f4114e456dda098b Mon Sep 17 00:00:00 2001
From: Arun Isaac <arunisaac@systemreboot.net>
Date: Wed, 11 Jul 2018 13:03:33 +0530
Subject: [PATCH v3 1/3] build-system: python: Do not double wrap executables.
To: clement@lassieur.org
Cc: mhw@netris.org,
andreas@enge.fr,
32102@debbugs.gnu.org
* guix/build/python-build-system.scm (wrap): Only wrap executables that have
not already been wrapped.
* guix/build/utils.scm (is-wrapped?): New function.
---
guix/build/python-build-system.scm | 9 ++++-----
guix/build/utils.scm | 9 +++++++++
2 files changed, 13 insertions(+), 5 deletions(-)
diff --git a/guix/build/python-build-system.scm b/guix/build/python-build-system.scm
index 376ea81f1..05e5009a4 100644
--- a/guix/build/python-build-system.scm
+++ b/guix/build/python-build-system.scm
@@ -5,6 +5,7 @@
;;; Copyright © 2015, 2018 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2016 Hartmut Goebel <h.goebel@crazy-compilers.com>
;;; Copyright © 2018 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2018 Arun Isaac <arunisaac@systemreboot.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -186,11 +187,9 @@ when running checks after installing the package."
(define* (wrap #:key inputs outputs #:allow-other-keys)
(define (list-of-files dir)
- (map (cut string-append dir "/" <>)
- (or (scandir dir (lambda (f)
- (let ((s (stat (string-append dir "/" f))))
- (eq? 'regular (stat:type s)))))
- '())))
+ (find-files dir (lambda (file stat)
+ (and (eq? 'regular (stat:type stat))
+ (not (is-wrapped? file))))))
(define bindirs
(append-map (match-lambda
diff --git a/guix/build/utils.scm b/guix/build/utils.scm
index c58a1afd1..c310b792c 100644
--- a/guix/build/utils.scm
+++ b/guix/build/utils.scm
@@ -3,6 +3,7 @@
;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
;;; Copyright © 2015, 2018 Mark H Weaver <mhw@netris.org>
+;;; Copyright © 2018 Arun Isaac <arunisaac@systemreboot.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -21,6 +22,7 @@
(define-module (guix build utils)
#:use-module (srfi srfi-1)
+ #:use-module (srfi srfi-2)
#:use-module (srfi srfi-11)
#:use-module (srfi srfi-26)
#:use-module (srfi srfi-34)
@@ -87,6 +89,7 @@
patch-/usr/bin/file
fold-port-matches
remove-store-references
+ is-wrapped?
wrap-program
invoke
@@ -1003,6 +1006,12 @@ known as `nuke-refs' in Nixpkgs."
(put-u8 out (char->integer char))
result))))))
+(define (is-wrapped? prog)
+ "Return #t if PROG is already wrapped using wrap-program, else return #f."
+ (with-directory-excursion (dirname prog)
+ (and-let* ((match-record (string-match "^\\.(.*)-real$" (basename prog))))
+ (access? (match:substring match-record 1) X_OK))))
+
(define* (wrap-program prog #:rest vars)
"Make a wrapper for PROG. VARS should look like this:
--
2.18.0
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: v3-0002-gnu-gajim-Rename-wrap-program-phases.patch --]
[-- Type: text/x-patch, Size: 1613 bytes --]
From 1a1762da6e62d7bcf6556df300299d9cfc995d0f Mon Sep 17 00:00:00 2001
From: Arun Isaac <arunisaac@systemreboot.net>
Date: Sat, 28 Jul 2018 17:27:26 +0530
Subject: [PATCH v3 2/3] gnu: gajim: Rename wrap-program phases.
To: clement@lassieur.org
Cc: mhw@netris.org,
andreas@enge.fr,
32102@debbugs.gnu.org
* gnu/packages/messaging.scm (gajim)[arguments]: Rename wrap-program phases to
wrap-gi-typelib-path and wrap-gsettings-schema-dir.
---
gnu/packages/messaging.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm
index a34f74465..0c6c2f642 100644
--- a/gnu/packages/messaging.scm
+++ b/gnu/packages/messaging.scm
@@ -586,7 +586,7 @@ was initially a fork of xmpppy, but uses non-blocking sockets.")
(arguments
`(#:phases
(modify-phases %standard-phases
- (add-after 'install 'wrap-program
+ (add-after 'install 'wrap-gi-typelib-path
(lambda* (#:key outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out")))
(for-each
@@ -628,7 +628,7 @@ was initially a fork of xmpppy, but uses non-blocking sockets.")
(symlink adwaita "Adwaita")
(copy-recursively hicolor "hicolor")))
#t))
- (add-after 'install-icons 'wrap-program
+ (add-after 'install-icons 'wrap-gsettings-schema-dir
(lambda* (#:key inputs outputs #:allow-other-keys)
(wrap-program (string-append (assoc-ref outputs "out")
"/bin/gajim")
--
2.18.0
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #4: v3-0003-gnu-gajim-Return-t-from-wrap-gsettings-schema-dir.patch --]
[-- Type: text/x-patch, Size: 1181 bytes --]
From 71a7f6e39bd5b68b596bda2a75b1d245179349d0 Mon Sep 17 00:00:00 2001
From: Arun Isaac <arunisaac@systemreboot.net>
Date: Sat, 28 Jul 2018 17:31:44 +0530
Subject: [PATCH v3 3/3] gnu: gajim: Return #t from wrap-gsettings-schema-dir
phase.
To: clement@lassieur.org
Cc: mhw@netris.org,
andreas@enge.fr,
32102@debbugs.gnu.org
* gnu/packages/messaging.scm (gajim)[arguments]: Return #t from
wrap-gsettings-schema-dir phase.
---
gnu/packages/messaging.scm | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm
index 0c6c2f642..da0d28325 100644
--- a/gnu/packages/messaging.scm
+++ b/gnu/packages/messaging.scm
@@ -635,7 +635,8 @@ was initially a fork of xmpppy, but uses non-blocking sockets.")
;; For GtkFileChooserDialog.
`("GSETTINGS_SCHEMA_DIR" =
(,(string-append (assoc-ref inputs "gtk+")
- "/share/glib-2.0/schemas")))))))))
+ "/share/glib-2.0/schemas"))))
+ #t)))))
(native-inputs
`(("intltool" ,intltool)
("xorg-server" ,xorg-server)))
--
2.18.0
next prev parent reply other threads:[~2018-07-28 20:44 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-09 1:31 [bug#32102] [PATCH] utils: Fix wrap-program filename generation Arun Isaac
2018-07-09 7:35 ` Clément Lassieur
2018-07-09 10:49 ` Arun Isaac
2018-07-09 14:12 ` Clément Lassieur
2018-07-10 5:16 ` Arun Isaac
2018-07-10 8:57 ` Clément Lassieur
2018-07-10 18:13 ` Mark H Weaver
2018-07-11 19:26 ` [bug#32102] [PATCH v2 0/2] build-system: python: Only wrap non-hidden executable files Arun Isaac
2018-07-11 19:26 ` [bug#32102] [PATCH v2 1/2] " Arun Isaac
2018-07-13 7:42 ` Clément Lassieur
2018-07-13 8:35 ` Arun Isaac
2018-07-11 19:26 ` [bug#32102] [PATCH v2 2/2] gnu: gajim: Combine wrap-program phases Arun Isaac
2018-07-13 8:38 ` Clément Lassieur
2018-07-13 9:45 ` Arun Isaac
2018-07-28 20:42 ` Arun Isaac [this message]
2018-07-29 14:20 ` Ludovic Courtès
2018-07-30 0:30 ` Arun Isaac
2018-08-27 11:37 ` Ludovic Courtès
2018-08-28 8:37 ` Arun Isaac
2018-08-29 20:42 ` Ludovic Courtès
2018-11-22 16:54 ` Arun Isaac
2018-11-23 9:09 ` Ludovic Courtès
2018-11-27 10:43 ` bug#32102: " Arun Isaac
2018-11-27 12:24 ` [bug#32102] " Clément Lassieur
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
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cu7h8kjjdm5.fsf@systemreboot.net \
--to=arunisaac@systemreboot.net \
--cc=32102@debbugs.gnu.org \
--cc=clement@lassieur.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 public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).