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

Side by Side Diff: postinstall_runner_action.cc

Issue 4679003: AU: Remove obsolete postinst --postcommit call. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/update_engine.git@master
Patch Set: fix copyrights Created 10 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « postinstall_runner_action.h ('k') | postinstall_runner_action_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "update_engine/postinstall_runner_action.h" 5 #include "update_engine/postinstall_runner_action.h"
6 #include <sys/mount.h> 6 #include <sys/mount.h>
7 #include <stdlib.h> 7 #include <stdlib.h>
8 #include <vector> 8 #include <vector>
9 #include "update_engine/subprocess.h" 9 #include "update_engine/subprocess.h"
10 #include "update_engine/utils.h" 10 #include "update_engine/utils.h"
11 11
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 LOG(ERROR) << "Unable to mount destination device " << install_device 51 LOG(ERROR) << "Unable to mount destination device " << install_device
52 << " onto " << temp_dir; 52 << " onto " << temp_dir;
53 return; 53 return;
54 } 54 }
55 ScopedFilesystemUnmounter unmounter(temp_dir); 55 ScopedFilesystemUnmounter unmounter(temp_dir);
56 56
57 // run postinstall script 57 // run postinstall script
58 vector<string> command; 58 vector<string> command;
59 command.push_back(temp_dir + kPostinstallScript); 59 command.push_back(temp_dir + kPostinstallScript);
60 command.push_back(install_device); 60 command.push_back(install_device);
61 command.push_back(precommit_ ? "" : "--postcommit");
62 rc = 0; 61 rc = 0;
63 TEST_AND_RETURN(Subprocess::SynchronousExec(command, &rc)); 62 TEST_AND_RETURN(Subprocess::SynchronousExec(command, &rc));
64 bool success = (rc == 0); 63 bool success = (rc == 0);
65 if (!success) { 64 if (!success) {
66 LOG(ERROR) << "Postinst command failed with code: " << rc; 65 LOG(ERROR) << "Postinst command failed with code: " << rc;
67 return; 66 return;
68 } 67 }
69 } 68 }
70 69
71 if (HasOutputPipe()) { 70 if (HasOutputPipe()) {
72 SetOutputObject(install_plan); 71 SetOutputObject(install_plan);
73 } 72 }
74 completer.set_code(kActionCodeSuccess); 73 completer.set_code(kActionCodeSuccess);
75 } 74 }
76 75
77 } // namespace chromeos_update_engine 76 } // namespace chromeos_update_engine
OLDNEW
« no previous file with comments | « postinstall_runner_action.h ('k') | postinstall_runner_action_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698