summaryrefslogtreecommitdiffstats
path: root/updater
diff options
context:
space:
mode:
authorTianjie Xu <xunchang@google.com>2017-05-31 23:59:21 +0200
committerandroid-build-merger <android-build-merger@google.com>2017-05-31 23:59:21 +0200
commitd1b65aa645c14c47adde12887e323c73f1345a37 (patch)
treefa6dbca59888863fd350e40cd3e7cd7425c7a8b0 /updater
parentMerge "Implement a custom deflate sink function for bspatch" am: 764eb215af am: 0f8e67088a (diff)
parentMerge "kill package_extract_dir" am: 99e7216907 (diff)
downloadandroid_bootable_recovery-d1b65aa645c14c47adde12887e323c73f1345a37.tar
android_bootable_recovery-d1b65aa645c14c47adde12887e323c73f1345a37.tar.gz
android_bootable_recovery-d1b65aa645c14c47adde12887e323c73f1345a37.tar.bz2
android_bootable_recovery-d1b65aa645c14c47adde12887e323c73f1345a37.tar.lz
android_bootable_recovery-d1b65aa645c14c47adde12887e323c73f1345a37.tar.xz
android_bootable_recovery-d1b65aa645c14c47adde12887e323c73f1345a37.tar.zst
android_bootable_recovery-d1b65aa645c14c47adde12887e323c73f1345a37.zip
Diffstat (limited to 'updater')
-rw-r--r--updater/install.cpp32
1 files changed, 0 insertions, 32 deletions
diff --git a/updater/install.cpp b/updater/install.cpp
index c5f9a89bb..ff79edce0 100644
--- a/updater/install.cpp
+++ b/updater/install.cpp
@@ -61,7 +61,6 @@
#include "mounts.h"
#include "ota_io.h"
#include "otautil/DirUtil.h"
-#include "otautil/ZipUtil.h"
#include "print_sha1.h"
#include "tune2fs.h"
#include "updater/updater.h"
@@ -389,36 +388,6 @@ Value* SetProgressFn(const char* name, State* state, const std::vector<std::uniq
return StringValue(frac_str);
}
-// package_extract_dir(package_dir, dest_dir)
-// Extracts all files from the package underneath package_dir and writes them to the
-// corresponding tree beneath dest_dir. Any existing files are overwritten.
-// Example: package_extract_dir("system", "/system")
-//
-// Note: package_dir needs to be a relative path; dest_dir needs to be an absolute path.
-Value* PackageExtractDirFn(const char* name, State* state,
- const std::vector<std::unique_ptr<Expr>>&argv) {
- if (argv.size() != 2) {
- return ErrorAbort(state, kArgsParsingFailure, "%s() expects 2 args, got %zu", name,
- argv.size());
- }
-
- std::vector<std::string> args;
- if (!ReadArgs(state, argv, &args)) {
- return ErrorAbort(state, kArgsParsingFailure, "%s() Failed to parse the argument(s)", name);
- }
- const std::string& zip_path = args[0];
- const std::string& dest_path = args[1];
-
- ZipArchiveHandle za = static_cast<UpdaterInfo*>(state->cookie)->package_zip;
-
- // To create a consistent system image, never use the clock for timestamps.
- constexpr struct utimbuf timestamp = { 1217592000, 1217592000 }; // 8/1/2008 default
-
- bool success = ExtractPackageRecursive(za, zip_path, dest_path, &timestamp, sehandle);
-
- return StringValue(success ? "t" : "");
-}
-
// package_extract_file(package_file[, dest_file])
// Extracts a single package_file from the update package and writes it to dest_file,
// overwriting existing files if necessary. Without the dest_file argument, returns the
@@ -1037,7 +1006,6 @@ void RegisterInstallFunctions() {
RegisterFunction("format", FormatFn);
RegisterFunction("show_progress", ShowProgressFn);
RegisterFunction("set_progress", SetProgressFn);
- RegisterFunction("package_extract_dir", PackageExtractDirFn);
RegisterFunction("package_extract_file", PackageExtractFileFn);
RegisterFunction("getprop", GetPropFn);