Merge pull request #2757 from cgwalters/always-staged

daemon: Always write `staged` JSON field
This commit is contained in:
Luca Bruno 2021-04-19 07:24:12 +00:00 committed by GitHub
commit c44ba69c19
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -61,8 +61,8 @@ pub(crate) fn deployment_populate_variant(
}
/* Staging status */
dict.insert("staged", &deployment.is_staged());
if deployment.is_staged() {
dict.insert("staged", &true);
if std::path::Path::new("/run/ostree/staged-deployment-locked").exists() {
dict.insert("finalization-locked", &true);
}

View File

@ -16,7 +16,8 @@ assert_jq status.json \
'.deployments[0]["requested-base-removals"]' \
'.deployments[0]["live-inprogress"]|not' \
'.deployments[0]["live-replaced"]|not' \
'.deployments[0]["layered-commit-meta"]|not'
'.deployments[0]["layered-commit-meta"]|not' \
'.deployments[0]["staged"]|not'
rm status.json
rpm-ostree testutils validate-parse-status
echo "ok empty pkg arrays, and commit meta correct in status json"