87 lines
3.1 KiB
Diff
87 lines
3.1 KiB
Diff
From 2d0a0fd2ed8fda02e01d2f1c5b5054fb9609c112 Mon Sep 17 00:00:00 2001
|
|
From: harvey186 <harvey186@hotmail.com>
|
|
Date: Thu, 12 Dec 2024 10:56:16 +0100
|
|
Subject: [PATCH] build_soong
|
|
|
|
Change-Id: I380083fa2fccbb2e179b2b5c875ea0c60c311909
|
|
---
|
|
1.patch | 53 ++++++++++++++++++++++++++++++++++
|
|
ui/build/androidmk_denylist.go | 1 -
|
|
2 files changed, 53 insertions(+), 1 deletion(-)
|
|
create mode 100644 1.patch
|
|
|
|
diff --git a/1.patch b/1.patch
|
|
new file mode 100644
|
|
index 0000000..df457c8
|
|
--- /dev/null
|
|
+++ b/1.patch
|
|
@@ -0,0 +1,53 @@
|
|
+From 533b5e389bf02c5688c01d9853ac5d8d3b760bbd Mon Sep 17 00:00:00 2001
|
|
+From: Ido Ben-Hur <idoybh2@gmail.com>
|
|
+Date: Mon, 9 Sep 2024 03:12:57 +0300
|
|
+Subject: [PATCH] Revert "Remove timestamp from local build number"
|
|
+
|
|
+We want time in build number, thank you.
|
|
+
|
|
+This reverts commit 1ae7b774eb07eec760dba2750c2a0fa92c815365.
|
|
+
|
|
+Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
|
|
+---
|
|
+ ui/build/build.go | 12 +++++-------
|
|
+ 1 file changed, 5 insertions(+), 7 deletions(-)
|
|
+
|
|
+diff --git a/ui/build/build.go b/ui/build/build.go
|
|
+index 03d839237..9a9eccd7d 100644
|
|
+--- a/ui/build/build.go
|
|
++++ b/ui/build/build.go
|
|
+@@ -21,6 +21,7 @@ import (
|
|
+ "path/filepath"
|
|
+ "sync"
|
|
+ "text/template"
|
|
++ "time"
|
|
+
|
|
+ "android/soong/ui/metrics"
|
|
+ )
|
|
+@@ -65,12 +66,9 @@ func SetupOutDir(ctx Context, config Config) {
|
|
+ // (to allow for source control that uses something other than numbers),
|
|
+ // but must be a single word and a valid file name.
|
|
+ //
|
|
+- // If no BUILD_NUMBER is set, create a useful "I am an engineering build"
|
|
+- // value. Make it start with a non-digit so that anyone trying to parse
|
|
+- // it as an integer will probably get "0". This value used to contain
|
|
+- // a timestamp, but now that more dependencies are tracked in order to
|
|
+- // reduce the importance of `m installclean`, changing it every build
|
|
+- // causes unnecessary rebuilds for local development.
|
|
++ // If no BUILD_NUMBER is set, create a useful "I am an engineering build
|
|
++ // from this date/time" value. Make it start with a non-digit so that
|
|
++ // anyone trying to parse it as an integer will probably get "0".
|
|
+ buildNumber, ok := config.environ.Get("BUILD_NUMBER")
|
|
+ if ok {
|
|
+ writeValueIfChanged(ctx, config, config.OutDir(), "file_name_tag.txt", buildNumber)
|
|
+@@ -79,7 +77,7 @@ func SetupOutDir(ctx Context, config Config) {
|
|
+ if username, ok = config.environ.Get("BUILD_USERNAME"); !ok {
|
|
+ ctx.Fatalln("Missing BUILD_USERNAME")
|
|
+ }
|
|
+- buildNumber = fmt.Sprintf("eng.%.6s.00000000.000000", username)
|
|
++ buildNumber = fmt.Sprintf("eng.%.6s.%s", username, time.Now().Format("20060102.150405" /* YYYYMMDD.HHMMSS */))
|
|
+ writeValueIfChanged(ctx, config, config.OutDir(), "file_name_tag.txt", username)
|
|
+ }
|
|
+ // Write the build number to a file so it can be read back in
|
|
+--
|
|
+2.34.1
|
|
diff --git a/ui/build/androidmk_denylist.go b/ui/build/androidmk_denylist.go
|
|
index 2ec8972..1c62e63 100644
|
|
--- a/ui/build/androidmk_denylist.go
|
|
+++ b/ui/build/androidmk_denylist.go
|
|
@@ -35,7 +35,6 @@ var androidmk_denylist []string = []string{
|
|
"kernel/tests/",
|
|
"libcore/",
|
|
"libnativehelper/",
|
|
- "packages/",
|
|
"pdk/",
|
|
"prebuilts/",
|
|
"sdk/",
|
|
--
|
|
2.34.1
|
|
|