Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
stereomato opened this issue Oct 31, 2024 · 1 comment
Open
Labels

Comments

@stereomato
Copy link

stereomato commented Oct 31, 2024

According to #884 (comment), 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
@fosskers
Copy link
Owner

fosskers commented Nov 1, 2024

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 fosskers added the bug? label Nov 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants