From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38351) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fjW4M-0004vc-Ht for guix-patches@gnu.org; Sat, 28 Jul 2018 16:44:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fjW4I-0001nH-TH for guix-patches@gnu.org; Sat, 28 Jul 2018 16:44:06 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:56295) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fjW4I-0001n8-LI for guix-patches@gnu.org; Sat, 28 Jul 2018 16:44:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fjW4I-0008MX-5P for guix-patches@gnu.org; Sat, 28 Jul 2018 16:44:02 -0400 Subject: [bug#32102] [PATCH v2 2/2] gnu: gajim: Combine wrap-program phases. Resent-Message-ID: From: Arun Isaac In-Reply-To: References: <20180711192652.20186-1-arunisaac@systemreboot.net> <20180711192652.20186-3-arunisaac@systemreboot.net> <87zhyv1qe8.fsf@lassieur.org> Date: Sun, 29 Jul 2018 02:12:58 +0530 Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: =?UTF-8?Q?Cl=C3=A9ment?= Lassieur Cc: 32102@debbugs.gnu.org --=-=-= Content-Type: text/plain 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. --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline; filename=v3-0001-build-system-python-Do-not-double-wrap-executable.patch Content-Transfer-Encoding: quoted-printable >From 6ee5cf4423109ab64df58c85f4114e456dda098b Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Wed, 11 Jul 2018 13:03:33 +0530 Subject: [PATCH v3 1/3] build-system: python: Do not double wrap executable= s. 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-s= ystem.scm index 376ea81f1..05e5009a4 100644 --- a/guix/build/python-build-system.scm +++ b/guix/build/python-build-system.scm @@ -5,6 +5,7 @@ ;;; Copyright =C2=A9 2015, 2018 Mark H Weaver ;;; Copyright =C2=A9 2016 Hartmut Goebel ;;; Copyright =C2=A9 2018 Ricardo Wurmus +;;; Copyright =C2=A9 2018 Arun Isaac ;;; ;;; This file is part of GNU Guix. ;;; @@ -186,11 +187,9 @@ when running checks after installing the package." =20 (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)))))) =20 (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 =C2=A9 2013 Andreas Enge ;;; Copyright =C2=A9 2013 Nikita Karetnikov ;;; Copyright =C2=A9 2015, 2018 Mark H Weaver +;;; Copyright =C2=A9 2018 Arun Isaac ;;; ;;; This file is part of GNU Guix. ;;; @@ -21,6 +22,7 @@ =20 (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 =20 invoke @@ -1003,6 +1006,12 @@ known as `nuke-refs' in Nixpkgs." (put-u8 out (char->integer char)) result)))))) =20 +(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: =20 --=20 2.18.0 --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=v3-0002-gnu-gajim-Rename-wrap-program-phases.patch >From 1a1762da6e62d7bcf6556df300299d9cfc995d0f Mon Sep 17 00:00:00 2001 From: Arun Isaac 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 --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=v3-0003-gnu-gajim-Return-t-from-wrap-gsettings-schema-dir.patch >From 71a7f6e39bd5b68b596bda2a75b1d245179349d0 Mon Sep 17 00:00:00 2001 From: Arun Isaac 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 --=-=-=--