Merge changes from topic "soong_support_libs"
* changes:
Fix support libraries dependencies based on Soong modules
Always statically include Support Libraries, move SDK definitions up a dir
Move Support Library dependencies to their own var with resolution
Allow projects to define their own globally-available variables
diff --git a/envsetup.sh b/envsetup.sh
index 5182253..bad16e2 100644
--- a/envsetup.sh
+++ b/envsetup.sh
@@ -301,7 +301,6 @@
function set_stuff_for_environment()
{
- settitle
setpaths
set_sequence_number
@@ -316,26 +315,6 @@
export BUILD_ENV_SEQUENCE_NUMBER=13
}
-function settitle()
-{
- # This used to be opt-out with STAY_OFF_MY_LAWN, but this breaks folks
- # actually using PROMPT_COMMAND (https://issuetracker.google.com/38402256),
- # and the attempt to set the title doesn't do anything for the default
- # window manager in debian right now, so switch it to opt-in for anyone
- # who actually wants this.
- if [ "$ANDROID_BUILD_SET_WINDOW_TITLE" = "true" ]; then
- local arch=$(gettargetarch)
- local product=$TARGET_PRODUCT
- local variant=$TARGET_BUILD_VARIANT
- local apps=$TARGET_BUILD_APPS
- if [ -z "$apps" ]; then
- export PROMPT_COMMAND="echo -ne \"\033]0;[${arch}-${product}-${variant}] ${USER}@${HOSTNAME}: ${PWD}\007\""
- else
- export PROMPT_COMMAND="echo -ne \"\033]0;[$arch $apps $variant] ${USER}@${HOSTNAME}: ${PWD}\007\""
- fi
- fi
-}
-
function addcompletions()
{
local T dir f
@@ -352,7 +331,6 @@
for f in system/core/adb/adb.bash system/core/fastboot/fastboot.bash; do
if [ -f $f ]; then
- echo "including $f"
. $f
fi
done
diff --git a/target/product/base.mk b/target/product/base.mk
index e778e76..919c16d 100644
--- a/target/product/base.mk
+++ b/target/product/base.mk
@@ -151,6 +151,7 @@
# Packages included only for eng or userdebug builds, previously debug tagged
PRODUCT_PACKAGES_DEBUG := \
+ iotop \
logpersist.start \
perfprofd \
sqlite3 \
diff --git a/tools/releasetools/ota_from_target_files.py b/tools/releasetools/ota_from_target_files.py
index b6c26bf..e8ec50e 100755
--- a/tools/releasetools/ota_from_target_files.py
+++ b/tools/releasetools/ota_from_target_files.py
@@ -1026,7 +1026,7 @@
A string with placeholders for the metadata offset/size info, e.g.
"payload.bin:679:343,payload_properties.txt:378:45,metadata: ".
"""
- return self._GetPropertyFilesString(input_zip, reserve_space=True)
+ return self.GetPropertyFilesString(input_zip, reserve_space=True)
class InsufficientSpaceException(Exception):
pass
@@ -1055,7 +1055,7 @@
InsufficientSpaceException: If the reserved length is insufficient to hold
the final string.
"""
- result = self._GetPropertyFilesString(input_zip, reserve_space=False)
+ result = self.GetPropertyFilesString(input_zip, reserve_space=False)
if len(result) > reserved_length:
raise self.InsufficientSpaceException(
'Insufficient reserved space: reserved={}, actual={}'.format(
@@ -1074,12 +1074,22 @@
Raises:
AssertionError: On finding a mismatch.
"""
- actual = self._GetPropertyFilesString(input_zip)
+ actual = self.GetPropertyFilesString(input_zip)
assert actual == expected, \
"Mismatching streaming metadata: {} vs {}.".format(actual, expected)
- def _GetPropertyFilesString(self, zip_file, reserve_space=False):
- """Constructs the property-files string per request."""
+ def GetPropertyFilesString(self, zip_file, reserve_space=False):
+ """
+ Constructs the property-files string per request.
+
+ Args:
+ zip_file: The input ZIP file.
+ reserved_length: The reserved length of the property-files string.
+
+ Returns:
+ A property-files string including the metadata offset/size info, e.g.
+ "payload.bin:679:343,payload_properties.txt:378:45,metadata: ".
+ """
def ComputeEntryOffsetSize(name):
"""Computes the zip entry offset and size."""
diff --git a/tools/releasetools/test_ota_from_target_files.py b/tools/releasetools/test_ota_from_target_files.py
index 0eb24b5..213e830 100644
--- a/tools/releasetools/test_ota_from_target_files.py
+++ b/tools/releasetools/test_ota_from_target_files.py
@@ -774,8 +774,7 @@
zip_file = self.construct_zip_package(entries)
property_files = TestPropertyFiles()
with zipfile.ZipFile(zip_file, 'r') as zip_fp:
- # pylint: disable=protected-access
- raw_metadata = property_files._GetPropertyFilesString(
+ raw_metadata = property_files.GetPropertyFilesString(
zip_fp, reserve_space=False)
streaming_metadata = property_files.Finalize(zip_fp, len(raw_metadata))
tokens = self._parse_property_files_string(streaming_metadata)
@@ -798,8 +797,7 @@
property_files = TestPropertyFiles()
with zipfile.ZipFile(zip_file, 'r') as zip_fp:
# First get the raw metadata string (i.e. without padding space).
- # pylint: disable=protected-access
- raw_metadata = property_files._GetPropertyFilesString(
+ raw_metadata = property_files.GetPropertyFilesString(
zip_fp, reserve_space=False)
raw_length = len(raw_metadata)
@@ -833,8 +831,7 @@
property_files = TestPropertyFiles()
with zipfile.ZipFile(zip_file, 'r') as zip_fp:
# First get the raw metadata string (i.e. without padding space).
- # pylint: disable=protected-access
- raw_metadata = property_files._GetPropertyFilesString(
+ raw_metadata = property_files.GetPropertyFilesString(
zip_fp, reserve_space=False)
# Should pass the test if verification passes.
@@ -891,8 +888,7 @@
zip_file = self.construct_zip_package(entries)
property_files = StreamingPropertyFiles()
with zipfile.ZipFile(zip_file, 'r') as zip_fp:
- # pylint: disable=protected-access
- raw_metadata = property_files._GetPropertyFilesString(
+ raw_metadata = property_files.GetPropertyFilesString(
zip_fp, reserve_space=False)
streaming_metadata = property_files.Finalize(zip_fp, len(raw_metadata))
tokens = self._parse_property_files_string(streaming_metadata)
@@ -915,8 +911,7 @@
property_files = StreamingPropertyFiles()
with zipfile.ZipFile(zip_file, 'r') as zip_fp:
# First get the raw metadata string (i.e. without padding space).
- # pylint: disable=protected-access
- raw_metadata = property_files._GetPropertyFilesString(
+ raw_metadata = property_files.GetPropertyFilesString(
zip_fp, reserve_space=False)
# Should pass the test if verification passes.
@@ -1051,8 +1046,7 @@
zip_file = self.construct_zip_package_withValidPayload(with_metadata=True)
property_files = AbOtaPropertyFiles()
with zipfile.ZipFile(zip_file, 'r') as zip_fp:
- # pylint: disable=protected-access
- raw_metadata = property_files._GetPropertyFilesString(
+ raw_metadata = property_files.GetPropertyFilesString(
zip_fp, reserve_space=False)
property_files_string = property_files.Finalize(zip_fp, len(raw_metadata))
@@ -1067,8 +1061,7 @@
zip_file = self.construct_zip_package_withValidPayload(with_metadata=True)
property_files = AbOtaPropertyFiles()
with zipfile.ZipFile(zip_file, 'r') as zip_fp:
- # pylint: disable=protected-access
- raw_metadata = property_files._GetPropertyFilesString(
+ raw_metadata = property_files.GetPropertyFilesString(
zip_fp, reserve_space=False)
property_files.Verify(zip_fp, raw_metadata)
@@ -1101,8 +1094,7 @@
zip_file = self.construct_zip_package(entries)
property_files = NonAbOtaPropertyFiles()
with zipfile.ZipFile(zip_file) as zip_fp:
- # pylint: disable=protected-access
- raw_metadata = property_files._GetPropertyFilesString(
+ raw_metadata = property_files.GetPropertyFilesString(
zip_fp, reserve_space=False)
property_files_string = property_files.Finalize(zip_fp, len(raw_metadata))
tokens = self._parse_property_files_string(property_files_string)
@@ -1119,8 +1111,7 @@
zip_file = self.construct_zip_package(entries)
property_files = NonAbOtaPropertyFiles()
with zipfile.ZipFile(zip_file) as zip_fp:
- # pylint: disable=protected-access
- raw_metadata = property_files._GetPropertyFilesString(
+ raw_metadata = property_files.GetPropertyFilesString(
zip_fp, reserve_space=False)
property_files.Verify(zip_fp, raw_metadata)