From ae075d23e3d2069f48fcfca0207ca8f46a923d29 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Thu, 21 Sep 2017 14:50:54 -0400 Subject: [PATCH] lib/repo: Use correct name for tmpdir lockfile MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Such an evil bug 🙈. I was just reading an strace trying to figure out what was going on, and noticed we had the `XXXXXX` in the lockfile name. It was only after that I realized that that this might *be* the cause of the skopeo issue. This is another case where we definitely need more test coverage of things that actually use the API multiple times in process; might look at dusting off the work for the rpm-ostree test. Closes: https://github.com/ostreedev/ostree/issues/1196 Closes: #1204 Approved by: jlebon --- src/libostree/ostree-repo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libostree/ostree-repo.c b/src/libostree/ostree-repo.c index 5c3c2987..b1d88e48 100644 --- a/src/libostree/ostree-repo.c +++ b/src/libostree/ostree-repo.c @@ -4990,7 +4990,7 @@ _ostree_repo_allocate_tmpdir (int tmpdir_dfd, /* Note, at this point we can race with another process that picks up this * new directory. If that happens we need to retry, making a new directory. */ - if (!_ostree_repo_try_lock_tmpdir (tmpdir_dfd, tmpdir_name_template, + if (!_ostree_repo_try_lock_tmpdir (new_tmpdir.src_dfd, new_tmpdir.path, file_lock_out, &did_lock, error)) return FALSE;