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

Symlink'd db and template #761

Open
ezeedub opened this issue Feb 2, 2024 · 2 comments
Open

Symlink'd db and template #761

ezeedub opened this issue Feb 2, 2024 · 2 comments

Comments

@ezeedub
Copy link

ezeedub commented Feb 2, 2024

I've recently switched to using the flatpak version, and would like to manage my modifications to report_template.html the same way I did before using the package manager version.

Using the package manager version, I kept the file in a separate folder for revision control, and then symlinked to it from ~/.local/share/hamster.

Using flatpak, I have tried similar by symlinking to the file from ~/.var/app/org.gnome.Hamster/data/hamster (per the instructions on the default template. I've also tried ~/.local/share/flatpak/exports/share/hamster.

The problem I'm having is that when I run an export with flatpak run org.gnome.Hamster export html YYYY-MM-DD YYYY-MM-DD I get the default template. If I replace the symlink with the actual file, I get my customized template.

Hamster seems not to see the report if it's a symlink. Am I running the export incorrectly, or is there something I can do to make the symlink work?

I have the same issue for hamster.db which I'd like to keep in my custom folder. I can load the file, but not through the symlink.

@matthijskooijman
Copy link
Member

I do not have much experience with flatpak, but my first thought would be that the problem is not the symlink, but that the target of the symlink is not available inside the flatpak. Maybe additional permissions could be assigned to the flatpak to give it access to your entire homedir (I recall this is how it works with snap, not sure about flatpak).

If I replace the symlink with the actual file, I get my customized template.

Could this just be a solution? And if you want to keep the native package usable as well without duplication the file, you could consider making the symlink the other way around? (Not saying this is a perfect solution and we should not look into the issue, but if this is a limitation inherent to the flatpak concept, it might be hard to fix)

@ezeedub
Copy link
Author

ezeedub commented Feb 5, 2024

Good tip. I'll look into how to give flatpak the permissions it needs. I'll update here when I find something.

I already have a well-established system of files I control/override like this that I keep in a repo so I can track changes over time. I usually come back to something a year or two later, and have no memory of what I did before, so I like to have the history.

But for now, I will definitely stick with the workaround and just leave the actual file in that location. Thanks for the response!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants