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

Issue 492008: AU: Try delta updates first, then full updates (Closed)

Created:
11 years ago by adlr
Modified:
9 years ago
Reviewers:
Daniel Erat
CC:
chromium-os-reviews_googlegroups.com
Visibility:
Public.

Description

AU: Try delta updates first, then full updates Also, some bug fixes.

Patch Set 1 #

Total comments: 50

Patch Set 2 : fixes for review #

Patch Set 3 : fixes for review #

Patch Set 4 : use mkstemp #

Unified diffs Side-by-side diffs Delta from patch set Stats (+486 lines, -162 lines) Patch
M src/platform/update_engine/SConstruct View 1 chunk +9 lines, -1 line 0 comments Download
M src/platform/update_engine/action.h View 5 chunks +7 lines, -7 lines 0 comments Download
M src/platform/update_engine/action_pipe.h View 2 chunks +2 lines, -5 lines 0 comments Download
M src/platform/update_engine/action_pipe_unittest.cc View 1 chunk +3 lines, -0 lines 0 comments Download
M src/platform/update_engine/action_processor.h View 1 chunk +3 lines, -2 lines 0 comments Download
M src/platform/update_engine/action_processor.cc View 1 2 chunks +4 lines, -1 line 0 comments Download
M src/platform/update_engine/action_processor_unittest.cc View 1 2 chunks +4 lines, -1 line 0 comments Download
M src/platform/update_engine/action_unittest.cc View 1 chunk +3 lines, -0 lines 0 comments Download
M src/platform/update_engine/delta_diff_generator.h View 1 2 4 chunks +20 lines, -7 lines 0 comments Download
M src/platform/update_engine/delta_diff_generator.cc View 1 2 3 11 chunks +112 lines, -50 lines 0 comments Download
M src/platform/update_engine/delta_diff_generator_unittest.cc View 12 chunks +44 lines, -20 lines 0 comments Download
M src/platform/update_engine/download_action.h View 2 chunks +0 lines, -4 lines 0 comments Download
M src/platform/update_engine/download_action_unittest.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M src/platform/update_engine/filesystem_copier_action.h View 3 chunks +5 lines, -5 lines 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 1 3 chunks +3 lines, -1 line 0 comments Download
M src/platform/update_engine/gen_coverage_html.sh View 1 chunk +1 line, -1 line 0 comments Download
M src/platform/update_engine/generate_delta_main.cc View 1 1 chunk +53 lines, -18 lines 0 comments Download
M src/platform/update_engine/install_action.cc View 1 3 chunks +5 lines, -3 lines 0 comments Download
M src/platform/update_engine/install_action_unittest.cc View 3 chunks +7 lines, -1 line 0 comments Download
M src/platform/update_engine/integration_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/platform/update_engine/main.cc View 1 1 chunk +147 lines, -0 lines 0 comments Download
M src/platform/update_engine/omaha_request_prep_action.cc View 2 chunks +3 lines, -2 lines 0 comments Download
M src/platform/update_engine/omaha_response_handler_action.h View 3 chunks +6 lines, -1 line 0 comments Download
M src/platform/update_engine/omaha_response_handler_action.cc View 1 2 chunks +3 lines, -1 line 0 comments Download
M src/platform/update_engine/omaha_response_handler_action_unittest.cc View 3 chunks +6 lines, -3 lines 0 comments Download
M src/platform/update_engine/postinstall_runner_action.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/platform/update_engine/postinstall_runner_action_unittest.cc View 1 chunk +2 lines, -1 line 0 comments Download
M src/platform/update_engine/test_utils.h View 1 chunk +1 line, -1 line 0 comments Download
M src/platform/update_engine/test_utils.cc View 1 chunk +13 lines, -14 lines 0 comments Download
M src/platform/update_engine/update_check_action.h View 1 chunk +0 lines, -2 lines 0 comments Download
M src/platform/update_engine/update_check_action_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/platform/update_engine/update_metadata.proto View 1 1 chunk +2 lines, -0 lines 0 comments Download
M src/platform/update_engine/utils.h View 1 4 chunks +8 lines, -4 lines 0 comments Download
M src/platform/update_engine/utils.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/platform/update_engine/utils_unittest.cc View 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
adlr
Look at the bright side: this is the last pending review I have for you.
11 years ago (2009-12-10 21:08:30 UTC) #1
Daniel Erat
http://codereview.chromium.org/492008/diff/1/6 File src/platform/update_engine/delta_diff_generator.cc (right): http://codereview.chromium.org/492008/diff/1/6#newcode344 src/platform/update_engine/delta_diff_generator.cc:344: const std::string& old_dir, Why this instead of adding a ...
11 years ago (2009-12-10 23:29:10 UTC) #2
adlr
http://codereview.chromium.org/492008/diff/1/6 File src/platform/update_engine/delta_diff_generator.cc (right): http://codereview.chromium.org/492008/diff/1/6#newcode344 src/platform/update_engine/delta_diff_generator.cc:344: const std::string& old_dir, On 2009/12/10 23:29:10, Daniel Erat wrote: ...
11 years ago (2009-12-11 00:49:52 UTC) #3
Daniel Erat
http://codereview.chromium.org/492008/diff/1/6 File src/platform/update_engine/delta_diff_generator.cc (right): http://codereview.chromium.org/492008/diff/1/6#newcode344 src/platform/update_engine/delta_diff_generator.cc:344: const std::string& old_dir, On 2009/12/11 00:49:52, adlr wrote: > ...
11 years ago (2009-12-11 01:00:17 UTC) #4
adlr
Thanks for the quick review and comments. http://codereview.chromium.org/492008/diff/1/6 File src/platform/update_engine/delta_diff_generator.cc (right): http://codereview.chromium.org/492008/diff/1/6#newcode344 src/platform/update_engine/delta_diff_generator.cc:344: const std::string& ...
11 years ago (2009-12-11 01:20:10 UTC) #5
Daniel Erat
http://codereview.chromium.org/492008/diff/1/6 File src/platform/update_engine/delta_diff_generator.cc (right): http://codereview.chromium.org/492008/diff/1/6#newcode393 src/platform/update_engine/delta_diff_generator.cc:393: const string kPatchFile = "/tmp/delta.patch"; On 2009/12/11 01:20:10, adlr ...
11 years ago (2009-12-11 01:30:13 UTC) #6
adlr
11 years ago (2009-12-11 01:41:29 UTC) #7
http://codereview.chromium.org/492008/diff/1/6
File src/platform/update_engine/delta_diff_generator.cc (right):

