Closed maximbaz closed 6 years ago
I like the idea. I think it's been proposed before, but I can now change one line in the script to make this happen, so I will.
Wow this was extremely fast, thanks! Just tested, works perfectly, with install, upgrade and delete 👍
Today the script records pacman process name as a snapshot name, which works fine for installation (
pacman -S xxx yyy
), but is terrible for package upgrades, because it records onlypacman -Syu
without mentioning upgraded package names.Actual result:
I would argue that the need for snapshot recovery is more probable after an upgrade (e.g. of
linux
package) than after an installation of a package, but today it's difficult to see which snapshot among existing ones have been made before/after upgradinglinux
.However, such information is actually available in
/var/log/pacman.log
:It should be possible to extract package names from the latest transaction.
To make things simple, I suggest to only extract package names, ignore information such as
installed/upgraded
or version. Thus:Expected result:
Or actually, without even a
pacman:
prefix since it only consumes valuable space and I can look at the correspondingpre
transaction for such info: