Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lmp/bb-config: use variables instead of the content #311

Merged
merged 2 commits into from
Nov 28, 2023

Conversation

quaresmajose
Copy link
Member

@quaresmajose quaresmajose commented Oct 24, 2023

Let's let bitbake take care of the use of the variables:

LMP_FACTORY_IMAGE
OSTREE_BRANCHNAME
GARAGE_TARGET_VERSION
GARAGE_TARGET_URL
DISTRO_VERSION

All of then have references for other variables:

MACHINE
H_BUILD
LMP_VERSION

BB_ENV_PASSTHROUGH is not needed in this case because all the varaibles needed is already defined in local.conf.
The main reason for this change is to let bitbake track and show what have changed in the cache signatureres.

For example:
When the H_BUILD change, bitbake will show diferences in all variable that is using the H_BUILD somehow and root cause of the cache signature change it's the change of all the afected variables:

H_BUILD
GARAGE_TARGET_VERSION
GARAGE_TARGET_URL
DISTRO_VERSION

With this patch it will show that there are differences in all the variables as in previoes but the root cause of the cache signature change it's just the variable H_BUILD.

@quaresmajose quaresmajose requested a review from a team October 24, 2023 14:32
@quaresmajose quaresmajose marked this pull request as ready for review October 24, 2023 14:32
@@ -195,14 +195,17 @@ fi

# Add build id H_BUILD to output files names
if [ "$CONF_VERSION" == "1" ]; then
cat << EOFEOF >> conf/local.conf
DISTRO_VERSION_append = "-\${H_BUILD}-\${LMP_VERSION}"
cat << 'EOFEOF' >> conf/local.conf
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why changing this line?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed to 'EOFEOF' to not evaluate the variable when writing conf/local.conf

lmp/bb-config.sh Outdated Show resolved Hide resolved
@ricardosalveti
Copy link
Member

Don't we need to change bitbake to allow these env variables to be consumed as well?

@ricardosalveti
Copy link
Member

BB_ENV_PASSTHROUGH or similar.

@MrCry0
Copy link
Contributor

MrCry0 commented Oct 25, 2023

just a note: to avoid rewriting a default BB_ENV_PASSTHROUGH value, it would be better to use BB_ENV_PASSTHROUGH_ADDITIONS

@quaresmajose
Copy link
Member Author

quaresmajose commented Oct 25, 2023

BB_ENV_PASSTHROUGH is not needed in this case because all the varaibles needed is already defined in local.conf.
The main reason for this change is to let bitbake track and show what have changed in the cache signatureres.

For example:
When the H_BUILD change, bitbake will show diferences in all variable that is using the H_BUILD somehow and root cause of the cache signature change it's the change of all the afected variables:

H_BUILD
GARAGE_TARGET_VERSION
GARAGE_TARGET_URL
DISTRO_VERSION

With this patch it will show that there are differences in all the variables as in previoes but the root cause of the cache signature change it's just the variable H_BUILD.

@quaresmajose
Copy link
Member Author

quaresmajose commented Oct 25, 2023

The main intention is to facilitate debugging issue in the sstate-cache, there is no functionality changes in this PR and this only affects the bitbake cache signatures.

Copy link
Contributor

@MrCry0 MrCry0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@angolini
Copy link
Contributor

BB_ENV_PASSTHROUGH is not needed in this case because all the varaibles needed is already defined in local.conf. The main reason for this change is to let bitbake track and show what have changed in the cache signatureres.

For example: When the H_BUILD change, bitbake will show diferences in all variable that is using the H_BUILD somehow and root cause of the cache signature change it's the change of all the afected variables:

H_BUILD
GARAGE_TARGET_VERSION
GARAGE_TARGET_URL
DISTRO_VERSION

With this patch it will show that there are differences in all the variables as in previous but the root cause of the cache signature change it's just the variable H_BUILD.

Please add this note to the PR description.

@quaresmajose
Copy link
Member Author

BB_ENV_PASSTHROUGH is not needed in this case because all the varaibles needed is already defined in local.conf. The main reason for this change is to let bitbake track and show what have changed in the cache signatureres.
For example: When the H_BUILD change, bitbake will show diferences in all variable that is using the H_BUILD somehow and root cause of the cache signature change it's the change of all the afected variables:

H_BUILD
GARAGE_TARGET_VERSION
GARAGE_TARGET_URL
DISTRO_VERSION

With this patch it will show that there are differences in all the variables as in previous but the root cause of the cache signature change it's just the variable H_BUILD.

Please add this note to the PR description.

done

Let's let bitbake take care of the use of the variables:

LMP_FACTORY_IMAGE
OSTREE_BRANCHNAME
GARAGE_TARGET_VERSION
GARAGE_TARGET_URL
DISTRO_VERSION

All of then have references for other variables:

MACHINE
H_BUILD
LMP_VERSION

Signed-off-by: Jose Quaresma <[email protected]>
This contain the extended version used on CI and with this new variable
we make it possible to override it when needed.

Signed-off-by: Jose Quaresma <[email protected]>
Copy link
Member

@ricardosalveti ricardosalveti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, we can land tomorrow morning to avoid possible issues when we're not around.

@quaresmajose
Copy link
Member Author

LGTM, we can land tomorrow morning to avoid possible issues when we're not around.

Please note I don't have privileges to merge this repo

@ricardosalveti ricardosalveti merged commit fcb7d3e into foundriesio:master Nov 28, 2023
2 checks passed
@quaresmajose quaresmajose deleted the bb-config branch November 28, 2023 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants