lib: Add an "is_system" member to OstreeRepo
This is prep for introducing a fd-relative `ostree_repo_new_at()`. Previously, `ostree_repo_is_system()` compared `GFile` paths, but there's a much simpler check we can do first - if this repository was created via `OstreeSysroot`, it must be a system repo. Closes: #886 Approved by: jlebon
This commit is contained in:
1 parent
2f834968c6
commit
ed430b45de
3 files changed
+9
No files matched your search
@@ -26,6 +26,7 @@
|
||||
#include <sys/wait.h>
|
||||
|
||||
#include "ostree-core-private.h"
|
||||
#include "ostree-repo-private.h"
|
||||
#include "ostree-sepolicy-private.h"
|
||||
#include "ostree-sysroot-private.h"
|
||||
#include "ostree-deployment-private.h"
|
||||
@@ -133,6 +134,7 @@ ostree_sysroot_constructed (GObject *object)
|
||||
|
||||
repo_path = g_file_resolve_relative_path (self->path, "ostree/repo");
|
||||
self->repo = ostree_repo_new_for_sysroot_path (repo_path, self->path);
|
||||
self->repo->is_system = TRUE;
|
||||
|
||||
G_OBJECT_CLASS (ostree_sysroot_parent_class)->constructed (object);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user