|
|
@@ -883,6 +883,7 @@ def create_unverified_package(
|
|
|
"UNVERIFIED",
|
|
|
"UNVERIFIED_EARLY_BUILD",
|
|
|
"UNVERIFIED_FINAL_CANDIDATE",
|
|
|
+ "VERIFIED_OFFLINE",
|
|
|
}:
|
|
|
raise ValueError("unsupported package class")
|
|
|
early_fields = (
|
|
|
@@ -1094,11 +1095,12 @@ def create_unverified_package(
|
|
|
except (OSError, UnicodeError, json.JSONDecodeError):
|
|
|
return "fail"
|
|
|
return str(value.get("status", "fail")) if isinstance(value, Mapping) else "fail"
|
|
|
+ is_verified = package_class == "VERIFIED_OFFLINE"
|
|
|
validation_summary = {
|
|
|
"schema": "prod2u-p4-normal-v3-validation-summary-v1",
|
|
|
- "status": "UNVERIFIED",
|
|
|
+ "status": "VERIFIED_OFFLINE" if is_verified else "UNVERIFIED",
|
|
|
"delivery_mode": "normal_dual_td",
|
|
|
- "verification_complete": False,
|
|
|
+ "verification_complete": is_verified,
|
|
|
"confirmation_td_present": confirmation_bitstream_sha256 is not None,
|
|
|
"verification_run_id": run_id,
|
|
|
"commit": compatibility_commit,
|
|
|
@@ -1166,7 +1168,7 @@ def create_unverified_package(
|
|
|
"profile": RUNTIME_PROFILE,
|
|
|
"project_id": PROJECT_ID,
|
|
|
"delivery_mode": "normal_dual_td",
|
|
|
- "verification_complete": False,
|
|
|
+ "verification_complete": is_verified,
|
|
|
"confirmation_td_present": confirmation_bitstream_sha256 is not None,
|
|
|
"verification_run_id": run_id,
|
|
|
"commit": compatibility_commit,
|
|
|
@@ -1206,7 +1208,7 @@ def create_unverified_package(
|
|
|
_write_json(package / "package-info.json", package_info)
|
|
|
manifest = {
|
|
|
"schema": PACKAGE_MANIFEST_SCHEMA,
|
|
|
- "status": "UNVERIFIED",
|
|
|
+ "status": "VERIFIED_OFFLINE" if is_verified else "UNVERIFIED",
|
|
|
"package_class": package_class,
|
|
|
"run_id": run_id,
|
|
|
"project_id": PROJECT_ID,
|
|
|
@@ -1272,7 +1274,7 @@ def main() -> int:
|
|
|
package.add_argument("--offline-receipt", type=Path)
|
|
|
package.add_argument(
|
|
|
"--package-class",
|
|
|
- choices=("UNVERIFIED", "UNVERIFIED_EARLY_BUILD", "UNVERIFIED_FINAL_CANDIDATE"),
|
|
|
+ choices=("UNVERIFIED", "UNVERIFIED_EARLY_BUILD", "UNVERIFIED_FINAL_CANDIDATE", "VERIFIED_OFFLINE"),
|
|
|
default="UNVERIFIED",
|
|
|
)
|
|
|
package.add_argument(
|