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:
Alexander Larsson committed 2015-12-14 08:38:51 +01:00
1 parent be19c88861
commit f771461b4a
3 files changed
+23 -33

No files matched your search

+2
View File
@@ -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;