OSDN Git Service

Fix update-tzdata.py to rebuild icu4c .dat file.
authorElliott Hughes <enh@google.com>
Wed, 1 Oct 2014 00:30:01 +0000 (17:30 -0700)
committerElliott Hughes <enh@google.com>
Wed, 1 Oct 2014 17:07:24 +0000 (10:07 -0700)
Bug: 17731498

(cherry picked from commit f8896c6c93fd698b129742780878123a3a19ae07)

Change-Id: If97e1ccf593a2ed6c2356077e660d6fd88a05875

libc/tools/zoneinfo/update-tzdata.py

index e800e8f..f5681be 100755 (executable)
@@ -123,18 +123,21 @@ def BuildIcuToolsAndData(data_filename):
   print 'Making ICU data...'
   subprocess.check_call(['make'])
 
-  # Copy the output files to their ultimate destination.
+  # Copy the source file to its ultimate destination.
   icu_txt_data_dir = '%s/data/misc' % icu_dir
   print 'Copying zoneinfo64.txt to %s ...' % icu_txt_data_dir
   shutil.copy('zoneinfo64.txt', icu_txt_data_dir)
 
+  # Regenerate the .dat file.
   os.chdir(icu_working_dir)
+  subprocess.check_call(['make', '-j32'])
+
+  # Copy the .dat file to its ultimate destination.
   icu_dat_data_dir = '%s/stubdata' % icu_dir
   datfiles = glob.glob('data/out/tmp/icudt??l.dat')
   if len(datfiles) != 1:
     print 'ERROR: Unexpectedly found %d .dat files (%s). Halting.' % (len(datfiles), datfiles)
     sys.exit(1)
-
   datfile = datfiles[0]
   print 'Copying %s to %s ...' % (datfile, icu_dat_data_dir)
   shutil.copy(datfile, icu_dat_data_dir)