Changeset 35

Show
Ignore:
Timestamp:
01/11/08 00:12:11 (16 years ago)
Author:
broder
Message:

Trying to make this not create different tarballs on different machines

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/locker-bin/macathenaDist.py

    r33 r35  
    11#!/usr/bin/env python 
    22 
     3import tarfile 
     4import os 
     5import time 
     6import shutil 
     7 
     8class 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 
    320def packageCvs(module, cvsModule, extras=['packs/build/autoconf'], cvsroot='/afs/dev.mit.edu/source/repository', date='tomorrow'): 
    4         import os 
    5         import time 
    6         import tarfile 
    7         import shutil 
    8          
    921        os.system('attach macathena >/dev/null 2>/dev/null') 
    1022        os.chdir('/mit/macathena/build') 
     
    2638        os.rename(cvsModule, tarball) 
    2739         
    28         tar = tarfile.open('%s.tar.gz' % tarball, 'w:gz') 
     40        tar = MyTarFile.open('%s.tar.gz' % tarball, 'w:gz') 
    2941        tar.add(tarball) 
    3042        tar.close() 
     
    4456        'getcluster': ['athena/bin/getcluster', ['packs/build/autoconf', 'packs/build/aclocal.m4']], 
    4557        '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']], 
    4860        'discuss': ['athena/bin/discuss']} 
    4961 
     
    5163        import sys 
    5264         
    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: 
    5471                if modules.has_key(arg): 
    5572                        apply(packageCvs, [arg] + modules[arg])