Blame SOURCES/0001-gdbus-codegen-Call-abspath-earlier.patch

fd368b
From 9d80b0bca3f90e2489aac8e7765081c47e8a66f5 Mon Sep 17 00:00:00 2001
fd368b
From: Colin Walters <walters@verbum.org>
fd368b
Date: Tue, 31 Oct 2017 12:51:09 -0400
fd368b
Subject: [PATCH] gdbus-codegen: Call abspath() earlier
fd368b
fd368b
The previous change from https://bugzilla.gnome.org/show_bug.cgi?id=786785
fd368b
didn't actually work (for me at least) in the `/bin/gdbus-codegen` case
fd368b
as the relative `/bin/../share` path works, but then `os.path.abspath()`
fd368b
breaks it (as it's not doing `realpath()`, and let's not go there).
fd368b
fd368b
Fix this by doing the `abspath` first.
fd368b
fd368b
Downstream: https://bugzilla.redhat.com/show_bug.cgi?id=1507661
fd368b
---
fd368b
 gio/gdbus-2.0/codegen/gdbus-codegen.in | 5 ++++-
fd368b
 1 file changed, 4 insertions(+), 1 deletion(-)
fd368b
fd368b
diff --git a/gio/gdbus-2.0/codegen/gdbus-codegen.in b/gio/gdbus-2.0/codegen/gdbus-codegen.in
fd368b
index e3f4f00f8..67d367543 100755
fd368b
--- a/gio/gdbus-2.0/codegen/gdbus-codegen.in
fd368b
+++ b/gio/gdbus-2.0/codegen/gdbus-codegen.in
fd368b
@@ -37,6 +37,9 @@ else:
fd368b
     # parent directory to the python path.
fd368b
     path = os.path.join(filedir, '..')
fd368b
 
fd368b
+# Canonicalize, then do further testing
fd368b
+path = os.path.abspath(path)
fd368b
+
fd368b
 # If the above path detection failed, use the hard-coded datadir. This can
fd368b
 # happen when, for instance, bindir and datadir are not in the same prefix or
fd368b
 # on Windows where we cannot make any guarantees about the directory structure.
fd368b
@@ -46,7 +49,7 @@ else:
fd368b
 if not os.path.isfile(os.path.join(path, 'codegen', 'codegen_main.py')):
fd368b
     path = os.path.join('@DATADIR@', 'glib-2.0')
fd368b
 
fd368b
-sys.path.insert(0, os.path.abspath(path))
fd368b
+sys.path.insert(0, path)
fd368b
 from codegen import codegen_main
fd368b
 
fd368b
 sys.exit(codegen_main.codegen_main())
fd368b
-- 
fd368b
2.13.6
fd368b