| 22 | |
---|
| 23 | def packageSvn(module, svnModule, extras=[], svnroot='/afs/dev.mit.edu/source/svn-repos', revision='HEAD'): |
---|
| 24 | os.system('attach macathena >/dev/null 2>/dev/null') |
---|
| 25 | os.chdir('/mit/macathena/build') |
---|
| 26 | |
---|
| 27 | os.system('svn export -r %s file://%s/%s %s >/dev/null 2>&1' % (revision, svnroot, svnModule, module)) |
---|
| 28 | |
---|
| 29 | for extra in extras: |
---|
| 30 | os.system('svn export -r %s file://%s/%s >/dev/null 2>&1' % (revision, svnroot, extra)) |
---|
| 31 | os.system('mv %s %s' % (basename(extra), module)) |
---|
| 32 | |
---|
| 33 | version_info = os.popen('svn info -r %s file://%s/%s' % (revision, svnroot, svnModule)).readlines() |
---|
| 34 | for line in version_info: |
---|
| 35 | if line.startswith('Last Changed Date: '): |
---|
| 36 | time_string = line.strip().split(': ')[1][0:19] |
---|
| 37 | elif line.startswith('Last Changed Rev: '): |
---|
| 38 | revision = line.strip().split(': ')[1] |
---|
| 39 | |
---|
| 40 | mtime = int(time.strftime("%s", time.strptime(time_string, "%Y-%m-%d %H:%M:%S"))) |
---|
| 41 | |
---|
| 42 | tarball = "%s-%s" % (module, revision) |
---|
| 43 | os.rename(module, tarball) |
---|
| 44 | |
---|
| 45 | tar = MyTarFile.open('%s.tar.gz' % tarball, 'w:gz') |
---|
| 46 | tar.add(tarball) |
---|
| 47 | tar.close() |
---|
| 48 | |
---|
| 49 | shutil.move('%s.tar.gz' % tarball, '/mit/macathena/dist/') |
---|
| 50 | shutil.rmtree('/mit/macathena/build/%s' % tarball) |
---|
| 51 | |
---|
| 52 | print 'Created /mit/macathena/dist/%s.tar.gz' % tarball |
---|
49 | | modules = {'moira': ['moira', False, '/afs/athena.mit.edu/astaff/project/moiradev/repository'], |
---|
50 | | 'libathdir': ['athena/lib/athdir'], |
---|
51 | | 'athdir': ['athena/bin/athdir'], |
---|
52 | | 'machtype': ['athena/bin/machtype'], |
---|
53 | | 'attachandrun': ['athena/bin/attachandrun'], |
---|
54 | | 'athrun': ['athena/bin/athrun'], |
---|
55 | | 'athinfo': ['athena/bin/athinfo'], |
---|
56 | | 'getcluster': ['athena/bin/getcluster', ['packs/build/autoconf', 'packs/build/aclocal.m4']], |
---|
57 | | 'libxj': ['athena/lib/Xj'], |
---|
58 | | 'libss': ['athena/lib/ss', ['packs/build/autoconf', 'packs/build/aclocal.m4', 'packs/build/libtool']], |
---|
59 | | 'xcluster': ['athena/bin/xcluster', ['packs/build/autoconf', 'packs/build/aclocal.m4']], |
---|
60 | | 'discuss': ['athena/bin/discuss']} |
---|
| 83 | cvsModules = {'moira': ['moira', False, '/afs/athena.mit.edu/astaff/project/moiradev/repository']} |
---|
| 84 | |
---|
| 85 | svnModules = {'libathdir': ['trunk/athena/lib/athdir'], |
---|
| 86 | 'athdir': ['trunk/athena/bin/athdir'], |
---|
| 87 | 'machtype': ['trunk/athena/bin/machtype'], |
---|
| 88 | 'attachandrun': ['trunk/athena/bin/attachandrun'], |
---|
| 89 | 'athrun': ['trunk/athena/bin/athrun'], |
---|
| 90 | 'athinfo': ['trunk/athena/bin/athinfo'], |
---|
| 91 | 'getcluster': ['trunk/athena/bin/getcluster', ['attic/packs/build/aclocal.m4']], |
---|
| 92 | 'libxj': ['trunk/athena/lib/Xj'], |
---|
| 93 | 'xcluster': ['trunk/athena/bin/xcluster', ['attic/packs/build/aclocal.m4']], |
---|
| 94 | 'discuss': ['trunk/athena/bin/discuss']} |
---|