From d9bf183ff9205d5b5982ad9834f9103fea4e0679 Mon Sep 17 00:00:00 2001 From: Sangyoon Jang Date: Tue, 10 Jan 2017 14:45:35 +0900 Subject: [PATCH] Rollback xml keep blanks support after parsing hybrid manifest Hybrid installer set default blanks text node support off for generating/merging manifest. However, this may cause unexpected result at other library which is using libxml2. So hybrid installer should rollback this support. This patch fixes smoke test failures. Change-Id: I89aa9b99a30e5068e93f44415829f94abca0ff40 Signed-off-by: Sangyoon Jang --- src/hybrid/step/pkgmgr/step_generate_xml.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/hybrid/step/pkgmgr/step_generate_xml.cc b/src/hybrid/step/pkgmgr/step_generate_xml.cc index 8ab0826..df049ff 100644 --- a/src/hybrid/step/pkgmgr/step_generate_xml.cc +++ b/src/hybrid/step/pkgmgr/step_generate_xml.cc @@ -51,17 +51,20 @@ namespace pkgmgr { bool StepGenerateXml::LoadXmlDocument(const bf::path& wgt_xml_path, const bf::path& tpk_xml_path) { // trim blanks - xmlKeepBlanksDefault(0); + int keep_blanks = xmlKeepBlanksDefault(0); wgt_doc_ = xmlParseFile(wgt_xml_path.string().c_str()); if (!wgt_doc_) { LOG(ERROR) << "Failed to parse file: " << wgt_xml_path; + xmlKeepBlanksDefault(keep_blanks); return false; } tpk_doc_ = xmlParseFile(tpk_xml_path.string().c_str()); if (!tpk_doc_) { LOG(ERROR) << "Failed to parse file: " << tpk_xml_path; + xmlKeepBlanksDefault(keep_blanks); return false; } + xmlKeepBlanksDefault(keep_blanks); return true; } -- 2.7.4