clearlinux / mixer-tools

Software update mixer and related tools
Apache License 2.0
28 stars 37 forks source link

Update mix variables when crossing upstream formats #729

Closed jwakre closed 4 years ago

jwakre commented 4 years ago

When a downstream mix crossed multiple upstream format bumps, the upstreamversion and mix state variables were updated in the workspace, but the changes were not updated in memory. This change reloads the upstreamversion when it is staged/unstaged and reloads the mix state after crossing each format boundary. Additionally, this change increments the format number for each upstream format that the downstream mix crosses.

Fixes #688

Signed-off-by: John Akre john.w.akre@intel.com

ashleshaAtrey commented 4 years ago

while doing a format bump, +10 mix is the last mix in the previous format +20 is the mix in new format

but upstreamformat file has the same upstream format in +10 and +20 mixes. Is that an expected behavior?

jwakre commented 4 years ago

but upstreamformat file has the same upstream format in +10 and +20 mixes. Is that an expected behavior?

@ashleshaAtrey Is the upstreamformat file at: update/www/<mix version>/format or somewhere else?

ashleshaAtrey commented 4 years ago

yes update/www/mix-version/format for +10 and +20 is different but update/www/mix-version/upstreamver is same.

jwakre commented 4 years ago

@ashleshaAtrey

mixer init --clear-version 28000 --no-default-bundles
mixer config set Swupd.BUNDLE os-core
mixer bundle create os-core
mixer bundle add os-core
echo "" > local-bundles/os-core

# Build +0
sudo mixer build all --skip-packs --skip-fullfiles

# Cross 2 upstream formats
mixer versions update --clear-version 32390
sudo mixer build upstream-format

I see the following format/upstreamver values in update/www/*:

v10 (+0): format: 29, upstreamver: 28000 v20 (fb1 +10): format: 29, upstreamver: 29750 v30 (fb1 +20): format: 30, upstreamver: 29750 v40 (fb2 +10): format: 30, upstreamver: 30770 v50 (fb2 +20): format: 31, upstreamver: 30770