-
Notifications
You must be signed in to change notification settings - Fork 224
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test for Ubuntu and Ubuntu version #3199
Conversation
I have code to also test for the presence of apt, and to get the version number. Which version is the minimum you consider to be required for the repository to work? On Ubuntu 20.04 the typical apt version is 2.0.9 I could test for apt >= 2.4.x since there are no 2.1.x - 2.3.x branches. |
Removed checks for lsb_release (to get distro name) and Ubuntu version. Assuming apt from at least the 2.4 branch will suffice.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some more comments on more extensive error messages.
CC: @gilgongo
Co-authored-by: ann0see <[email protected]>
Co-authored-by: ann0see <[email protected]>
This might hold true for Ubuntu but might not for some other distribution. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. Tested on Debian Stable and it seems good.
Also check the code style check. |
Don't test for exit code but use an if construct with test instead
Add question to proceed anyway and quote issue URI.
The commit for fixing the issue was included in apt 2.2 (indeed apt >=2.1.15 contains the commit but testing for at least the 2.2.x branch seems sensible)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for being picky.
Co-authored-by: ann0see <[email protected]>
No need to apologise. It's nice to get it as clear as possible |
Yes, tabs not spaces...
I'm embarrassed about how many commits were necessary for a relatively simple change. If the new format (which I believe I already had, but there you go, maybe one indent wrong, who knows) doesn't validate then I'll just abandon this. It's not worth everyone's time for such a simple change on a script that worked and was tested many commits ago... to fail for minor indentation. |
Thanks for your comment. I'll take care of the styling. |
SRY. But it seems to be ok now. I think you can run the beautifier on your device. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems good like that. Needs further testing by somebody else too before merging.
I downloaded and ran However I'm pasting into the web interface, maybe that's what caused it. In any case thanks for fixing the styling; it seems I should have got a whole git setup going from the command line but I think I have to update my auth credentials and could do this easily just using the web editor. I was wrong! |
I'm also not sure about the reference for shfmt unfortunately. I thought it uses the default, but maybe not. Probably worth more investigation. |
Todo: |
as it should be Co-authored-by: Peter L Jones <[email protected]>
Ubuntu 20.04 should fail |
OK that fails:
One thing that occurs to me is that "Your apt version is incompatible." might imply that Jamulus itself won't run. Should the word order be switched to make it clear that it's just the repo we're talking about? So perhaps:
Sorry, I wasn't sure what the exact context of the wording was until now. |
As per suggestion
I have made the updates as per your suggestion, good idea. |
I literally just copy/pasted in the web editor without changing anything, then saved, keeping all spacing identical (in theory). Clearly the web editor breaks coding style no matter what I do. What a nightmare. |
Do you see the CI output? It tells me that the if has wrong spacing. So click the Checks tab and the code style check. That's how I found the problems |
All good. Merged and thanks for the patience |
Short description of changes
CHANGELOG: Build: Ensure apt version >=2.4 to prove that the system is Debian based (using apt and dpkg) and can validate the repo
Context: Fixes an issue?
Fixes: #3198
Does this change need documentation? What needs to be documented and how?
No
Status of this Pull Request
Basic proof of concept for setup-repo.sh
What is missing until this pull request can be merged?
Has been fully tested on Ubuntu 20.04, 22.04 and MacOS 13.6.
Would require testing on a couple of Debian boxes.
Checklist