예제 #1
0
def update_tooltool_manifests(build_dir, gecko_dir):
    system = os.path.basename(build_dir)
    new_manifest_file = os.path.join(build_dir, 'releng.manifest')
    manifest = tooltool.open_manifest(new_manifest_file)
    for manifest_glob in PLATFORM_MANIFESTS[system]:
        for platform_manifest_file in glob.glob(os.path.join(gecko_dir, manifest_glob)):
            print(platform_manifest_file)
            platform_manifest = tooltool.open_manifest(platform_manifest_file)
            for i, f in enumerate(platform_manifest.file_records):
                if f.filename.startswith('sccache'):
                    platform_manifest.file_records[i] = manifest.file_records[0]
                    rewrite_manifest_entry(platform_manifest_file, manifest, i)
                    break
예제 #2
0
def update_tooltool_manifests(build_dir, gecko_dir):
    system = os.path.basename(build_dir)
    new_manifest_file = os.path.join(build_dir, 'releng.manifest')
    rev = open(os.path.join(build_dir, 'REV'), 'rb').read().strip()
    manifest = tooltool.open_manifest(new_manifest_file)
    b = io.BytesIO()
    manifest.dump(b)
    new_data = '\n'.join(['{', '    "version": "sccache rev %s",' % rev] + b.getvalue().strip(' \n[]').splitlines()[1:])
    for manifest_glob in PLATFORM_MANIFESTS[system]:
        for platform_manifest_file in glob.glob(os.path.join(gecko_dir, manifest_glob)):
            print(platform_manifest_file)
            platform_manifest = tooltool.open_manifest(platform_manifest_file)
            for i, f in enumerate(platform_manifest.file_records):
                if f.filename.startswith('sccache'):
                    platform_manifest.file_records[i] = manifest.file_records[0]
                    rewrite_manifest_entry(platform_manifest_file, new_data, i)
                    break
예제 #3
0
def getDigests(manifest):
    manifest = tooltool.open_manifest(manifest)
    return [(x.digest, x.algorithm) for x in manifest.file_records]
예제 #4
0
파일: sync.py 프로젝트: fitzgen/tooltool
def getDigests(manifest):
    manifest = tooltool.open_manifest(manifest)
    return [(x.digest, x.algorithm) for x in manifest.file_records]