@@ -397,7 +397,7 @@ def support_xz():
397
397
398
398
if self .rustfmt () and self .rustfmt ().startswith (self .bin_root ()) and (
399
399
not os .path .exists (self .rustfmt ())
400
- or self .program_out_of_date (self .rustfmt_stamp ())
400
+ or self .program_out_of_date (self .rustfmt_stamp (), self . rustfmt_channel )
401
401
):
402
402
if rustfmt_channel :
403
403
tarball_suffix = '.tar.xz' if support_xz () else '.tar.gz'
@@ -407,7 +407,7 @@ def support_xz():
407
407
self .fix_executable ("{}/bin/rustfmt" .format (self .bin_root ()))
408
408
self .fix_executable ("{}/bin/cargo-fmt" .format (self .bin_root ()))
409
409
with output (self .rustfmt_stamp ()) as rustfmt_stamp :
410
- rustfmt_stamp .write (self .date )
410
+ rustfmt_stamp .write (self .date + self . rustfmt_channel )
411
411
412
412
def _download_stage0_helper (self , filename , pattern , tarball_suffix , date = None ):
413
413
if date is None :
@@ -521,12 +521,12 @@ def rustfmt_stamp(self):
521
521
"""
522
522
return os .path .join (self .bin_root (), '.rustfmt-stamp' )
523
523
524
- def program_out_of_date (self , stamp_path ):
524
+ def program_out_of_date (self , stamp_path , extra = "" ):
525
525
"""Check if the given program stamp is out of date"""
526
526
if not os .path .exists (stamp_path ) or self .clean :
527
527
return True
528
528
with open (stamp_path , 'r' ) as stamp :
529
- return self .date != stamp .read ()
529
+ return ( self .date + extra ) != stamp .read ()
530
530
531
531
def bin_root (self ):
532
532
"""Return the binary root directory
0 commit comments