ICU-20593 Consuming ignore_xml_deprecates option in BUILDRULES.py.

The option was added in b603285, but the option was not being used.
This commit is contained in:
Shane F. Carr 2019-05-08 10:28:29 -07:00 committed by Shane F. Carr
parent b772241b52
commit 06114c5108

View file

@ -518,15 +518,17 @@ def generate_tree(
# Generate res_index file
synthetic_locales = set()
deprecates_xml_path = os.path.join(os.path.dirname(__file__), xml_filename)
deprecates_xml = ET.parse(deprecates_xml_path)
for child in deprecates_xml.getroot():
if child.tag == "alias":
synthetic_locales.add(child.attrib["from"])
elif child.tag == "emptyLocale":
synthetic_locales.add(child.attrib["locale"])
else:
raise ValueError("Unknown tag in deprecates XML: %s" % child.tag)
if not config.ignore_xml_deprecates:
deprecates_xml_path = os.path.join(
os.path.dirname(__file__), xml_filename)
deprecates_xml = ET.parse(deprecates_xml_path)
for child in deprecates_xml.getroot():
if child.tag == "alias":
synthetic_locales.add(child.attrib["from"])
elif child.tag == "emptyLocale":
synthetic_locales.add(child.attrib["locale"])
else:
raise ValueError("Unknown tag in deprecates XML: %s" % child.tag)
index_input_files = []
for f in input_files:
file_stem = f.filename[f.filename.rfind("/")+1:-4]