-
-
Notifications
You must be signed in to change notification settings - Fork 25
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
Supporting Armbian - some feedback needed #21
Comments
Personally, I've only used this on Pis with Pi OS before, so I wouldn't want to add much complexity... as an alternative, is it possible to work on simplifying some of the bash (like extracting functions) and then add on top of that (or make a fork easier to maintain)? |
Are you talking about this line ? Why do you think it's fragile?
I see your point. Actually this is a question whether to stay backward compatible.
I don't use Armbian and don't plan to use it. Said this I'll neither be able to review Armbian code nor to execute any tests. I think most of rpi-users use RaspbianOS. Question now is how many % of rpi-clone users use Armbian and it makes sense to support Armbian? One general comment: I reviewed some PRs but then stopped because the review is too time consuming for me. It would be very helpful if any code updates will be enhanced with comments in PRs. |
Sure, but once the extracting functions is done, then supporting armbian is a matter of one or two lines for armbianEnv.txt (and it needs FS UUID support, but that is not Armbian-specific and could be used by people running Pi OS as well). But yes, this would also be an acceptable course, if I would just need minimal changes in my fork. To get an idea about how this might look, here's how those extracted functions look in my PR at bilwl2's repo: https://github.com/billw2/rpi-clone/pull/140/files#diff-e73eaae36cd02c1c899d7257d01e6ad2de891b767399796c10ef7458d271784cR649-R735 (You can ignore the commit history of that PR, which I would redo cleanly, and also a lot of other stuff in that PR is only partially related and I extracted to separate PRs #16 and #20) Inside those functions, here are the two parts to support Armbian:
Yes. It checks on a /boot prefix on any mounted filesystem, meaning it could potentially match all kinds of other things than intended, e.g. if a user would have added
Currently probably not much, since it needed my unmerged PR to work, but I suspect there might be interest in this (especially since Armbian now also supports the rpi 3+).
Thanks for the reviews so far, they are very welcome, sorry to hear it is too time consuming for you. As for comments in PR - what do you mean exactly? I've tried to add sufficient comments in the PR description, but mostly in the individual commit messages. Are you missing detail there? |
Ok. You're right. The regex doesn't handle this rare condition.
I'll create a PR which will use
Your descriptions in your PRs are very valuable but there's still some detailed understanding of the code required in order to review the PR carefully. I don't have the full picture of rpi-clone and don't want to invest too much time to understand the details. That's why I reviewed your PRs where I was able to understand your code updates only.
These comments are present at the time the PR was worked on. But then they are lost. If you place these comments in the code they will be there forever 😉 JM2C |
Your PR makes the current approach cleaner, so I'll make sure to keep that approach in my PR when I create it. In practice, I think this means checking for the existence of
Commit messages stay part of git history and can be found by e.g. |
I had another look over my PR's, and actually think they mostly contain the right amount of comments, at least for the newly introduced code (in some cases I've modified existing code which is a bit harder to understand, but adding comments there did not seem in scope of these PRs). One exception is #20, which contained a hard-to-read mostly duplicate list of rsync options, which I've now refactored to be easier to read and added a comment. If you have more specific questions or things you'd like to see clarified, feel free to add comments to the respective PR :-) |
I have had a number of open PRs at billfw2's repo for quite some time. Today I've moved over the simple ones (#16, #17, #18, #20) and added a new one (#19), leaving the last big one, billw2#140 which is needed to support Armbian. That PR makes two main changes:
armbianEnv.txt
instead ofcmdline.txt
In addition, it refactors the code to introduce some helper functions to reuse some code. In particular it uses the same code for updating
fstab
andcmdline.txt
, and for supportingcmdline.txt
andarmbianEnv
it just calls the same (new) function twice to try each file.However, some changes made in this repo conflict with the changes there, in particular 63765e8 that adds support for
/boot/firmware/cmdline.txt
. Additionally, the commit order in my PR has grown over a few years, so I think it would be better to restructure the commits (first extract code into functions and only then make it more complicated).Before I fully commit to revamping this pullrequest, I would like to get some feedback on these questions:
/boot/firmware/cmdline.txt
parses fstab (in a somewhat fragile way IMHO) to decide where to findcmdline.txt
. My approach for this was to just try all versions (/boot/cmdline.txt
,/boot/firmware/cmdline.txt
and/boot/armbianEnv.txt
) and upating any of these files that exist. I believe this gives cleaner code. Does that approach make sense?/boot/firmware/cmdline.txt
, but the structure of this conversion code does not lend itself for the "try each in turn" approach. However, it seems that raspbian started using PARTUUIDs in 2017, so I wonder if there is till value in this feature. I would be inclined to just remove the feature to simplify the code and reducing maintainance load of code that is probably unused and hard to test as well. How does that sound?The text was updated successfully, but these errors were encountered: