Bug 896224 - Remove support for the version 1 manifest from the updater. r=bbondy

This commit is contained in:
Robert Strong 2014-03-05 11:43:03 -08:00
Родитель 40e187af87
Коммит d86e99dd28
1 изменённых файлов: 17 добавлений и 21 удалений

Просмотреть файл

@ -11,11 +11,7 @@
* CRLF = "\r\n"
* LWS = 1*( " " | "\t" )
*
* Available methods for the different manifest files:
*
* update.manifest
* ---------------
* method = "add" | "add-if" | "patch" | "patch-if" | "remove"
* Available methods for the manifest file:
*
* updatev2.manifest
* -----------------
@ -3574,7 +3570,8 @@ int AddPreCompleteActions(ActionList *list)
if (rb == nullptr) {
LOG(("AddPreCompleteActions: error getting contents of precomplete " \
"manifest"));
// Applications aren't required to have a precomplete manifest yet.
// Applications aren't required to have a precomplete manifest. The mar
// generation scripts enforce the presence of a precomplete manifest.
return OK;
}
@ -3659,25 +3656,27 @@ int DoUpdate()
return PARSE_ERROR;
}
if (isFirstAction && NS_tstrcmp(token, NS_T("type")) == 0) {
const NS_tchar *type = mstrtok(kQuote, &line);
LOG(("UPDATE TYPE " LOG_S, type));
if (NS_tstrcmp(type, NS_T("complete")) == 0) {
rv = AddPreCompleteActions(&list);
if (rv)
return rv;
}
if (isFirstAction) {
isFirstAction = false;
continue;
// The update manifest isn't required to have a type declaration. The mar
// generation scripts enforce the presence of the type declaration.
if (NS_tstrcmp(token, NS_T("type")) == 0) {
const NS_tchar *type = mstrtok(kQuote, &line);
LOG(("UPDATE TYPE " LOG_S, type));
if (NS_tstrcmp(type, NS_T("complete")) == 0) {
rv = AddPreCompleteActions(&list);
if (rv)
return rv;
}
continue;
}
}
isFirstAction = false;
Action *action = nullptr;
if (NS_tstrcmp(token, NS_T("remove")) == 0) { // rm file
action = new RemoveFile();
}
else if (NS_tstrcmp(token, NS_T("rmdir")) == 0) { // rmdir if empty
else if (NS_tstrcmp(token, NS_T("rmdir")) == 0) { // rmdir if empty
action = new RemoveDir();
}
else if (NS_tstrcmp(token, NS_T("rmrfdir")) == 0) { // rmdir recursive
@ -3706,9 +3705,6 @@ int DoUpdate()
else if (NS_tstrcmp(token, NS_T("patch-if")) == 0) { // Patch if exists
action = new PatchIfFile();
}
else if (NS_tstrcmp(token, NS_T("add-cc")) == 0) { // no longer supported
continue;
}
else {
LOG(("DoUpdate: unknown token: " LOG_S, token));
return PARSE_ERROR;