Bug 110850

Summary: [GTK] No need to manually add system paths to jhbuildrc
Product: WebKit Reporter: Claudio Saavedra <csaavedra>
Component: WebKitGTKAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: cgarcia, d-r, gustavo, mrobinson
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch gustavo: review+

Claudio Saavedra
Reported 2013-02-25 23:35:13 PST
Tools/gtk/jhbuildrc is manually adding system dirs to PKG_CONFIG_PATH: # Use system libraries while building. if use_lib64: _libdir = 'lib64' else: _libdir = 'lib' addpath('PKG_CONFIG_PATH', os.path.join(os.sep, 'usr', _libdir, 'pkgconfig')) addpath('PKG_CONFIG_PATH', os.path.join(os.sep, 'usr', 'share', 'pkgconfig')) First of all, addpath() seems to be /prefixing/ the path to the env. variable. This might make sense in some cases, but it doesn't when your PKG_CONFIG_PATH is already set to something sensible (for instance, if you are building WebKit from GNOME's jhbuild shell, which sets up the PKG_CONFIG_PATH to the path where GNOME has been built). Moreover, I think this is totally unnecessary. If partial_build is True (see https://mail.gnome.org/archives/desktop-devel-list/2011-July/msg00095.html) and PKG_CONFIG_PATH is empty, Config.setup_env() is already setting it to, at least, use the system libraries. Therefore, I think that our jhbuildrc's addpath(PKG_CONFIG, ..) calls can be safely removed.
Attachments
Patch (1.34 KB, patch)
2013-02-26 02:09 PST, Claudio Saavedra
no flags
Patch (1.45 KB, patch)
2013-02-26 06:40 PST, Claudio Saavedra
gustavo: review+
Claudio Saavedra
Comment 1 2013-02-26 02:09:36 PST
Gustavo Noronha (kov)
Comment 2 2013-02-26 05:19:43 PST
Comment on attachment 190245 [details] Patch OK, and partial_build is set to True by default, makes sense to me. Do you think this is also true of the other paths we're adding here, like the XDG ones that show up in your hunk?
Claudio Saavedra
Comment 3 2013-02-26 05:57:29 PST
Yes, it seems they are also set during initialization: # XDG_DATA_DIRS if self.partial_build: addpath('XDG_DATA_DIRS', '/usr/share') xdgdatadir = os.path.join(self.prefix, 'share') addpath('XDG_DATA_DIRS', xdgdatadir) # XDG_CONFIG_DIRS if self.partial_build: addpath('XDG_CONFIG_DIRS', '/etc') xdgconfigdir = os.path.join(self.prefix, 'etc', 'xdg') addpath('XDG_CONFIG_DIRS', xdgconfigdir)
Claudio Saavedra
Comment 4 2013-02-26 06:40:22 PST
Claudio Saavedra
Comment 5 2013-03-04 08:07:10 PST
Note You need to log in before you can comment on or make changes to this bug.