Changeset 35 for trunk/locker-bin
- Timestamp:
- 01/11/08 00:12:11 (17 years ago)
- Files:
-
- trunk/locker-bin/macathenaDist.py (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/locker-bin/macathenaDist.py
r33 r35 1 1 #!/usr/bin/env python 2 2 3 import tarfile 4 import os 5 import time 6 import shutil 7 8 class MyTarFile(tarfile.TarFile): 9 def gettarinfo(self, name=None, arcname=None, fileobj=None): 10 info = tarfile.TarFile.gettarinfo(self, name, arcname, fileobj) 11 info.uid = info.gid = 0 12 info.uname = "root" 13 info.gname = "wheel" 14 15 if info.isdir(): 16 info.mtime = 0 17 18 return info 19 3 20 def packageCvs(module, cvsModule, extras=['packs/build/autoconf'], cvsroot='/afs/dev.mit.edu/source/repository', date='tomorrow'): 4 import os5 import time6 import tarfile7 import shutil8 9 21 os.system('attach macathena >/dev/null 2>/dev/null') 10 22 os.chdir('/mit/macathena/build') … … 26 38 os.rename(cvsModule, tarball) 27 39 28 tar = tarfile.open('%s.tar.gz' % tarball, 'w:gz')40 tar = MyTarFile.open('%s.tar.gz' % tarball, 'w:gz') 29 41 tar.add(tarball) 30 42 tar.close() … … 44 56 'getcluster': ['athena/bin/getcluster', ['packs/build/autoconf', 'packs/build/aclocal.m4']], 45 57 'libxj': ['athena/lib/Xj'], 46 'libss': ['athena/lib/ss' ],47 'xcluster': ['athena/bin/xcluster' ],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']], 48 60 'discuss': ['athena/bin/discuss']} 49 61 … … 51 63 import sys 52 64 53 for arg in sys.argv[1:]: 65 if sys.argv[1] == "all": 66 build = modules.keys() 67 else: 68 build = sys.argv[1:] 69 70 for arg in build: 54 71 if modules.has_key(arg): 55 72 apply(packageCvs, [arg] + modules[arg])