Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 340651 - sci-chemistry/vmd: export VMD_PLUGIN_PATH
Summary: sci-chemistry/vmd: export VMD_PLUGIN_PATH
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Justin Lecher (RETIRED)
URL:
Whiteboard: [sci overlay]
Keywords: InOverlay
Depends on:
Blocks:
 
Reported: 2010-10-12 09:38 UTC by Christoph Junghans (RETIRED)
Modified: 2010-10-25 21:30 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
patch for vmd-1.8.7-r2.ebuild (vmd-1.8.7-r2.ebuild.patch,592 bytes, patch)
2010-10-20 20:02 UTC, Christoph Junghans (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Christoph Junghans (RETIRED) gentoo-dev 2010-10-12 09:38:10 UTC
Please add to VMD_PLUGIN_PATH to /etc/env.d/99vmd, because sci-chemistry/gromacs is using it to get vmd plugins.

e.g.
VMD_PLUGIN_PATH=/usr/lib/vmd/plugins/LINUX/molfile
Comment 1 Christoph Junghans (RETIRED) gentoo-dev 2010-10-20 20:02:01 UTC
Created attachment 251361 [details, diff]
patch for vmd-1.8.7-r2.ebuild

CCing jlec to check prefix stuff
Comment 2 Justin Lecher (RETIRED) gentoo-dev 2010-10-21 06:30:47 UTC
I cannot see that vmd is using this variable. The only one I can find is VMDPLUGINPATH. So probably it should be set be gromacs. Otherwise the env of a user who is not using gromacs but using vmd gets polluted unnecessarily.
Comment 3 Christoph Junghans (RETIRED) gentoo-dev 2010-10-21 07:34:14 UTC
> I cannot see that vmd is using this variable. The only one I can find is
> VMDPLUGINPATH. So probably it should be set be gromacs. Otherwise the env of a
> user who is not using gromacs but using vmd gets polluted unnecessarily.
Where is VMDPLUGINPATH used? If this is real the default, we can use this one.

To export VMDPLUGINPATH in sci-chemistry/gromacs seems a bit unlogical to me due to the fact that gromacs does not known about the locations of the plugins.

However, I see the point of not polluting the environment. Would this be default way to handle this in gentoo? 
For example, the gromacs package exports GMXSHARE to tell other program, where its files are. So that would to be the other way around then?


Comment 4 Justin Lecher (RETIRED) gentoo-dev 2010-10-21 10:07:18 UTC
perhaps I was not clear, VMDPLUGINPATH which is in the vmd code. We don't use it but it is known by vmd if set.

I think the best way, is that the package, which uses the variable should set it.
Comment 5 Christoph Junghans (RETIRED) gentoo-dev 2010-10-21 11:56:00 UTC
(In reply to comment #4)
> perhaps I was not clear, VMDPLUGINPATH which is in the vmd code. We don't use
> it but it is known by vmd if set.
Thanks for the clarification, so VMDPLUGINPATH doen't help us much.

> I think the best way, is that the package, which uses the variable should set
> it.
I disagree, I just had a look at the files in /etc/env.d/ and usual one packages sets stuff, which is used for another packages.

@alexxy: What do you think about that?

However, I can also add it to the gromacs ebuild as long as VMD_PLUGIN_PATH is only used there.
Comment 6 Justin Lecher (RETIRED) gentoo-dev 2010-10-21 12:54:10 UTC
I asked around on irc and the consens was that gromacs has to set it.
Comment 7 Christoph Junghans (RETIRED) gentoo-dev 2010-10-21 19:07:54 UTC
added VMD_PLUGIN_PATH to sci-chemistry/gromacs-4.5.9999 for testing.
Comment 8 Kacper Kowalik (Xarthisius) (RETIRED) gentoo-dev 2010-10-21 19:30:58 UTC
(In reply to comment #7)
> added VMD_PLUGIN_PATH to sci-chemistry/gromacs-4.5.9999 for testing.
adding USE="vmd" for optional runtime dep is not the best idea. Just make --enable-dlopen default and create env.d file. It doesn't hurt even if you don't have vmd installed.

Additionally:
"VMD_PLUGIN_PATH=${EPREFIX}/usr/lib/vmd/plugins/*/molfile/" >> "${T}/80gromacs"
^^ that will fail with multilib...
Comment 9 Christoph Junghans (RETIRED) gentoo-dev 2010-10-22 07:11:34 UTC
> (In reply to comment #7)
> adding USE="vmd" for optional runtime dep is not the best idea. 
Why is that ?

> Just make
> --enable-dlopen default and create env.d file. It doesn't hurt even if you
> don't have vmd installed.
That was basically the reason to have in the vmd ebuild, because now we unnecessarily pollute the environment of people using gromacs but not vmd ;-)

> Additionally:
> "VMD_PLUGIN_PATH=${EPREFIX}/usr/lib/vmd/plugins/*/molfile/" >> "${T}/80gromacs"
> ^^ that will fail with multilib...
Fixed!

Comment 10 Kacper Kowalik (Xarthisius) (RETIRED) gentoo-dev 2010-10-22 08:25:02 UTC
(In reply to comment #9)
> > (In reply to comment #7)
> > adding USE="vmd" for optional runtime dep is not the best idea. 
> Why is that ?
Imagine following situation: I've install gromacs[vmd], after a while I get fed up with vmd and unmerge it. Does gromacs still work?

Now, emerge -uDN world will bring vmd back and I don't want it. To get rid of it I have to _reemerge_ gromacs[-vmd]. I'll take my chances with "polluted" environment ;)
Comment 11 Christoph Junghans (RETIRED) gentoo-dev 2010-10-22 10:42:56 UTC
(In reply to comment #10)
> Now, emerge -uDN world will bring vmd back and I don't want it. To get rid of
> it I have to _reemerge_ gromacs[-vmd].
Well, I see the point, but you will have same issue for all non-libs runtime deps switch by a use flag, (git in layman and emacs in gnuplot and ..). I don't see why we should make an exception for gromacs. 

Without a vmd use flag it makes even less sense to export VMD_PLUGIN_PATH.
I think i will add an configure option, like --with-vmddir=XXX, to gromacs.

Comment 12 Kacper Kowalik (Xarthisius) (RETIRED) gentoo-dev 2010-10-22 11:07:46 UTC
(In reply to comment #11)
> Well, I see the point, but you will have same issue for all non-libs runtime
> deps switch by a use flag, (git in layman and emacs in gnuplot and ..). 
Fact that described behaviour can be observed in tree doesn't mean it's right :)

If you want counterargument, see e.g. how logrotate scripts are installed into /etc/logrotate.d 
Comment 13 Christoph Junghans (RETIRED) gentoo-dev 2010-10-25 21:30:59 UTC
(In reply to comment #8)
> Just make
> --enable-dlopen default and create env.d file. It doesn't hurt even if you
> don't have vmd installed.
You are right, I think this is the easiest solution. I add an additional note in the pkg_postinst.