Skip to content

Systematic default values of Package Tracker variables #10

@koudis

Description

@koudis

Package tracker variables shall have consistent defaults - OFF or ON or Empty string. Otherwise inconsisne t behaviur is observed and... that's not something that is wanted.

For example, the variable HTTP_HEADER:

BA_PACKAGE_VARS__HTTP_HEADER defaults to "NonExistentHTTPHEADER". When BA_PACKAGE_CMCONF_USE=OFF the IF(BA_PACKAGE_CMCONF_USE) block in STORAGE.cmake is skipped, so BA_PACKAGE_VARS_SET(HTTP_HEADER ...) is never called. The unconditional BA_PACKAGE_VARS_GET(HTTP_HEADER http_header) that follows then reads "NonExistentHTTPHEADER", which is truthy, and the code force-writes CMLIB_FILE_DOWNLOAD_HTTP_HEADER "NonExistentHTTPHEADER". Every CMLIB download in that configure run will send a malformed HTTP header. The existing test/ suite and any downstream project using BA_PACKAGE_CMCONF_USE=OFF for offline testing is affected.

Use an empty string as the default (consistent with ESCAPE_TEMPLATE_ARGS using OFF), or gate the BA_PACKAGE_VARS_GET/CMLIB_FILE_DOWNLOAD_HTTP_HEADER block inside IF(BA_PACKAGE_CMCONF_USE).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions