From: Guy Shapiro Date: Mon, 21 Aug 2017 06:42:48 +0000 (+0300) Subject: lib/sysroot: fix placement for not-default deployment X-Git-Tag: archive/raspbian/2022.1-3+rpi1~1^2~4^2~32^2~76 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=ca61a2bd9d5002ac6cdf2371077e15b0c25da2bc;p=ostree.git lib/sysroot: fix placement for not-default deployment When using the OSTREE_SYSROOT_SIMPLE_WRITE_DEPLOYMENT_FLAGS_NOT_DEFAULT flag, the deployment is said to be added after the booted or merge deployment. Fix the condition to do so instead of adding it in the second place. Closes: #1097 Approved by: cgwalters --- diff --git a/src/libostree/ostree-sysroot.c b/src/libostree/ostree-sysroot.c index 86a4f37a..e6471ab5 100644 --- a/src/libostree/ostree-sysroot.c +++ b/src/libostree/ostree-sysroot.c @@ -1545,7 +1545,7 @@ ostree_sysroot_simple_write_deployment (OstreeSysroot *sysroot, g_ptr_array_add (new_deployments, g_object_ref (deployment)); } - if (!added_new) + if ((!added_new) && is_merge_or_booted) { g_ptr_array_add (new_deployments, g_object_ref (new_deployment)); added_new = TRUE;