After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 685337 - Add command to get information about the JHBuild environment.
Add command to get information about the JHBuild environment.
Status: RESOLVED FIXED
Product: jhbuild
Classification: Infrastructure
Component: general
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: Jhbuild maintainers
Jhbuild QA
Depends on:
Blocks: 685338
 
 
Reported: 2012-10-02 21:25 UTC by Carl-Anton Ingmarsson
Modified: 2012-11-06 11:19 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add envinfo command used to get information about the jhbuild environment. (3.14 KB, patch)
2012-10-02 21:27 UTC, Carl-Anton Ingmarsson
none Details | Review

Description Carl-Anton Ingmarsson 2012-10-02 21:25:26 UTC
It would be great if JHBuild had a command to get information about the build environment. This could for example be used to create a plugin to Anjuta that builds and runs programs inside the JHBuild environment. Information that would be needed for this are.

 1. The environment variables that JHBuild uses in its environment.

 2. The prefix where JHBuild installs things.

 3. The libdir in which libraries are installed.
Comment 1 Carl-Anton Ingmarsson 2012-10-02 21:27:57 UTC
Created attachment 225629 [details] [review]
Add envinfo command used to get information about the jhbuild environment.
Comment 2 Carl-Anton Ingmarsson 2012-10-02 21:43:52 UTC
The relevant Anjuta bug that depends on this is here: https://bugzilla.gnome.org/show_bug.cgi?id=685338
Comment 3 Colin Walters 2012-10-03 00:48:15 UTC
Can you just run whatever command inside "jhbuild run"?
Comment 4 Carl-Anton Ingmarsson 2012-10-03 07:22:42 UTC
That would probably also work. The problem with that approach is that Anjuta shows an environment variable editor when building/running programs where the user can change/remove/add environment variables. So if we run commands inside "jhbuild run" this editor will not show the environment variables that really would be used. Of course this editor may be of limited value when building inside jhbuild and could perhaps be removed in that case.
Comment 5 Carl-Anton Ingmarsson 2012-10-03 07:27:09 UTC
And afaik. running autogen.sh/configure inside "jhbuild run" will not handle passing --prefix and --libdir to the command.
Comment 6 Craig Keogh 2012-10-04 23:26:02 UTC
There are a few ways we can handle getting --prefix and --libdir.

1. You could run 'jhbuild run env'. The prefix is in the environment variable 'JHBUILD_PREFIX'. libdir is in LD_LIBRARY_PATH (there may be other entries in LD_LIBRARY_PATH, you'd have to search for matching JHBUILD_PREFIX'. Or we could easily add JHBUILD_LIBDIR)

2. Add envinfo command, like you propose. I don't have a problem with this.

3. We could provide a Python api. If you have a python interpreter enbedded in Anjuta, you could do something like:  import jhbuild.config; jhbuild.config.get_prefix()

My first preference is 1. Then 2, then 3.
Comment 7 Carl-Anton Ingmarsson 2012-10-09 21:23:14 UTC
Right, the first solution should work so a new command will not be needed :). Having a JHBUILD_LIBDIR would probably help somewhat although extracting it from LD_LIBRARY_PATH is not hard either.
Comment 8 Craig Keogh 2012-11-06 11:19:48 UTC
I added JHBUILD_LIBDIR. Let us know if there is anything else you need.
http://git.gnome.org/browse/jhbuild/commit/?id=5dad9d0003a9b5eaa56f726b6ec7e89d65e775f0