Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 209805 - sci-chemistry/cns environment is not correctly setup
Summary: sci-chemistry/cns environment is not correctly setup
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Gentoo Chemistry-Related Packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-02-12 09:34 UTC by Louic Vermeer
Modified: 2008-08-03 17:01 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Louic Vermeer 2008-02-12 09:34:54 UTC
When running CNS it cannot find its files because the "sed" commands in the ebuild that edit the cns_solve_env files do not seem to set the actual location of the files.

Reproducible: Always

Steps to Reproduce:
1.emerge cns
2.try to run cns (I tried to run the anneal.inp and accept.inp module and can give you the files I used for the run on request)

Actual Results:  
cns does not run and gives an error message about not being able to find the location of the "toppar" files.

After manually correcting the locations in /etc/profile.d/cns_solve_env.sh it runs nicely.

Expected Results:  
It should have run.

I did not check the cns_solve_env.csh script, but maybe it also contains the wrong locations.
Comment 1 Donnie Berkholz (RETIRED) gentoo-dev 2008-02-12 17:56:34 UTC
It would be helpful if you could attach a diff (diff -u originalfile newfile > cns.diff) between the original file and the fixed file, or at least the fixed version.
Comment 2 Louic Vermeer 2008-02-12 19:03:14 UTC
Here is the diff that that works for me
(note that I changed the filenames to .ORIGINAL and .EDITED)

I do not know if it fixes the locations for all of the cns possibilities, but it fixes mine. It would be good to check what the variables are supposed to point to exactly, because this is just a quick (egoistic) fix. In the weekend I may have some time to check this fix and make a better one if necessary.

--- cns_solve_env.sh.ORIGINAL   2008-02-12 19:39:45.000000000 +0100
+++ cns_solve_env.sh.EDITED     2008-02-12 19:50:12.000000000 +0100
@@ -18,7 +18,7 @@
 export _POSIX2_VERSION; _POSIX2_VERSION=199209
        CNS_SOLVE=/usr
 export CNS_ROOT=/usr
-export CNS_DATA=$CNS_ROOT/share/data
+export CNS_DATA=$CNS_ROOT/share/cns
 export CNS_DOC=$CNS_ROOT/share/doc/cns-1.2-r1

 #
@@ -39,9 +39,9 @@
 #
 # general environmental variables
 #
-export CNS_LIB; CNS_LIB=$CNS_SOLVE/libraries
+export CNS_LIB; CNS_LIB=$CNS_DATA/libraries
 export CNS_MODULE; CNS_MODULE=$CNS_DATA/modules
-export CNS_TOPPAR; CNS_TOPPAR=$CNS_DATA/toppar
+export CNS_TOPPAR; CNS_TOPPAR=$CNS_LIB/toppar
 export CNS_CONFDB; CNS_CONFDB=$CNS_DATA/confdb
 export CNS_XTALLIB; CNS_XTALLIB=$CNS_DATA/xtal
 export CNS_NMRLIB; CNS_NMRLIB=$CNS_DATA/nmr
Comment 3 Louic Vermeer 2008-02-13 08:46:55 UTC
I checked the locations of all cns files and corrected them in /etc/profile.d/cns_solve_env.sh The diff-file is given below.

I think this is what still needs to be done:
- double check the changes I made
- make similar corrections to /etc/profile.d/cns_solve.csh
- edit the sed-stuff in the ebuild so that it puts the correct locations in the two files mentioned after emerging

diff follows (again with changed filenames):

--- cns_solve_env.sh.ORIGINAL   2008-02-12 19:39:45.000000000 +0100
+++ cns_solve_env.sh.EDITED     2008-02-13 09:33:15.000000000 +0100
@@ -18,7 +18,7 @@
 export _POSIX2_VERSION; _POSIX2_VERSION=199209
        CNS_SOLVE=/usr
 export CNS_ROOT=/usr
-export CNS_DATA=$CNS_ROOT/share/data
+export CNS_DATA=$CNS_ROOT/share/cns
 export CNS_DOC=$CNS_ROOT/share/doc/cns-1.2-r1

 #
@@ -39,13 +39,13 @@
 #
 # general environmental variables
 #
-export CNS_LIB; CNS_LIB=$CNS_SOLVE/libraries
+export CNS_LIB; CNS_LIB=$CNS_DATA/libraries
 export CNS_MODULE; CNS_MODULE=$CNS_DATA/modules
-export CNS_TOPPAR; CNS_TOPPAR=$CNS_DATA/toppar
-export CNS_CONFDB; CNS_CONFDB=$CNS_DATA/confdb
-export CNS_XTALLIB; CNS_XTALLIB=$CNS_DATA/xtal
-export CNS_NMRLIB; CNS_NMRLIB=$CNS_DATA/nmr
-export CNS_XRAYLIB; CNS_XRAYLIB=$CNS_DATA/xray
+export CNS_TOPPAR; CNS_TOPPAR=$CNS_LIB/toppar
+export CNS_CONFDB; CNS_CONFDB=$CNS_LIB/confdb
+export CNS_XTALLIB; CNS_XTALLIB=$CNS_LIB/xtal
+export CNS_NMRLIB; CNS_NMRLIB=$CNS_LIB/nmr
+export CNS_XRAYLIB; CNS_XRAYLIB=$CNS_LIB/xray
 export CNS_XTALMODULE; CNS_XTALMODULE=$CNS_MODULE/xtal
 export CNS_NMRMODULE; CNS_NMRMODULE=$CNS_MODULE/nmr
 export CNS_HELPLIB; CNS_HELPLIB=$CNS_DATA/helplib
@@ -54,8 +54,8 @@
 #
 cns_web () { $CNS_SOLVE/bin/cns_web; }
 cns_header () { $CNS_SOLVE/bin/cns_header; }
-cns_info () { cat $CNS_DATA/bin/cns_info; }
-cns_transfer () { $CNS_SOLVE/bin/cns_transfer; }
+cns_info () { cat $CNS_DATA/cns_info; }
+cns_transfer () { $CNS_ROOT/bin/cns_transfer; }
 if [ -x $CNS_SOLVE/bin/cns_edit_local ]; then
   cns_edit () { $CNS_SOLVE/bin/cns_edit_local; }
 else
Comment 4 Donnie Berkholz (RETIRED) gentoo-dev 2008-08-03 07:54:31 UTC
Fixed in 1.2.1, finally. Thanks for your patience in this.
Comment 5 Louic Vermeer 2008-08-03 17:01:49 UTC
(In reply to comment #4)
>Thanks for your patience in this.

Thanks for the fix :)