A small script to easily switch nightly hrev

After a bug in the latest nightly with zsh I checked what the process was switching back to an earlier revision. I found the process to switch back and forth a bit cumbersome so I made a small bash script that lists the nightlies and lets you easily switch with a few keys.

Hopefully this is useful for somebody.

On GitHub

Edited with a current screenshot explaining the effects.

11 Likes

Nice thing, could be helpful for lots people at the moment I think :slight_smile: :ok_hand:

1 Like

The idea is intereting, however keep in mind that this aproach might conflict with the native one and fill up the state directory if you keep re-downloading the versions instead of using them from old state directories.

To be clear: I suspect this to be a problem, i am not sure of it.

: )

IIRC if the packages are already somewhere in state directories, pkgman should reuse them and only create the txt file. So, it wouldn’t hurt so much.

Wait there’s a native another native method that is not the one described here? I am sorry for the state of confusion, I am really just getting back into this.

All the script above does is get a list of available hrevs and prepare the command as described above .

Chose the right state at boot time. It’s less convenient but usually, problems are fixed in a week or two at max and, you don’t have to do it many times. The problem is that a lambda user may not know what state to chose. For this particular case having hrev indication in the state selector would be better that actual date and time.

3 Likes

The instructions are a bit confusing, they will make a repository configuration that will prevent upgrading in the future.

The “easy” solution is:

  • Look into /system/packages/administrative/
  • find the state_* dir with the old package
  • install it with pkgman with a path to the file
1 Like

We’ll prevent updating is what we want at this point, until user reverts to current. Makes me think I should make this an option

Please add a warning to the top post if that is the case, it is not clear from your post that this would be a consequence of using the script

I changed the script itself to have options for stable current and specific hrevs. I updated the shot in first post to reflect that.