I did a system update yesterday with the standard yay -Syu that I normally use, and when I try to use Anki today the application won’t start. I’ve checked that I have the most recent version installed from AUR, so I’m not sure what the cause of the issue is.
1 aur/anki 24.11-2 (+182 6.18) (Installed)
Helps you remember facts (like words/phrases in a foreign language) efficiently
It may not be sufficient to simply “have the most recent version”. anki has 30 dependencies. If any of them were updated, then anki needs to be rebuilt in order to reflect those underlying updates, even if anki itself has not received an update.
what’s the easiest way to cleanbuild it? I try to do an update with yay but get an error:
1 aur/anki 24.11-2 (+182 6.18) (Installed)
Helps you remember facts (like words/phrases in a foreign language) efficiently
==> Packages to install (eg: 1 2 3, 1-3 or ^4)
==> 1
AUR Explicit (1): anki-24.11-2
:: PKGBUILD up to date, skipping download: anki
-> error resetting /home/sage/.cache/yay/anki: fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
I don’t use AUR helpers, so I can’t help with the yay issue. If you use the standard manual Arch method, then you don’t have to worry about being defeated by some AUR helper quirk. (Granted, you then still have to worry about regular AUR quirks.)
I don’t know if this will be of any help but this did catch my attention:
In short, git is trying to access a repo it considers on another filesystem and to tell it explicitly that you’re okay with this, you must set the environment variable GIT_DISCOVERY_ACROSS_FILESYSTEM=1
I’m working in a CI/CD environment and using a dockerized git so I have to set it in that environment docker run -e GIT_DISCOVERY_ACROSS_FILESYSTEM=1 -v $(pwd):/git --rm alpine/git rev-parse --short HEAD'
If you’re curious: Above mounts $(pwd) into the git docker container and passes “rev-parse --short HEAD” to the git command in the container, which it then runs against that mounted volumes.
It’s from a few years ago, though might still be relevant.
hm seems useful but I’m also not fully understanding, when I check my .gitconfig it just lists my username and email, is this where I’d add the line GIT_DISCOVERY_ACROSS_FILESYSTEM=1 or should I be doing that elsewhere?
I ran git init and that is giving me an error that there isn’t an upstream branch and I need to set one. Wouldn’t I need to set a different branch for each of the packages that I’m installing/cloning from AUR?
-> error fetching visual-studio-code-bin: There is no tracking information for the current branch.
Please specify which branch you want to rebase against.
See git-pull(1) for details.
git pull <remote> <branch>
If you wish to set tracking information for this branch you can do so with:
git branch --set-upstream-to=origin/<branch> master
context: exit status 1
error fetching google-chrome: There is no tracking information for the current branch.
Please specify which branch you want to rebase against.
See git-pull(1) for details.
git pull <remote> <branch>
If you wish to set tracking information for this branch you can do so with:
git branch --set-upstream-to=origin/<branch> master
context: exit status 1
I’ll look into that but I admit that feels a bit beyond my ken.
Given that I did the normal system update that I’ve been doing regularly, about weekly, for years now I’m curious how this could lead to where I’m at now and would like to understand how that happened before switching to a less stable branch. As far as I know I’ve been on stable and been able to use AUR packages and update them for quite some time now
Maybe I messed up, but i did rm /home/sage/.cache/yay/anki/* and tried again but got an error related to the local branch from what I can tell
:: PKGBUILD up to date, skipping download: anki
-> error resetting /home/sage/.cache/yay/anki: fatal: ambiguous argument 'HEAD': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
A typical git directory has .files and .directories that would not be covered by anki/*, so you should have removed or renamed the entire directory as suggested.