@@ -202,9 +202,10 @@ def parse_arguments():
parser.add_argument(
"--cache-dir",
- default=os.environ.get("SSTATE_CACHE_DIR"),
- help="""Specify sstate cache directory, will use the environment
- variable SSTATE_CACHE_DIR if it is not specified.""",
+ default=os.environ.get("SSTATE_CACHE_DIR") or os.environ.get("SSTATE_DIR"),
+ help="""Specify the sstate cache directory. Defaults to the value of the
+ SSTATE_CACHE_DIR environment variable, or SSTATE_DIR if SSTATE_CACHE_DIR
+ is not set.""",
)
# parser.add_argument(
Support KAS users by recognizing the SSTATE_DIR environment variable for configuring the sstate cache directory, as documented in [1]. Yocto respects this variable since KAS includes it in BB_ENV_PASSTHROUGH_ADDITIONS. This improves usability for the many users relying on KAS. [1] https://kas.readthedocs.io/en/latest/userguide/env-vars.html#variables-glossary Signed-off-by: Benjamin Robin <benjamin.robin@bootlin.com> --- scripts/sstate-cache-management.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) --- base-commit: 47021aa89adb81c822e8ec37f17266197914f6b8 change-id: 20260907-sstate-cache-management-sstate-dir-1e2246d3f63a Best regards, -- Benjamin Robin <benjamin.robin@bootlin.com>