-
Notifications
You must be signed in to change notification settings - Fork 3
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
Add support for environment variable to skip pacman-hook snap #35
Comments
Interesting problem. Yes using a environment variable seems fragile. May I ask how you determine which pacman updates you want to snapshot? If, for example, you want to only snap all Say if we had the ability to add something like this to the config - preinstall_pacman_include_regex='.*\s\-Syu\s.*' Would it work better you? |
i use yay ( it lets me skip packages that is creating trouble for me ) and it shows this in pacman_log ->
Super confusing. Been thinking about this for 30mins. I have been using btrfs for 8 months and didn't used snapshot restore functionality. Now i think it's just fine the way it is. ( maybe the above regex would be a good addition but no sure ). Using pacman to determine when to snapshot is very hard. I will just stick to timeline snapshot. |
Cool. As workaround, you could probably increase the number of snapshots. Note that the snapshots created for pacman will not remove periodic snapshots. So you can essentially have many of those. If your criteria is to skip full upgrades, regex will still help with also with However I admit crafting the regex can be complicated. But a tool like this can help, https://regex101.com/ Another option I'm thinking of is to introduce a way to hold a particular snap. I will be slightly different solution though, since until you decide to unhold, the snap will never be deleted automatically. This gives the freedom however to make a decision not prior to, but later - which can be more convenient.
I will hold off for now, and also think a bit more. LMK if you find a solid criteria that you tend to use, and I will help to cover it! BTW, I realized setting the environment variable may be a bit fragile - since if a user sets it, the parent shell, or root which runs pacman, may not see the variable. So I am not sure how it is used for snap pac, but expect there are some frustration in it not working as expected. |
Yes lets see, maybe someone else in community has any idea. Do you have any suitable title for this, so that it will be easy for others to find.
For that, i intialize the variable in /etc/environment and preserve the variable for root session by adding it to /etc/sudoers |
Source - https://barnettphd.com/snap-pac/configuration.html#environment-variables
snap-pac-hook has support for using SNAP_PAC_SKIP to skip snapper snapshot for pacman transaction.
Can you advise on this ->
I usually many time install and uninstall single application through pacman, this ends up creating snapshot which are barely worth it be snapshotted and ends up filling snapshots which will inturn delete important snapshots.
What do you to solve this ?
For me i had added SNAP_PAC_SKIP=yes in environment and when i do full system upgrade , i explicitly set SNAP_PAC_SKIP=no. But i have observed that i most of the time forget to do this. now i am in limbo, i either end up with all snapshot or end up with no snapshots for pacman.
The text was updated successfully, but these errors were encountered: