s/product-services/product_services/g
Attempting to reduce the number of different spellings we have for
"product services" partition in the codebase.
Bug: 112431447
Test: m
Change-Id: I6debd3f5f5abc4bd1e22f2ef11c5fe131915976c
Merged-In: I6debd3f5f5abc4bd1e22f2ef11c5fe131915976c
diff --git a/tools/releasetools/add_img_to_target_files.py b/tools/releasetools/add_img_to_target_files.py
index 22e7f4b..0c9b195 100755
--- a/tools/releasetools/add_img_to_target_files.py
+++ b/tools/releasetools/add_img_to_target_files.py
@@ -73,7 +73,7 @@
OPTIONS.is_signing = False
# Partitions that should have their care_map added to META/care_map.txt.
-PARTITIONS_WITH_CARE_MAP = ('system', 'vendor', 'product', 'product-services',
+PARTITIONS_WITH_CARE_MAP = ('system', 'vendor', 'product', 'product_services',
'odm')
# Use a fixed timestamp (01/01/2009 00:00:00 UTC) for files when packaging
# images. (b/24377993, b/80600931)
@@ -200,19 +200,19 @@
def AddProductServices(output_zip):
- """Turn the contents of PRODUCT_SERVICES into a product-services image and
+ """Turn the contents of PRODUCT_SERVICES into a product_services image and
store it in output_zip."""
img = OutputFile(output_zip, OPTIONS.input_tmp, "IMAGES",
- "product-services.img")
+ "product_services.img")
if os.path.exists(img.input_name):
- print("product-services.img already exists; no need to rebuild...")
+ print("product_services.img already exists; no need to rebuild...")
return img.input_name
block_list = OutputFile(
- output_zip, OPTIONS.input_tmp, "IMAGES", "product-services.map")
+ output_zip, OPTIONS.input_tmp, "IMAGES", "product_services.map")
CreateImage(
- OPTIONS.input_tmp, OPTIONS.info_dict, "product-services", img,
+ OPTIONS.input_tmp, OPTIONS.info_dict, "product_services", img,
block_list=block_list)
return img.name
@@ -666,10 +666,10 @@
has_recovery = OPTIONS.info_dict.get("no_recovery") != "true"
- # {vendor,odm,product,product-services}.img are unlike system.img or
+ # {vendor,odm,product,product_services}.img are unlike system.img or
# system_other.img. Because it could be built from source, or dropped into
# target_files.zip as a prebuilt blob. We consider either of them as
- # {vendor,product,product-services}.img being available, which could be
+ # {vendor,product,product_services}.img being available, which could be
# used when generating vbmeta.img for AVB.
has_vendor = (os.path.isdir(os.path.join(OPTIONS.input_tmp, "VENDOR")) or
os.path.exists(os.path.join(OPTIONS.input_tmp, "IMAGES",
@@ -684,7 +684,7 @@
"PRODUCT_SERVICES")) or
os.path.exists(os.path.join(OPTIONS.input_tmp,
"IMAGES",
- "product-services.img")))
+ "product_services.img")))
has_system_other = os.path.isdir(os.path.join(OPTIONS.input_tmp,
"SYSTEM_OTHER"))
@@ -762,8 +762,8 @@
partitions['product'] = AddProduct(output_zip)
if has_product_services:
- banner("product-services")
- partitions['product-services'] = AddProductServices(output_zip)
+ banner("product_services")
+ partitions['product_services'] = AddProductServices(output_zip)
if has_odm:
banner("odm")
diff --git a/tools/releasetools/build_image.py b/tools/releasetools/build_image.py
index 86ba1a6..af64955 100755
--- a/tools/releasetools/build_image.py
+++ b/tools/releasetools/build_image.py
@@ -909,7 +909,7 @@
if not copy_prop("product_extfs_rsv_pct", "extfs_rsv_pct"):
d["extfs_rsv_pct"] = "0"
copy_prop("product_reserved_size", "partition_reserved_size")
- elif mount_point == "product-services":
+ elif mount_point == "product_services":
copy_prop("avb_product_services_hashtree_enable", "avb_hashtree_enable")
copy_prop("avb_product_services_add_hashtree_footer_args",
"avb_add_hashtree_footer_args")
@@ -1000,7 +1000,7 @@
copy_prop(size_property, "odm_size")
elif mount_point == "product":
copy_prop(size_property, "product_size")
- elif mount_point == "product-services":
+ elif mount_point == "product_services":
copy_prop(size_property, "product_services_size")
return d
@@ -1045,8 +1045,8 @@
mount_point = "oem"
elif image_filename == "product.img":
mount_point = "product"
- elif image_filename == "product-services.img":
- mount_point = "product-services"
+ elif image_filename == "product_services.img":
+ mount_point = "product_services"
else:
print("error: unknown image file name ", image_filename, file=sys.stderr)
sys.exit(1)
diff --git a/tools/releasetools/common.py b/tools/releasetools/common.py
index bf380bc..4195900 100644
--- a/tools/releasetools/common.py
+++ b/tools/releasetools/common.py
@@ -79,7 +79,7 @@
# The partitions allowed to be signed by AVB (Android verified boot 2.0).
AVB_PARTITIONS = ('boot', 'recovery', 'system', 'vendor', 'product',
- 'product-services', 'dtbo', 'odm')
+ 'product_services', 'dtbo', 'odm')
class ErrorCode(object):