aura icon indicating copy to clipboard operation
aura copied to clipboard

Creation of cache, snapshots and hashes folders when they don't exist

Open ghost opened this issue 1 year ago • 1 comments

According to https://github.com/fosskers/aura/issues/884#issuecomment-2272089327, these are created when they don't exist, but I just installed aura, ran aura -A bottles, and I'm sitting at the "Proceed? [Y/n]" stage, and I checked at ~/.cache/aura/ and it only has the clones folder created.

Then, I proceeded with the build process, and I did get to build the first dependency, but at the end of that I got

mv: cannot move '/home/stereomato/.cache/aura/builds/python-pathvalidate/python-pathvalidate-3.2.1-1-any.pkg.tar.zst' to '/home/stereomato/.cache/aura/cache/python-pathvalidate-3.2.1-1-any.pkg.tar.zst': No such file or directory

And checking .cache/aura/ I do have the builds and clone folders, but not cache, hashes, or snapshots ones. So, I decided to create the cache folder myself, and restarted the process.

Now, this manages to install some of the AUR dependencies of bottles, but aura exits with "aura :: Failed to write file: /home/stereomato/.cache/aura/hashes/python-steamgriddb", which I can also fix by creating the folder manually.

output of aura conf --gen

[general]
cpus = 16
editor = "nano"
doas = false
language = "en-US"
noconfirm = false

[aur]
build = "/home/stereomato/.cache/aura/builds"
cache = "/home/stereomato/.cache/aura/cache"
clones = "/home/stereomato/.cache/aura/packages"
hashes = "/home/stereomato/.cache/aura/hashes"
chroot = []
ignores = []
git = false
hotedit = true
shellcheck = true
diff = true
delmakedeps = false
clean = true
warn_unknowns = true
nocheck = false
skipdepcheck = false
reverse = false

[backups]
snapshots = "/home/stereomato/.cache/aura/snapshots"
automatic = true

ghost avatar Oct 31 '24 22:10 ghost

Thanks for reporting this. This is very strange and the first time I've seen it. Aura is definitely supposed to create the directories, as you can see here:

/// The full path to the Aura-specific tarball cache.
///
/// Creates the directory if it doesn't exist.
pub(crate) fn tarballs() -> Result<PathBuf, Error> {
    let path = aura_xdg_cache()?.join("cache");

    if path.is_dir().not() {
        std::fs::create_dir_all(&path).map_err(|e| Error::Mkdir(path.clone(), e))?;
    }

    Ok(path)
}

and if it failed to, an error would be thrown.

fosskers avatar Nov 01 '24 22:11 fosskers