JustinTimperio / pacback

Advanced Version Control for Arch Linux
MIT License
148 stars 4 forks source link

Allow install hook to add auto-incrementing hooks #22

Closed acheronfail closed 4 years ago

acheronfail commented 4 years ago

Is your feature request related to a problem? Please describe. It would be great if the install hook auto-incremented the restore point ids, that way they don't overwrite each other when full upgrades are performed.

Describe the solution you'd like After installing the pacman install hook, the first pacman -Syu should create restore point #00, and the next #01, and so on...

This would mean that we'd create a "history" of restore points correlated to full upgrades, and would be invaluable when trying to roll back full upgrades that previously occurred.

acheronfail commented 4 years ago

FWIW I've forked your repository and added this feature there. I'll test it out and see how it works for me for a while.

Here's the diff https://github.com/JustinTimperio/pacback/compare/master...acheronfail:feat/auto-increment-restorepoints?expand=1. It has a few changes:

JustinTimperio commented 4 years ago

Hey acheronfail, Thanks for the suggestion and fork. This is something that I actually started in my dev branch. I have created a separate restore point type called snapshots, which auto-increment up to a user-defined count. This feature leaves restore points open for users store RP's as they wish, while still maintaining a catalog of each change made to the system. I got stuck working on session management though and haven't really touched it in a while. I'll definitely take a look at what you have done and see if I can integrate it into my dev branch. Wasn't honestly sure anyone was using this lol

JustinTimperio commented 4 years ago

Hey archeronfail,

Just wanted to give you an update here. I really like the concept you put forth. Unfortunately, I realized my Alpha code had become image

The concept, design, and features have changed so drastically, a major overhaul was in order.


This has inspired me to rewrite pretty much the whole thing for a proper beta release. Since I am not a huge OOP fan, I'm going with a more functional/pythonic approach using dictionaries to pass variables through my functions. This should result in a much cleaner codebase and a lot of flexibility/abstraction in the future without hurting performance.

Not sure when I will finish this but hopefully once I'm done unraveling my own spagett, I'll get something workable merged into the master.

JustinTimperio commented 4 years ago

Well this has taken me way longer than I had hoped and the codebase has nearly tripled but pacback is very close to its full release. I have added a very comprehensive snapshot system that keeps a rolling list of all changes. Each snapshot only takes about 50ms to create so keeping a large archive of system changes is now achievable.

If you would like to check out these changes, feel free to look at the dev branch. Once I'm done documenting everything for the release I will merge this into master.

Cheers

JustinTimperio commented 4 years ago

After months of work its finally done! It will be a little before this makes it to pacback-git and about a week or two to work out bugs for pacback main release.

I've also added a developer guide if you want to add any new features.

JustinTimperio commented 4 years ago

@acheronfail This feature is live in pacback-git!