Skip to content

Commit 548fe0e

Browse files
committed
Register new snapshots and teach snapshot script to deal with extracting new-style versioned snapshots.
1 parent 1c1bc2f commit 548fe0e

File tree

2 files changed

+10
-21
lines changed

2 files changed

+10
-21
lines changed

src/etc/get-snapshot.py

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,34 +3,16 @@
33
import os, tarfile, hashlib, re, shutil, sys
44
from snapshot import *
55

6-
old_snapshot_files = {
7-
"linux": ["bin/rustc",
8-
"lib/libcore.so",
9-
"lib/libruststd.so",
10-
"lib/librustrt.so",
11-
"lib/librustllvm.so"],
12-
"macos": ["bin/rustc",
13-
"lib/libcore.dylib",
14-
"lib/libruststd.dylib",
15-
"lib/librustrt.dylib",
16-
"lib/librustllvm.dylib"],
17-
"winnt": ["bin/rustc.exe",
18-
"lib/core.dll",
19-
"lib/ruststd.dll",
20-
"lib/rustrt.dll",
21-
"lib/rustllvm.dll"]
22-
}
23-
246
def unpack_snapshot(triple, snap):
257
dl_path = os.path.join(download_dir_base, snap)
268
print("opening snapshot " + dl_path)
279
tar = tarfile.open(dl_path)
2810
kernel = get_kernel(triple)
29-
for name in old_snapshot_files[kernel]:
30-
p = "rust-stage0/" + name
11+
for p in tar.getnames():
12+
name = p.replace("rust-stage0/", "", 1);
3113
stagep = os.path.join(triple, "stage0")
3214
fp = os.path.join(stagep, name)
33-
print("extracting " + fp)
15+
print("extracting " + p)
3416
tar.extract(p, download_unpack_base)
3517
tp = os.path.join(download_unpack_base, p)
3618
shutil.move(tp, fp)

src/snapshots.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
S 2011-12-12 1c1bc2f
2+
winnt-i386 550dc539e8ab6837c52b3a35e6119061490190b1
3+
linux-i386 66c5e97e3072d8c88a52d986d1fadbd43de615a5
4+
macos-i386 c3db65606d7bbea2ae0482b20e177f7463dc58ef
5+
linux-x86_64 c5bbd08e423844ee938c8f6824ba2b3b4dc851b0
6+
macos-x86_64 29accda0ace162169408357371482ddd044b6dd3
7+
18
S 2011-12-07 3ccdd2a
29
linux-i386 7c639851d8a4ae43f781ad4592b6d3b6e0f4837b
310
macos-i386 8fdf95481943aff1953d93eed31528c221d33373

0 commit comments

Comments
 (0)