Ignore:
Timestamp:
Jan 6, 2021 11:13:16 PM (3 years ago)
Author:
toby
Message:

workarounds for missing files

Location:
install
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • install

    • Property svn:ignore set to
      archive
      channeldata.json
      icons
      index.html
      linux-32
      linux-64
      linux-aarch64
      linux-armv6l
      linux-armv7l
      linux-ppc64
      linux-ppc64le
      linux-s390x
      noarch
      osx-64
      osx-arm64
      win-32
      win-64
  • install/g2complete/src/bootstrap.py

    r4645 r4732  
    253253    print(s)
    254254
     255def svncleanup(spath):
     256    cmd = [svn, 'cleanup', spath]
     257    s = subprocess.Popen(cmd,stderr=subprocess.PIPE)
     258    out,err = MakeByte2str(s.communicate())
     259    if err:
     260        print('subversion cleanup returned an error:')
     261        if out: print(out)
     262        if err: print(err)
     263    svntmp = os.path.join(spath,'.svn','tmp')
     264    if not os.path.exists(svntmp):
     265        print('missing subversion tmp directory, fixing')       
     266        cmd = ['mkdir',svntmp]
     267        s = subprocess.Popen(cmd,stderr=subprocess.PIPE)
     268        out,err = MakeByte2str(s.communicate())
     269        if out: print(out)
     270        if err: print(err)
     271   
    255272def svnChecksumPatch(svn,fpath,verstr):
    256273    '''This performs a fix when svn cannot finish an update because of
     
    258275    unclear reasons.
    259276    '''
     277    svntmp = os.path.join(fpath,'.svn','tmp')
     278    if not os.path.exists(svntmp):
     279        print('missing subversion tmp directory')
    260280    print('\nAttempting patch for svn Checksum mismatch error\n')
    261     cmd = [svn,'cleanup',fpath]
    262     showsvncmd(cmd)       
    263     s = subprocess.Popen(cmd,stdout=subprocess.PIPE,stderr=subprocess.PIPE)
    264     out,err = MakeByte2str(s.communicate())
    265     #if err: print('error=',err)
     281    svncleanup(fpath)
    266282    cmd = ['svn','update','--set-depth','empty',
    267283               os.path.join(fpath,'bindist')]
     
    269285    s = subprocess.Popen(cmd,stdout=subprocess.PIPE,stderr=subprocess.PIPE)
    270286    out,err = MakeByte2str(s.communicate())
     287    print(svntmp, os.path.exists(svntmp))
    271288    #if err: print('error=',err)
    272289    try:
     
    276293        msg = 'Failed with import of GSASIIpath. This is unexpected.'
    277294        msg += '\nGSAS-II will not run without correcting this. Contact toby@anl.gov'
     295        print(err)
    278296        BailOut(msg)
    279297    cmd = ['svn','switch',g2home+'/trunk/bindist',
     
    498516        if err:
    499517            print('Retrying after a cleanup...')
    500             cmd = [svn, 'cleanup', path2GSAS2]
    501             s = subprocess.Popen(cmd,stderr=subprocess.PIPE)
    502             out,err = MakeByte2str(s.communicate())
    503             if err:
    504                 print('subversion returned an error:')
    505                 print(out)
    506                 print(err)
     518            svncleanup(path2GSAS2)
    507519        cmd = [svn, 'co', g2home+ 'trunk/', path2GSAS2, '--non-interactive', '--trust-server-cert']
    508520        if proxycmds: cmd += proxycmds
Note: See TracChangeset for help on using the changeset viewer.