lib/repo-finder-mount: Add var/lib/flatpak as a well-known directory
Add this as an additional well-known directory which is checked on mounted removable drives to see if it contains OSTree repos we can pull refs from. Signed-off-by: Philip Withnall <withnall@endlessm.com> https://github.com/ostreedev/ostree/issues/1210 Closes: #1213 Approved by: cgwalters
This commit is contained in:
parent
f91acf5226
commit
cd70aaac11
|
|
@ -49,7 +49,8 @@
|
||||||
* enumerated, and all OSTree repositories below it will be searched, in lexical
|
* enumerated, and all OSTree repositories below it will be searched, in lexical
|
||||||
* order, for the requested #OstreeCollectionRefs. The names of the directories
|
* order, for the requested #OstreeCollectionRefs. The names of the directories
|
||||||
* below `.ostree/repos.d` are irrelevant, apart from their lexical ordering.
|
* below `.ostree/repos.d` are irrelevant, apart from their lexical ordering.
|
||||||
* The directory `ostree/repo` will be searched after the others, if it exists.
|
* The directories `.ostree/repo`, `ostree/repo` and `var/lib/flatpak`
|
||||||
|
* will be searched after the others, if they exist.
|
||||||
* Non-removable volumes are ignored.
|
* Non-removable volumes are ignored.
|
||||||
*
|
*
|
||||||
* For each repository which is found, a result will be returned for the
|
* For each repository which is found, a result will be returned for the
|
||||||
|
|
@ -413,15 +414,19 @@ ostree_repo_finder_mount_resolve_async (OstreeRepoFinder *finde
|
||||||
/* Sort the repos lexically. */
|
/* Sort the repos lexically. */
|
||||||
g_array_sort (repos_refs, repo_and_refs_compare);
|
g_array_sort (repos_refs, repo_and_refs_compare);
|
||||||
|
|
||||||
/* Also check the .ostree/repo and ostree/repo directories in the mount,
|
/* Also check the well-known special-case directories in the mount.
|
||||||
* as well-known special cases. Add them after sorting, so they’re always
|
* Add them after sorting, so they’re always last. */
|
||||||
* last. */
|
const gchar * const well_known_repos[] =
|
||||||
scan_and_add_repo (mount_root_dfd, ".ostree/repo", FALSE,
|
{
|
||||||
mount_name, &mount_root_stbuf,
|
".ostree/repo",
|
||||||
parent_repo, repos_refs, cancellable);
|
"ostree/repo",
|
||||||
scan_and_add_repo (mount_root_dfd, "ostree/repo", FALSE,
|
"var/lib/flatpak",
|
||||||
mount_name, &mount_root_stbuf,
|
};
|
||||||
parent_repo, repos_refs, cancellable);
|
|
||||||
|
for (i = 0; i < G_N_ELEMENTS (well_known_repos); i++)
|
||||||
|
scan_and_add_repo (mount_root_dfd, well_known_repos[i], FALSE,
|
||||||
|
mount_name, &mount_root_stbuf,
|
||||||
|
parent_repo, repos_refs, cancellable);
|
||||||
|
|
||||||
/* Check whether a subdirectory exists for any of the @refs we’re looking
|
/* Check whether a subdirectory exists for any of the @refs we’re looking
|
||||||
* for. If so, and it’s a symbolic link, dereference it so multiple links
|
* for. If so, and it’s a symbolic link, dereference it so multiple links
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue