summaryrefslogtreecommitdiffstats
path: root/debian/get-stage0.py
diff options
context:
space:
mode:
Diffstat (limited to 'debian/get-stage0.py')
-rwxr-xr-xdebian/get-stage0.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/debian/get-stage0.py b/debian/get-stage0.py
index 1f55c53a2..49f8066ca 100755
--- a/debian/get-stage0.py
+++ b/debian/get-stage0.py
@@ -3,6 +3,7 @@
# In that case, you probably just need to override the failing step in our
# DownloadOnlyRustBuild class below.
+import shutil
import sys
import bootstrap
@@ -10,7 +11,7 @@ from bootstrap import RustBuild
class DownloadOnlyRustBuild(RustBuild):
triple = None
- def build_bootstrap(self):
+ def build_bootstrap(self, color, verbose_count):
pass
def run(self, *args):
pass
@@ -25,7 +26,13 @@ def main(argv):
triple = argv.pop(1)
DownloadOnlyRustBuild.triple = triple
bootstrap.RustBuild = DownloadOnlyRustBuild
- bootstrap.bootstrap(False)
+ args = bootstrap.parse_args()
+ # bootstrap.py likes to delete our .cargo directory out from under us
+ shutil.move(".cargo", ".cargo-bak")
+ try:
+ bootstrap.bootstrap(args)
+ finally:
+ shutil.move(".cargo-bak", ".cargo")
if __name__ == '__main__':
main(sys.argv)