Skip to content

Commit cf4f678

Browse files
committed
Remove moreinfo attribute
The moreinfo attribute is not used by Flatcar and is Mac-specific (see https://github.com/google/omaha/blob/main/doc/ServerProtocolV2.md). Remove the unused moreinfo attribute (for the web view URL shown by Google Software Update Agent on the Mac).
1 parent 756a149 commit cf4f678

File tree

4 files changed

+3
-16
lines changed

4 files changed

+3
-16
lines changed

src/update_engine/omaha_request_action.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ static const char* kTagMaxFailureCountPerUrl = "MaxFailureCountPerUrl";
3939
// Deprecated: "ManifestSize"
4040
// Deprecated: "MetadataSignatureRsa"
4141
// Deprecated: "MetadataSize"
42-
static const char* kTagMoreInfo = "MoreInfo";
42+
// Deprecated: "MoreInfo"; See https://github.com/google/omaha/blob/main/doc/ServerProtocolV2.md
43+
// "And on the Mac, the Google Software Update Agent supports the following optional attributes": Prompt, MoreInfo
4344
static const char* kTagNeedsAdmin = "needsadmin";
4445
static const char* kTagPrompt = "Prompt";
4546
static const char* kTagSha256 = "sha256";
@@ -590,7 +591,6 @@ bool OmahaRequestAction::ParseParams(xmlDoc* doc,
590591
}
591592

592593
// Get the optional properties one by one.
593-
output_object->more_info_url = XmlGetProperty(pie_action_node, kTagMoreInfo);
594594
output_object->needs_admin =
595595
XmlGetProperty(pie_action_node, kTagNeedsAdmin) == "true";
596596
output_object->prompt = XmlGetProperty(pie_action_node, kTagPrompt) == "true";

src/update_engine/omaha_request_action_unittest.cc

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ string GetNoUpdateResponse(const string& app_id) {
6969

7070
string GetUpdateResponse2(const string& app_id,
7171
const string& display_version,
72-
const string& more_info_url,
7372
const string& prompt,
7473
const string& codebase,
7574
const string& filename,
@@ -87,7 +86,7 @@ string GetUpdateResponse2(const string& app_id,
8786
"<packages><package hash=\"not-used\" name=\"" + filename + "\" "
8887
"size=\"" + size + "\"/></packages>"
8988
"<actions><action event=\"postinstall\" "
90-
"MoreInfo=\"" + more_info_url + "\" Prompt=\"" + prompt + "\" "
89+
"Prompt=\"" + prompt + "\" "
9190
"IsDelta=\"true\" "
9291
"IsDeltaPayload=\"true\" "
9392
"sha256=\"" + hash + "\" "
@@ -99,7 +98,6 @@ string GetUpdateResponse2(const string& app_id,
9998

10099
string GetUpdateResponse(const string& app_id,
101100
const string& display_version,
102-
const string& more_info_url,
103101
const string& prompt,
104102
const string& codebase,
105103
const string& filename,
@@ -108,7 +106,6 @@ string GetUpdateResponse(const string& app_id,
108106
const string& size) {
109107
return GetUpdateResponse2(app_id,
110108
display_version,
111-
more_info_url,
112109
prompt,
113110
codebase,
114111
filename,
@@ -211,7 +208,6 @@ TEST(OmahaRequestActionTest, ValidUpdateTest) {
211208
GetDefaultTestParams(),
212209
GetUpdateResponse(OmahaRequestParams::kAppId,
213210
"1.2.3.4", // version
214-
"http://more/info",
215211
"true", // prompt
216212
"http://code/base/", // dl url
217213
"file.signed", // file name
@@ -227,7 +223,6 @@ TEST(OmahaRequestActionTest, ValidUpdateTest) {
227223
EXPECT_TRUE(response.update_exists);
228224
EXPECT_EQ("1.2.3.4", response.display_version);
229225
EXPECT_EQ("http://code/base/file.signed", response.payload_urls[0]);
230-
EXPECT_EQ("http://more/info", response.more_info_url);
231226
EXPECT_EQ("HASH1234=", response.hash);
232227
EXPECT_EQ(123, response.size);
233228
EXPECT_FALSE(response.needs_admin);
@@ -368,7 +363,6 @@ TEST(OmahaRequestActionTest, MissingFieldTest) {
368363
EXPECT_TRUE(response.update_exists);
369364
EXPECT_EQ("1.0.0.0", response.display_version);
370365
EXPECT_EQ("http://missing/field/test/f", response.payload_urls[0]);
371-
EXPECT_EQ("", response.more_info_url);
372366
EXPECT_EQ("lkq34j5345", response.hash);
373367
EXPECT_EQ(587, response.size);
374368
EXPECT_TRUE(response.needs_admin);
@@ -502,7 +496,6 @@ TEST(OmahaRequestActionTest, XmlDecodeTest) {
502496
GetDefaultTestParams(),
503497
GetUpdateResponse(OmahaRequestParams::kAppId,
504498
"1.2.3.4", // version
505-
"testthe&lt;url", // more info
506499
"true", // prompt
507500
"testthe&amp;codebase/", // dl url
508501
"file.signed", // file name
@@ -515,7 +508,6 @@ TEST(OmahaRequestActionTest, XmlDecodeTest) {
515508
&response,
516509
NULL));
517510

518-
EXPECT_EQ(response.more_info_url, "testthe<url");
519511
EXPECT_EQ(response.payload_urls[0], "testthe&codebase/file.signed");
520512
}
521513

@@ -526,7 +518,6 @@ TEST(OmahaRequestActionTest, ParseIntTest) {
526518
GetDefaultTestParams(),
527519
GetUpdateResponse(OmahaRequestParams::kAppId,
528520
"1.2.3.4", // version
529-
"theurl", // more info
530521
"true", // prompt
531522
"thecodebase/", // dl url
532523
"file.signed", // file name

src/update_engine/omaha_response.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ struct OmahaResponse {
4040
// URL (i.e. in terms of Omaha XML, each value is a urlBase + packageName)
4141
std::vector<std::string> payload_urls;
4242

43-
std::string more_info_url;
4443
std::string hash;
4544
off_t size;
4645
// The number of URL-related failures to tolerate before moving on to the

src/update_engine/omaha_response_handler_action_unittest.cc

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@ TEST_F(OmahaResponseHandlerActionTest, SimpleTest) {
8585
in.update_exists = true;
8686
in.display_version = "a.b.c.d";
8787
in.payload_urls.push_back("http://foo/the_update_a.b.c.d.tgz");
88-
in.more_info_url = "http://more/info";
8988
in.hash = "HASH+";
9089
in.size = 12;
9190
in.needs_admin = true;
@@ -102,7 +101,6 @@ TEST_F(OmahaResponseHandlerActionTest, SimpleTest) {
102101
in.update_exists = true;
103102
in.display_version = "a.b.c.d";
104103
in.payload_urls.push_back("http://foo/the_update_a.b.c.d.tgz");
105-
in.more_info_url = "http://more/info";
106104
in.hash = "HASHj+";
107105
in.size = 12;
108106
in.needs_admin = true;
@@ -119,7 +117,6 @@ TEST_F(OmahaResponseHandlerActionTest, SimpleTest) {
119117
in.update_exists = true;
120118
in.display_version = "a.b.c.d";
121119
in.payload_urls.push_back(kLongName);
122-
in.more_info_url = "http://more/info";
123120
in.hash = "HASHj+";
124121
in.size = 12;
125122
in.needs_admin = true;

0 commit comments

Comments
 (0)