From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:47714) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hmFul-0000LT-DZ for guix-patches@gnu.org; Sat, 13 Jul 2019 07:10:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hmFuk-0005Qr-CS for guix-patches@gnu.org; Sat, 13 Jul 2019 07:10:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:60923) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hmFuk-0005Qi-8u for guix-patches@gnu.org; Sat, 13 Jul 2019 07:10:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hmFuj-0003Cq-VC for guix-patches@gnu.org; Sat, 13 Jul 2019 07:10:01 -0400 Subject: [bug#36535] [PATCH] gnu: gobject-introspection: Remove hardcoded store from patch. Resent-Message-ID: From: Christopher Baines Date: Sat, 13 Jul 2019 12:09:50 +0100 Message-Id: <20190713110950.13428-1-mail@cbaines.net> In-Reply-To: <87v9w6zvl8.fsf@cbaines.net> References: <87v9w6zvl8.fsf@cbaines.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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: Marius Bakke Cc: 36535@debbugs.gnu.org * 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