From f8896c6c93fd698b129742780878123a3a19ae07 Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Tue, 30 Sep 2014 17:30:01 -0700 Subject: [PATCH] Fix update-tzdata.py to rebuild icu4c .dat file. Bug: 17731498 Change-Id: I4c810507c0ca9883dde1bece14530db80485b8f6 --- libc/tools/zoneinfo/update-tzdata.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libc/tools/zoneinfo/update-tzdata.py b/libc/tools/zoneinfo/update-tzdata.py index e800e8f8b..f5681beb2 100755 --- a/libc/tools/zoneinfo/update-tzdata.py +++ b/libc/tools/zoneinfo/update-tzdata.py @@ -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)