Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(274)

Issue 2044001: AU: Minor fixes to get it to do full update on real device (Closed)

Created:
10 years, 7 months ago by adlr
Modified:
9 years ago
Reviewers:
davidjames
CC:
chromium-os-reviews_chromium.org, dneiss, adlr
Base URL:
ssh://git@chromiumos-git/chromeos
Visibility:
Public.

Description

AU: Minor fixes to get it to do full update on real device - Link w/ gtest only for unittests. - filesystem_copier_action: always send install plan on the output pipe on success, even if no copy was performed. - omaha_response_handler: properly choose install partition based on new GPT partition spec. - More useful logging to match memento_updater (which update URL is used, dump of the request/response for the update check). - Fixed a bug where I wasn't bonding the proper actions together in update_attempter. BUG=None TEST=attached unittests/did full update on Eee PC

Patch Set 1 #

Total comments: 6

Patch Set 2 : fixes for review #

Unified diffs Side-by-side diffs Delta from patch set Stats (+54 lines, -45 lines) Patch
M src/platform/update_engine/SConstruct View 3 chunks +17 lines, -12 lines 0 comments Download
M src/platform/update_engine/action.h View 1 chunk +1 line, -1 line 0 comments Download
M src/platform/update_engine/filesystem_copier_action.cc View 1 chunk +2 lines, -0 lines 0 comments Download
M src/platform/update_engine/filesystem_copier_action_unittest.cc View 2 chunks +3 lines, -1 line 0 comments Download
M src/platform/update_engine/omaha_request_prep_action.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/platform/update_engine/omaha_response_handler_action.cc View 1 2 chunks +9 lines, -11 lines 0 comments Download
M src/platform/update_engine/omaha_response_handler_action_unittest.cc View 3 chunks +5 lines, -5 lines 0 comments Download
M src/platform/update_engine/update_attempter.cc View 2 chunks +9 lines, -13 lines 0 comments Download
M src/platform/update_engine/update_check_action.cc View 1 2 chunks +7 lines, -1 line 0 comments Download

Messages

Total messages: 3 (0 generated)
adlr
10 years, 7 months ago (2010-05-06 17:52:17 UTC) #1
davidjames
LGTM w/suggestions. (DISCLAIMER: I am completely new to the update manager. If my suggestions are ...
10 years, 7 months ago (2010-05-06 19:54:51 UTC) #2
adlr
10 years, 7 months ago (2010-05-06 20:33:59 UTC) #3
Thanks. fixed and submitted

http://codereview.chromium.org/2044001/diff/1/7
File src/platform/update_engine/omaha_response_handler_action.cc (right):

http://codereview.chromium.org/2044001/diff/1/7#newcode68
src/platform/update_engine/omaha_response_handler_action.cc:68: *it = (*it ==
'3') ? '5' : '3';
On 2010/05/06 19:54:52, davidjames wrote:
> A few questions here.
> 
> 1. Should we log an error when the boot device is empty and/or the partition
> number is not '3' or '5'?

Yes, we do via TEST_AND_RETURN_FALSE

> 2. Should we do more checking to see if the boot device is sane?

added some more checking per our verbal discussion

> 3. Would this be more clear if we split it up into ordinary 'if' statements or
a
> 'switch' statement?
> 
> E.g.
> // Right now, we just switch '3' and '5' partition numbers.
> if (*it == '3') {
>   *it = '5';
> } else if (*it == '5') {
>   *it = '3';
> } else {
>   LOG(ERROR) << "Unrecognized boot device: " << boot_dev.c_str();
>   return false;
> }

i think this is more a judgement call. I prefer the succinctness of the few
lines i have now, and also dan has in general encouraged me in this direction.

http://codereview.chromium.org/2044001/diff/1/9
File src/platform/update_engine/update_attempter.cc (right):

http://codereview.chromium.org/2044001/diff/1/9#newcode79
src/platform/update_engine/update_attempter.cc:79:
BondActions(filesystem_copier_action.get(),
On 2010/05/06 19:54:52, davidjames wrote:
> Looks like you added filesystem_copier_action to the list of actions here.
Could
> you update your log message to mention this?

Done.

http://codereview.chromium.org/2044001/diff/1/10
File src/platform/update_engine/update_check_action.cc (right):

http://codereview.chromium.org/2044001/diff/1/10#newcode197
src/platform/update_engine/update_check_action.cc:197: LOG(INFO) << "Update
check response: " << &response_buffer_[0];
On 2010/05/06 19:54:52, davidjames wrote:
> Might it be more clear to use a string here? Adding a NULL byte to the vector
> here might cause confusion over how long the string really is (because size()
is
> now changed and includes the null byte).
> 
> Here's a sketch of the same code using a string:
> 
> string respose_str(&response_buffer_[0], response_buffer.size());
> LOG(INFO) << "Update check response: " << response_str;

Done.

Powered by Google App Engine
This is Rietveld 408576698