mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-30 02:33:55 +00:00
mk: Remove CFG_INSTALL_SNAP logic. #2664
This commit is contained in:
parent
0d04aa78e5
commit
79677f0556
@ -12,13 +12,8 @@ define DEF_SNAP_FOR_STAGE_H
|
|||||||
# $(1) stage
|
# $(1) stage
|
||||||
# $(2) triple
|
# $(2) triple
|
||||||
|
|
||||||
ifdef CFG_INSTALL_SNAP
|
|
||||||
snap-stage$(1)-H-$(2): $$(HSREQ$(1)_H_$(2))
|
|
||||||
$(CFG_PYTHON) $(S)src/etc/make-snapshot.py stage$(1) $(2) install
|
|
||||||
else
|
|
||||||
snap-stage$(1)-H-$(2): $$(HSREQ$(1)_H_$(2))
|
snap-stage$(1)-H-$(2): $$(HSREQ$(1)_H_$(2))
|
||||||
$(CFG_PYTHON) $(S)src/etc/make-snapshot.py stage$(1) $(2)
|
$(CFG_PYTHON) $(S)src/etc/make-snapshot.py stage$(1) $(2)
|
||||||
endif
|
|
||||||
|
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
@ -3,7 +3,4 @@
|
|||||||
|
|
||||||
import snapshot, sys
|
import snapshot, sys
|
||||||
|
|
||||||
if len(sys.argv) == 3:
|
print(snapshot.make_snapshot(sys.argv[1], sys.argv[2]))
|
||||||
print(snapshot.make_snapshot(sys.argv[1], sys.argv[2], ""))
|
|
||||||
else:
|
|
||||||
print(snapshot.make_snapshot(sys.argv[1], sys.argv[2], sys.argv[3]))
|
|
||||||
|
@ -156,7 +156,7 @@ def hash_file(x):
|
|||||||
return scrub(h.hexdigest())
|
return scrub(h.hexdigest())
|
||||||
|
|
||||||
|
|
||||||
def make_snapshot(stage, triple, flag):
|
def make_snapshot(stage, triple):
|
||||||
kernel = get_kernel(triple)
|
kernel = get_kernel(triple)
|
||||||
platform = get_platform(triple)
|
platform = get_platform(triple)
|
||||||
rev = local_rev_short_sha()
|
rev = local_rev_short_sha()
|
||||||
@ -190,33 +190,4 @@ Please make a clean build." % "\n ".join(matches))
|
|||||||
|
|
||||||
shutil.move(file0, file1)
|
shutil.move(file0, file1)
|
||||||
|
|
||||||
if flag == "install":
|
|
||||||
# FIXME (#2664): this is an ugly quick hack; pls make it better
|
|
||||||
path = file1
|
|
||||||
comps = path.split("-")
|
|
||||||
parts = { 'year': comps[2], \
|
|
||||||
'month': comps[3], \
|
|
||||||
'date': comps[4], \
|
|
||||||
'check': comps[5], \
|
|
||||||
'plat': comps[6], \
|
|
||||||
'arch': comps[7], \
|
|
||||||
'sha': comps[8].split(".")[0] }
|
|
||||||
|
|
||||||
shutil.move(path, "dl/" + path)
|
|
||||||
shutil.move('src/snapshots.txt', 'src/snapshots-old.txt')
|
|
||||||
|
|
||||||
newf = open('src/snapshots.txt', 'w')
|
|
||||||
newf.write("T %(year)s-%(month)s-%(date)s %(check)s\n" % parts)
|
|
||||||
newf.write(" %(plat)s-%(arch)s %(sha)s\n\n" % parts)
|
|
||||||
|
|
||||||
oldf = open('src/snapshots-old.txt', 'r')
|
|
||||||
for line in oldf:
|
|
||||||
newf.write(line)
|
|
||||||
oldf.close()
|
|
||||||
|
|
||||||
newf.close()
|
|
||||||
|
|
||||||
os.remove('src/snapshots-old.txt')
|
|
||||||
|
|
||||||
|
|
||||||
return file1
|
return file1
|
||||||
|
Loading…
Reference in New Issue
Block a user