Update BTRFS Snapper Zypper Script? Show command used in description?

I wish tumbleweed was a bit more descriptive with it’s automatic snapshots compared to other distros.

So with Fedora using python3-dnf-plugins-extras-snapper and Arch pacman using snap-pac, both of these automatic scripts create entries with snapper that have the command used in the description. This makes it super easy to track down and figure out faster which command was used and in which order for both Pre/Post snapshots.

Right now in Tumbleweed, whenever a Pre/post is registered when using the Zypper command. All we get is a generic Zypp(Zypper) description. Although helpful, it isn’t as easy to determine things when you have back to back of the same descriptions. This makes it difficult to determine which commands where used and in what order at times, especially if you have a terrible memory. It would be beneficial to have more in the description. This is just a visual improvement to make things easier. It doesn’t even have to be the full command, it can be a certain length or partial, something better then what is currently used.

Is there anyway to update the automatic script to add the command used in the description when the automatic snapshot is taken? It doesn’t even have to be the full command, it can be shortened if necessary. So something like

Zypp(Zypper) zypper in htop

or even

zypper in htop

In other distro’s it would show like this:
Fedora’s would show something like this for the description:

/usr/bin/dnf install htop

Arch Linux would show something like this for the description:

pacman -S htop

1 Like

@xarek Hi and welcome to the Forum :smile:
You can use the zypper-log command to see what was run at that time? So in your example there would be a time stamped entry for zypper in htop to compare with snapper list.

Yes that would be helpful, but for ease of use at a quick glance having the command in the snapper description would save some time visually. Otherwise I have to sit there and glance at timestamps and compare to figure things out. Even so, I do appreciate the suggestion though, I’ve wrote it down in my linux notebook :slight_smile:

Oh and hello to you too! Thanks for the welcome! I’m having a great time with OpenSUSE Tumbleweed and it’s community.

1 Like

@xarek So perhaps some scripting foo to look at the date from snapper list and then use the zypper-log -d option or visa versa.

I agree that adding this straight into the description metadata would make inspections of snapshots much more intuitive, I hope something like this gets implemented

@andrea.ippo https://github.com/openSUSE/snapper I’m sure PR’s will be accepted…

1 Like

Maybe time to resurrect this PR?

Seems like someone had your same idea some time ago…

EDIT: due to the age of the PR there are or course conflicts. I’m AFK/on mobile for a few weeks, but maybe you can clone the repo and resurrect/adopt that PR.

I’d love to attempt that myself but from mobile it’s no-go.

@andrea.ippo yes… grab the latest code, update and send a new PR (after tesing of course…).

1 Like

Indeed! My comment was meant for OP but on mobile UI I’m not sure I actually used the correct “Reply” button :sweat_smile:

Imma tag

Edit: well ok I can’t tag cause message is too old :sweat_smile:

WOW that’s really old. I guess it was never an important feature to add or something. I’m glad someone else had the same idea though to update the descriptions on the snapshots to make it more user friendly. Its a shame this particular code change never got anywhere, what a shame.