cancellable, error))
goto out;
- if (!ostree_sysroot_deployment_set_mutable (self, new_deployment, FALSE,
- cancellable, error))
- goto out;
+ if (!(self->debug_flags & OSTREE_SYSROOT_DEBUG_MUTABLE_DEPLOYMENTS))
+ {
+ if (!ostree_sysroot_deployment_set_mutable (self, new_deployment, FALSE,
+ cancellable, error))
+ goto out;
+ }
{ ostree_cleanup_sepolicy_fscreatecon gpointer dummy = NULL;
G_BEGIN_DECLS
+typedef enum {
+
+ /* Don't flag deployments as immutable. */
+ OSTREE_SYSROOT_DEBUG_MUTABLE_DEPLOYMENTS = 1 << 0
+
+} OstreeSysrootDebugFlags;
+
struct OstreeSysroot {
GObject parent;
/* Only access through ostree_sysroot_get_repo() */
OstreeRepo *repo;
+ OstreeSysrootDebugFlags debug_flags;
};
#define OSTREE_SYSROOT_LOCKFILE "ostree/lock"
static void
ostree_sysroot_init (OstreeSysroot *self)
{
+ const GDebugKey keys[] = {
+ { "mutable-deployments", OSTREE_SYSROOT_DEBUG_MUTABLE_DEPLOYMENTS },
+ };
+
+ self->debug_flags = g_parse_debug_string (g_getenv("OSTREE_SYSROOT_DEBUG"),
+ keys, G_N_ELEMENTS (keys));
+
self->sysroot_fd = -1;
self->lock = (GLnxLockFile)GLNX_LOCK_FILE_INIT;
}
export G_DEBUG=fatal-warnings
+# Don't flag deployments as immutable so that test harnesses can
+# easily clean up.
+export OSTREE_SYSROOT_DEBUG=mutable-deployments
+
export TEST_GPG_KEYID_1="472CDAFA"
export TEST_GPG_KEYID_2="CA950D41"
export TEST_GPG_KEYID_3="DF444D67"