update_engine: Barebone Omaha Request for DLC(s)
No need to maintain certain attributes for DLC update/install request to Omaha.
The list of uneccessary attributes for DLC AppIDs:
- lang
- fw_version
- ec_version
- requisition
BUG=chromium:1039898
TEST=FEATURES=test emerge-$B update_engine
Change-Id: I40efc3435d4c359470464f2dc6e32470cc629938
Reviewed-on: https://chromium-review.googlesource.com/c/aosp/platform/system/update_engine/+/1992192
Tested-by: Jae Hoon Kim <kimjae@chromium.org>
Reviewed-by: Amin Hassani <ahassani@chromium.org>
Commit-Queue: Jae Hoon Kim <kimjae@chromium.org>
diff --git a/omaha_request_builder_xml.cc b/omaha_request_builder_xml.cc
index 95fb183..823894e 100644
--- a/omaha_request_builder_xml.cc
+++ b/omaha_request_builder_xml.cc
@@ -309,14 +309,18 @@
product_components_args +
fingerprint_arg +
buildtype_arg +
- "lang=\"" + XmlEncodeWithDefault(params_->app_lang(), "en-US") + "\" " +
"board=\"" + XmlEncodeWithDefault(params_->os_board()) + "\" " +
"hardware_class=\"" + XmlEncodeWithDefault(params_->hwid()) + "\" " +
- "delta_okay=\"" + delta_okay_str + "\" "
+ "delta_okay=\"" + delta_okay_str + "\" " +
+ install_date_in_days_str +
+
+ // DLC excluded for installs and updates.
+ (app_data.is_dlc ? "" :
+ "lang=\"" + XmlEncodeWithDefault(params_->app_lang(), "en-US") + "\" " +
"fw_version=\"" + XmlEncodeWithDefault(params_->fw_version()) + "\" " +
"ec_version=\"" + XmlEncodeWithDefault(params_->ec_version()) + "\" " +
- install_date_in_days_str +
- requisition_arg +
+ requisition_arg) +
+
">\n" +
app_body +
" </app>\n";
@@ -363,12 +367,14 @@
.version = params_->app_version(),
.product_components = params_->product_components(),
// Skips updatecheck for platform app in case of an install operation.
- .skip_update = params_->is_install()};
+ .skip_update = params_->is_install(),
+ .is_dlc = false};
app_xml += GetApp(product_app);
if (!params_->system_app_id().empty()) {
OmahaAppData system_app = {.id = params_->system_app_id(),
.version = params_->system_version(),
- .skip_update = false};
+ .skip_update = false,
+ .is_dlc = false};
app_xml += GetApp(system_app);
}
// Create APP ID according to |dlc_module_id| (sticking the current AppID to
@@ -377,7 +383,8 @@
OmahaAppData dlc_module_app = {
.id = params_->GetAppId() + "_" + dlc_module_id,
.version = params_->app_version(),
- .skip_update = false};
+ .skip_update = false,
+ .is_dlc = true};
app_xml += GetApp(dlc_module_app);
}
return app_xml;