Merge "Bump the macOS version to 10.10."
diff --git a/apex/apex.go b/apex/apex.go
index 1be87c3..54a335a 100644
--- a/apex/apex.go
+++ b/apex/apex.go
@@ -94,7 +94,6 @@
"libcutils",
"libcutils_headers",
"libdiagnose_usb",
- "liblog",
"liblog_headers",
"libmdnssd",
"libminijail",
@@ -170,7 +169,6 @@
"libicuuc_headers",
"libicuuc_stubdata",
"libjdwp_headers",
- "liblog",
"liblog_headers",
"liblz4",
"liblzma",
@@ -787,7 +785,6 @@
"libjemalloc5",
"liblinker_main",
"liblinker_malloc",
- "liblog",
"liblog_headers",
"liblz4",
"liblzma",
@@ -820,7 +817,6 @@
"libcutils_headers",
"libgtest_prod",
"libjsoncpp",
- "liblog",
"liblog_headers",
"libnativehelper_header_only",
"libnetd_client_headers",
@@ -861,7 +857,6 @@
"libhidltransport-impl-internal",
"libhwbinder-impl-internal",
"libjsoncpp",
- "liblog",
"liblog_headers",
"libprocessgroup",
"libprocessgroup_headers",
diff --git a/ui/build/cleanbuild.go b/ui/build/cleanbuild.go
index 1c4f574..36d4f04 100644
--- a/ui/build/cleanbuild.go
+++ b/ui/build/cleanbuild.go
@@ -237,6 +237,7 @@
if fi.IsDir() {
if err := os.Remove(old); err == nil {
ctx.Println("Removed directory that is no longer installed: ", old)
+ cleanEmptyDirs(ctx, filepath.Dir(old))
} else {
ctx.Println("Failed to remove directory that is no longer installed (%q): %v", old, err)
ctx.Println("It's recommended to run `m installclean`")
@@ -244,6 +245,7 @@
} else {
if err := os.Remove(old); err == nil {
ctx.Println("Removed file that is no longer installed: ", old)
+ cleanEmptyDirs(ctx, filepath.Dir(old))
} else if !os.IsNotExist(err) {
ctx.Fatalf("Failed to remove file that is no longer installed (%q): %v", old, err)
}
@@ -254,3 +256,16 @@
// Use the new list as the base for the next build
os.Rename(file, oldFile)
}
+
+func cleanEmptyDirs(ctx Context, dir string) {
+ files, err := ioutil.ReadDir(dir)
+ if err != nil || len(files) > 0 {
+ return
+ }
+ if err := os.Remove(dir); err == nil {
+ ctx.Println("Removed directory that is no longer installed: ", dir)
+ } else {
+ ctx.Fatalf("Failed to remove directory that is no longer installed (%q): %v", dir, err)
+ }
+ cleanEmptyDirs(ctx, filepath.Dir(dir))
+}