Closed neggert closed 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
Nic, did this patch fixed your problem? I commit it to GitHub and it works fine for me on Lion/Linux.
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:
Nic, please provide more info, since I am unable to reproduce your problem on either platform. I need to know:
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:
- your OS
- your python -V
- 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
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.
This installer was just downloaded today. I tried manually creating the directory it's complaining about, but it didn't help.