Bug 210280 - [Tools] jhbuild should respect PKG_CONFIG_PATH
Summary: [Tools] jhbuild should respect PKG_CONFIG_PATH
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Alicia Boya García
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-04-09 08:01 PDT by Alicia Boya García
Modified: 2020-04-10 06:18 PDT (History)
2 users (show)

See Also:


Attachments
Patch (2.87 KB, patch)
2020-04-09 08:05 PDT, Alicia Boya García
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alicia Boya García 2020-04-09 08:01:27 PDT
Our jhbuildrc adds the system paths to PKG_CONFIG_PATH. This is not
necessary, as they are included implicitly by pkg-config, e.g.

$ mkdir /tmp/empty
$ PKG_CONFIG_PATH=/tmp/empty pkg-config --cflags glib-2.0
-I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include

Apart from not being necessary, it is problematic because it makes
impossible to override system libraries in jhbuild-wrapper.

$ PKG_CONFIG_PATH=/home/ntrrgc/Apps/gst-1.10-prefix/lib/pkgconfig/ jhbuild-wrapper --gtk run bash
/webkit/WebKitBuild/DependenciesGTK/Root/lib64/pkgconfig:/webkit/WebKitBuild/DependenciesGTK/Root/lib/pkgconfig:/webkit/WebKitBuild/DependenciesGTK/Root/share/pkgconfig:/usr/share/pkgconfig:/usr/lib64/pkgconfig:/home/ntrrgc/Apps/gst-1.10-prefix/lib/pkgconfig

Note /usr/share/pkgconfig and /usr/lib64/pkgconfig are taking priority
over the user environment.

This patch removes that code, so that the user PKG_CONFIG_PATH takes
priority over the system default paths, while these keep having effect
too as explained before.

$ PKG_CONFIG_PATH=/home/ntrrgc/Apps/gst-1.10-prefix/lib/pkgconfig jhbuild-wrapper --gtk run bash
/webkit/WebKitBuild/DependenciesGTK/Root/lib64/pkgconfig:/webkit/WebKitBuild/DependenciesGTK/Root/lib/pkgconfig:/webkit/WebKitBuild/DependenciesGTK/Root/share/pkgconfig:/home/ntrrgc/Apps/gst-1.10-prefix/lib/pkgconfig
Comment 1 Alicia Boya García 2020-04-09 08:05:15 PDT
Created attachment 395950 [details]
Patch
Comment 2 EWS 2020-04-10 06:18:01 PDT
Committed r259867: <https://trac.webkit.org/changeset/259867>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 395950 [details].