repo: Use per-transaction staging dir
Concurrent pulls break since we're sharing the staging directory for all transactions in the repo. This makes us use a per-transaction directory. However, in order for resumes to work we first look for existing staging directories and try to aquire an exclusive lock for them. If we can't find any staging directory or they are all already locked, then we create a new one. https://bugzilla.gnome.org/show_bug.cgi?id=757611
This commit is contained in:
1 parent
be19c88861
commit
f771461b4a
3 files changed
+23
-33
No files matched your search
@@ -21,6 +21,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "ostree-repo.h"
|
||||
#include "libglnx.h"
|
||||
|
||||
#ifdef HAVE_LIBSOUP
|
||||
#include "ostree-fetcher.h"
|
||||
@@ -43,6 +44,7 @@ struct OstreeRepo {
|
||||
char *boot_id;
|
||||
int commit_stagedir_fd;
|
||||
char *commit_stagedir_name;
|
||||
GLnxLockFile commit_stagedir_lock;
|
||||
|
||||
GFile *repodir;
|
||||
int repo_dir_fd;
|
||||
|
||||
Reference in new issue
Block a user