unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Christopher Baines <mail@cbaines.net>
To: Marius Bakke <mbakke@fastmail.com>
Cc: 36535@debbugs.gnu.org
Subject: [bug#36535] [PATCH] gnu: gobject-introspection: Remove hardcoded store from patch.
Date: Sat, 13 Jul 2019 12:09:50 +0100	[thread overview]
Message-ID: <20190713110950.13428-1-mail@cbaines.net> (raw)
In-Reply-To: <87v9w6zvl8.fsf@cbaines.net>

* gnu/packages/patches/gobject-introspection-absolute-shlib-path.patch: Use
the NIX_STORE environment variable, rather than hardcoding the store
directory.
---
 .../gobject-introspection-absolute-shlib-path.patch   | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/gnu/packages/patches/gobject-introspection-absolute-shlib-path.patch b/gnu/packages/patches/gobject-introspection-absolute-shlib-path.patch
index 3c0bb1c6cf..956fa617c3 100644
--- a/gnu/packages/patches/gobject-introspection-absolute-shlib-path.patch
+++ b/gnu/packages/patches/gobject-introspection-absolute-shlib-path.patch
@@ -61,12 +61,14 @@
      parser.add_option_group(group)
 --- a/giscanner/shlibs.py
 +++ b/giscanner/shlibs.py
-@@ -57,6 +57,12 @@ def _ldd_library_pattern(library_name):
+@@ -57,6 +57,14 @@ def _ldd_library_pattern(library_name):
      $""" % re.escape(library_name), re.VERBOSE)
  
  
 +def _ldd_library_guix_pattern(library_name):
-+    store_dir = re.escape('/gnu/store')
++    store_dir = re.escape(
++      os.environ.get("NIX_STORE", default="/gnu/store")
++    )
 +    pattern = r'(%s(?:/[^/]*)+lib%s[^A-Za-z0-9_-][^\s\(\)]*)'
 +    return re.compile(pattern % (store_dir, re.escape(library_name)))
 +
@@ -109,14 +111,15 @@
      if len(patterns) == 0:
          return []
  
-@@ -139,8 +145,11 @@ def resolve_from_ldd_output(libraries, output):
+@@ -139,8 +145,12 @@ def resolve_from_ldd_output(libraries, output):
          if line.endswith(':'):
              continue
          for word in line.split():
 -            for library, pattern in patterns.items():
 -                m = pattern.match(word)
 +            for library, (pattern, guix_pattern) in patterns.items():
-+                if line.find('/gnu/store') != -1:
++                store_dir = os.environ.get("NIX_STORE", default="/gnu/store")
++                if line.find(store_dir) != -1:
 +                    m = guix_pattern.match(word)
 +                else:
 +                    m = pattern.match(word)
-- 
2.22.0

  reply	other threads:[~2019-07-13 11:10 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-07 10:48 [bug#36535] [PATCH] gnu: gobject-introspection: Update absolute-shlib-path.patch Christopher Baines
2019-07-08  7:46 ` bug#36535: " Christopher Baines
2019-07-08 14:21   ` [bug#36535] " Marius Bakke
2019-07-08 15:59     ` Christopher Baines
2019-07-08 16:29       ` Marius Bakke
2019-07-10 17:35         ` Marius Bakke
2019-07-12 18:44         ` Marius Bakke
2019-07-12 23:22           ` Christopher Baines
2019-07-13 11:09             ` Christopher Baines [this message]
2019-07-13 11:11             ` Christopher Baines
2019-07-13 16:46               ` Marius Bakke
2019-07-13 22:14                 ` bug#36535: " Christopher Baines

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=20190713110950.13428-1-mail@cbaines.net \
    --to=mail@cbaines.net \
    --cc=36535@debbugs.gnu.org \
    --cc=mbakke@fastmail.com \
    /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).