update deps

The immediate motivation is that Cargo.lock referred to a commit version
in a PR branch of my nix fork that no longer exists. (I didn't know, but
it makes sense, that "git push -f" not only forcibly updates the branch
to refer to a new commit but also gets rid of orphaned commits.) Use a
moonfire branch that I'll keep stable until I'm ready to move on.

I also updated parking_lot and rusqlite to new major versions (nothing
in the interface that I care about has changed) and did a full cargo
update.
This commit is contained in:
Scott Lamb 2019-07-17 14:32:09 -07:00
parent e52e725958
commit 18c693fa46
7 changed files with 453 additions and 438 deletions

867
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -40,14 +40,14 @@ log = { version = "0.4", features = ["release_max_level_info"] }
memchr = "2.0.2"
memmap = "0.7"
mylog = { git = "https://github.com/scottlamb/mylog" }
nix = { git = "https://github.com/scottlamb/nix", branch = "pr-renameat" }
nix = { git = "https://github.com/scottlamb/nix", branch = "moonfire" }
openssl = "0.10"
parking_lot = { version = "0.8", features = [] }
parking_lot = { version = "0.9", features = [] }
protobuf = { git = "https://github.com/stepancheg/rust-protobuf" }
reffers = "0.5.1"
regex = "1.0"
ring = "0.14.6"
rusqlite = "0.18"
rusqlite = "0.19.0"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
smallvec = "0.6"

View File

@ -15,5 +15,5 @@ path = "lib.rs"
failure = "0.1.1"
libc = "0.2"
log = "0.4"
parking_lot = { version = "0.8", features = [] }
parking_lot = { version = "0.9", features = [] }
time = "0.1"

View File

@ -24,14 +24,14 @@ libpasta = "0.1.0-rc2"
log = "0.4"
lru-cache = "0.1"
mylog = { git = "https://github.com/scottlamb/mylog" }
nix = { git = "https://github.com/scottlamb/nix", branch = "pr-renameat" }
nix = { git = "https://github.com/scottlamb/nix", branch = "moonfire" }
odds = { version = "0.3.1", features = ["std-vec"] }
openssl = "0.10"
parking_lot = { version = "0.8", features = [] }
parking_lot = { version = "0.9", features = [] }
prettydiff = "0.3.1"
protobuf = { git = "https://github.com/stepancheg/rust-protobuf" }
regex = "1.0"
rusqlite = "0.18"
rusqlite = "0.19.0"
smallvec = "0.6"
tempdir = "0.3"
time = "0.1"

View File

@ -39,7 +39,7 @@ use cstr::*;
use failure::{Error, Fail, bail, format_err};
use log::warn;
use protobuf::Message;
use nix::{NixPath, fcntl::{AtFlags, FlockArg, OFlag}, sys::stat::Mode};
use nix::{NixPath, fcntl::{FlockArg, OFlag}, sys::stat::Mode};
use nix::sys::statvfs::Statvfs;
use std::ffi::{CStr, CString};
use std::fs;
@ -294,7 +294,7 @@ impl SampleFileDir {
/// Unlinks the given sample file within this directory.
pub(crate) fn unlink_file(&self, id: CompositeId) -> Result<(), nix::Error> {
let p = CompositeIdPath::from(id);
nix::unistd::unlinkat(self.fd.0, &p, AtFlags::empty())
nix::unistd::unlinkat(Some(self.fd.0), &p, nix::unistd::UnlinkatFlags::NoRemoveDir)
}
/// Syncs the directory itself.

View File

@ -90,8 +90,8 @@ pub fn run(_args: &super::Args, tx: &rusqlite::Transaction) -> Result<(), Error>
let sample_file_uuid: FromSqlUuid = row.get(1)?;
let from_path = get_uuid_pathname(sample_file_uuid.0);
let to_path = crate::dir::CompositeIdPath::from(id);
if let Err(e) = nix::fcntl::renameat(d.fd.as_raw_fd(), &from_path[..],
d.fd.as_raw_fd(), &to_path) {
if let Err(e) = nix::fcntl::renameat(Some(d.fd.as_raw_fd()), &from_path[..],
Some(d.fd.as_raw_fd()), &to_path) {
if e == nix::Error::Sys(nix::errno::Errno::ENOENT) {
continue; // assume it was already moved.
}

View File

@ -107,7 +107,7 @@ pub fn run(_args: &super::Args, tx: &rusqlite::Transaction) -> Result<(), Error>
data.resize(FIXED_DIR_META_LEN, 0); // pad to required length.
f.write_all(&data)?;
f.sync_all()?;
nix::fcntl::renameat(dir.as_raw_fd(), tmp_path, dir.as_raw_fd(), path)?;
nix::fcntl::renameat(Some(dir.as_raw_fd()), tmp_path, Some(dir.as_raw_fd()), path)?;
dir.sync()?;
}
Ok(())