http://codereview.chromium.org/492008/diff/1/6#newcode393
src/platform/update_engine/delta_diff_generator.cc:393: const string kPatchFile
= "/tmp/delta.patch";
On 2009/12/11 01:30:13, Daniel Erat wrote:
> On 2009/12/11 01:20:10, adlr wrote:
> > On 2009/12/11 01:00:17, Daniel Erat wrote:
> > > On 2009/12/11 00:49:52, adlr wrote:
> > > > On 2009/12/10 23:29:10, Daniel Erat wrote:
> > > > > use mkstemp() instead
> > > > 
> > > > mkstemp() opens the file. I need a temporary filename path that's
unopened
> > > which
> > > > I can pass into bsdiff
> > > 
> > > Close it before calling bsdiff?  The copy of bsdiff on my workstation
seems
> to
> > > be fine with the output file already existing.
> > 
> > what I mean is, mkstemp doesn't tell me the filename of the file it creates,
> so
> > how can I pass that file name to bsidff?
> 
> mkstemp() updates the suffix of its 'template' parameter; you can just get it
> from there.

Oh, I never noticed that property of mkstemp. Changed to use mkstemp

http://codereview.chromium.org/492008/diff/1/7
File src/platform/update_engine/delta_diff_generator.h (right):

http://codereview.chromium.org/492008/diff/1/7#newcode37
src/platform/update_engine/delta_diff_generator.h:37: // as a diff. This is
useful for files that change during postinstall, since
On 2009/12/11 01:30:13, Daniel Erat wrote:
> On 2009/12/11 01:20:10, adlr wrote:
> > On 2009/12/11 01:00:17, Daniel Erat wrote:
> > > On 2009/12/11 00:49:52, adlr wrote:
> > > > On 2009/12/10 23:29:10, Daniel Erat wrote:
> > > > > When you say "files that change during postinstall", do you mean that
> > > they're
> > > > > being changed as part of the install process (e.g. .deb postinstall
> > > scripts),
> > > > or
> > > > > "files that can change after being installed"?  If the former, I'm
> > confused;
> > > > > wouldn't you already be running postinstall stuff before applying
future
> > > > > updates?
> > > > 
> > > > The postinstall here doesn't refer to debian package postinstall. It
> refers
> > to
> > > > files that are changed in the postinstall script that's run after
applying
> > an
> > > > update. The only example we have of this is /boot/extlinux.conf (the
> > > bootloader
> > > > configuration file).
> > > 
> > > Okay.  Do we skip running this postinstall script when applying
consecutive
> > > updates, or defer it until after reboot or something?
> > 
> > We run postinst after installing each update (before reboot). So for
> consecutive
> > updates w/o a reboot between, we would run the postinst for each update.
> 
> Okay, so these are (sort of) mutable files that live in the updated partition,
> and we need to update them but can't depend on their previous state on-disk. 
> Can this be simplified by omitting them entirely from the update and writing
> them from scratch in the postinstall script, or does that cause other issues
> that I'm not thinking of?

Your understanding is correct. We could write those files out completely in the
postinst script, but that would complicate the build process.

Plus, long term we aren't going to modify any files on the installed filesystem,
so this will go away.

Powered by Google App Engine
This is Rietveld 408576698