summaryrefslogtreecommitdiff
path: root/src/libostree/ostree-sysroot-private.h
diff options
context:
space:
mode:
authorJonathan Lebon <jlebon@redhat.com>2016-02-19 11:58:08 -0500
committerJonathan Lebon <jlebon@redhat.com>2016-02-19 11:58:08 -0500
commiteba7df0da93fb53c6438646ce11036595a37d76f (patch)
treeadba3d29bc49cc7a09c6359b430260067ecc19a8 /src/libostree/ostree-sysroot-private.h
parent3a555114bc22f599d72d95d71c2579fd2345cf6f (diff)
downloadostree-eba7df0da93fb53c6438646ce11036595a37d76f.tar.gz
ostree-sysroot: add debug option to help testing
If ostree is run in a test setup where it operates as root in a tmp directory, it might cause issues to flag the deployments as immutable. The test harness might simply be doing an `rm -rf` (effectively the case for gnome-desktop-testing-runner), which will then fail. We add a new debug option to the ostree_sysroot object using GLib's GDebugKey functionality to allow our tests to communicate to ostree that we don't want immutable deployments.
Diffstat (limited to 'src/libostree/ostree-sysroot-private.h')
-rw-r--r--src/libostree/ostree-sysroot-private.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/libostree/ostree-sysroot-private.h b/src/libostree/ostree-sysroot-private.h
index 0c38e269..e0dc24fd 100644
--- a/src/libostree/ostree-sysroot-private.h
+++ b/src/libostree/ostree-sysroot-private.h
@@ -27,6 +27,13 @@
G_BEGIN_DECLS
+typedef enum {
+
+ /* Don't flag deployments as immutable. */
+ OSTREE_SYSROOT_DEBUG_MUTABLE_DEPLOYMENTS = 1 << 0
+
+} OstreeSysrootDebugFlags;
+
struct OstreeSysroot {
GObject parent;
@@ -46,6 +53,7 @@ struct OstreeSysroot {
/* Only access through ostree_sysroot_get_repo() */
OstreeRepo *repo;
+ OstreeSysrootDebugFlags debug_flags;
};
#define OSTREE_SYSROOT_LOCKFILE "ostree/lock"