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
@@ -710,6 +710,12 @@ ostree_repo_is_system (OstreeRepo *repo)
|
||||
|
||||
g_return_val_if_fail (OSTREE_IS_REPO (repo), FALSE);
|
||||
|
||||
/* If we were created via ostree_sysroot_get_repo(), we know the answer is yes
|
||||
* without having to compare file paths.
|
||||
*/
|
||||
if (repo->is_system)
|
||||
return TRUE;
|
||||
|
||||
default_repo_path = get_default_repo_path (repo->sysroot_dir);
|
||||
|
||||
return g_file_equal (repo->repodir, default_repo_path);
|
||||
|
||||
Reference in new issue
Block a user