nix-community / impermanence

Modules to help you handle persistent state on systems with ephemeral root storage [maintainer=@talyz]
MIT License
1.16k stars 86 forks source link

error: While opening repository /home/*/.local/share/flatpak/repo: opening repo: opendir(objects): No such file or directory #71

Closed slrslr closed 2 years ago

slrslr commented 2 years ago

$ flatpak --version;lsb_release -d;uname -r;kde

Flatpak 1.10.7
Description:    Debian GNU/Linux 11 (bullseye)
5.10.0-11-amd64

KDE desktop

"sudo flatpak install qbittorrent" "sudo flatpak list" "flatpak run org.qbittorrent.qBittorrent"

error: While opening repository /home/user/.local/share/flatpak/repo: opening repo: opendir(objects): No such file or directory

some Debian/flatpak bug, that can be fixed by command "mkdir /home/$(whoami)/.local/share/flatpak/repo/objects"

can this be made the way so this objects is created and user is not bothered by that error?

talyz commented 2 years ago

Well, this doesn't really sound like something that should be fixed here, so I'll go ahead an close the issue.

If you persist /home/user/.local/share/flatpak/repo it should be created if it doesn't already exist. I'm guessing you want to persist the whole flatpak directory, though? In that case you could add something like

system.activationScripts.createFlatpakRepo = {
  deps = [ "createPersistentStorageDirs" ];
  text = ''
    mkdir -p /persistent/home/<user>/.local/share/flatpak/repo
    chown <user>:<group> /persistent/home/<user>/.local/share/flatpak/repo
  ''
};

for NixOS or

home.activation.createFlatpakRepo =
  config.lib.dag.entryAfter
  [ "createAndMountPersistentStoragePaths" ]
  ''
    mkdir -p ~/.local/share/flatpak/repo
  ''

for home-manager.

slrslr commented 2 years ago

doesn't really sound like something that should be fixed here

and You do not have idea what is the right bug tracker?

talyz commented 2 years ago

If it's a Flatpak bug, I'm guessing https://github.com/flatpak/flatpak/issues/, but I'm not sure.