dmwm / cmssh

Interactive shell for CMS experiment
http://cms.cern.ch/
7 stars 2 forks source link

Installer doesn't work #27

Closed neggert closed 12 years ago

neggert commented 12 years ago

This installer was just downloaded today. I tried manually creating the directory it's complaining about, but it didn't help.

[cms] python cmssh_install.py -i -d cmssh                                                  11:23:29 
Checking CMSSW
Bootstrap CMSSW
Traceback (most recent call last):
  File "cmssh_install.py", line 770, in <module>
    main()
  File "cmssh_install.py", line 352, in main
    exe_cmd(sdir, cmd, debug, 'Bootstrap CMSSW', log='bootstrap.log')
  File "cmssh_install.py", line 203, in exe_cmd
    os.chdir(idir)
OSError: [Errno 2] No such file or directory: 'cmssh/soft/CMSSW'
vkuznet commented 12 years ago

it worked for me. Anyway, I re-organize chdirs, please try this patch

diff --git a/cmssh_install.py b/cmssh_install.py
index 5a64fe1..4f74806 100755
--- a/cmssh_install.py
+++ b/cmssh_install.py
@@ -334,11 +334,12 @@ def main():
             os.makedirs(sdir)
         except:
             pass
-        os.chdir(sdir)
         os.environ['VO_CMS_SW_DIR'] = sdir
         os.environ['SCRAM_ARCH'] = arch
         url  = 'http://cmsrep.cern.ch/cmssw/cms/bootstrap.sh'
+        os.chdir(path)
         if  not is_installed(url, path):
+            os.chdir(sdir)
             with open('bootstrap.sh', 'w') as bootstrap:
                  bootstrap.write(getdata(url, {}, debug))
             if  os.uname()[0].lower() == 'linux':
@@ -349,6 +350,7 @@ def main():
             cmd  = 'sh -x $VO_CMS_SW_DIR/bootstrap.sh setup -path $VO_CMS_SW_DIR -arch $SCRAM_ARCH'
             if  unsupported_linux:
                 cmd += ' -unsupported_distribution_hack'
+            os.chdir(path)
             exe_cmd(sdir, cmd, debug, 'Bootstrap CMSSW', log='bootstrap.log')
             apt  = 'source `find $VO_CMS_SW_DIR/$SCRAM_ARCH/external/apt -name init.sh | tail -1`; '
             cmd  = apt
vkuznet commented 12 years ago

Nic, did this patch fixed your problem? I commit it to GitHub and it works fine for me on Lion/Linux.

neggert commented 12 years ago

Sorry for the long delay. I still have the problem. Here's my output, and the directory structure that the installer makes. It looks like it's not creating what you want it to create.


[cms] python cmssh_install.py -i -d cmssh
Checking CMSSW
Traceback (most recent call last):
  File "cmssh_install.py", line 780, in <module>
    main()
  File "cmssh_install.py", line 343, in main
    os.chdir(sdir)
OSError: [Errno 2] No such file or directory: 'cmssh/soft/CMSSW'
[cms] ls -R cmssh
soft

cmssh/soft:
cmssh   install

cmssh/soft/cmssh:
soft

cmssh/soft/cmssh/soft:
CMSSW

cmssh/soft/cmssh/soft/CMSSW:

cmssh/soft/install:
lib

cmssh/soft/install/lib:
python2.6

cmssh/soft/install/lib/python2.6:
site-packages

cmssh/soft/install/lib/python2.6/site-packages:
vkuznet commented 12 years ago

Nic, please provide more info, since I am unable to reproduce your problem on either platform. I need to know:

  1. your OS
  2. your python -V
  3. verify that your cmssh_install.py is latest from the github
neggert commented 12 years ago

I'm on OSX Lion. Python is 2.7.3, installed from homebrew. I get the same problem when I use python 2.6.4 that is installed with FWLite.

I did wget https://raw.github.com/vkuznet/cmssh/master/cmssh_install.py to get the installer.

Nic

On Tuesday, July 3, 2012 at 10:59 AM, Valentin Kuznetsov wrote:

Nic, please provide more info, since I am unable to reproduce your problem on either platform. I need to know:

  1. your OS
  2. your python -V
  3. verify that your cmssh_install.py is latest from the github

Reply to this email directly or view it on GitHub: https://github.com/vkuznet/cmssh/issues/27#issuecomment-6736662

vkuznet commented 12 years ago

Ok, I got it. The problem is that you used relative path for install option, while it must be absolute path. I made necessary check and print appropriate message for end-users. Please get new cmssh_install.py and try again, it should work now.