Is there a way to skip the first of a major revision when updating automatically?

AaronD

Active Member
I want the minor bugfixes, but I DON'T want the "San Bernardino train wreck" that a brand new major release often is for these guys.

Using the official PPA on Ubuntu Studio (with the apt package manager), with automatic updates disabled and replaced with a bash script on MY schedule, is there a way to automatically skip the xx.0.x versions and stay on the previous major one until xx.1.x, and then automatically grab that and later? So a lot of the "YOU $#@! BROKE BY RIG!!!" type of bugs are hopefully ironed out by then, and the plugin devs also have more time to adapt.

---

(A lot of the "you broke my rig" complaints are from people who need stability, and they don't bother with the RC versions. Nice idea in theory, and it may work for other things, but the RC concept doesn't really work for OBS. It needs *something*, but RC is not it. At least, not by itself. I think it needs several orders of magnitude more care in not breaking things even before ANYONE sees it, including the early adopters, and including things that are not necessarily on the official spec sheet. Wander the forums and see how people are actually using it, and add that to the spec sheet too. Things on that sheet can still change, but they need to be communicated stupidly well, stupidly early, neither of which the OBS dev team is known for. Instead, stuff just quietly shows up in the RC versions that the critical-application people never see, and if the small RC community doesn't catch it, then the critical-application people blow up...again.)
 
This won't get you a full bash script; but as a starting point you can obtain a JSON of the releases available on GitHub via:

Code:
curl -L  -H "Accept: application/vnd.github+json"  https://api.github.com/repos/obsproject/obs-studio/releases

You can get the existing version of OBS from obs --version.

With these two; you would then need to parse the JSON to identify if there are any newer item that matched to a version you accept, i.e. check tag_name. Then iterate through the assets for that item. Find the asset whose name matches *24.04-x86_64.deb (or use the debians prepared for the PPA which have 'noble' or 'plucky' in them - matching to whichever one you need), then download using the browser_download_url; check against the digest (optional), and install.
 

AaronD

Active Member
...you would then need to parse the JSON...
If you're willing to use Python, btw, this would be very trivial as JSON parsing comes with.
I'm not against Python. I just haven't used it for anything that lasted, and so I never got proficient at it.

I ran the curl command in the terminal and, yeah that's a lot! But it does have the version number, so that's a start. Since this thread assumes that I'm using the official PPA, what's the timing between a new version showing up in that result from GitHub vs. the PPA?

I imagine something like:
C-like:
if (acceptable version available)
{
    unhold obs;
    normal automatic upgrade;
    hold obs;
}
So OBS is normally held, and momentarily unheld only to update, with the assumption that it will update to the same version that triggered the "acceptable" logic. If that assumption is false, it might cause some problems.
 
No idea what the delay between github release vs PPA is. I would probably use the github release anyway.

APT almost always warns about using it in a script because its not intended to be stable non-interactively.
 
Top