Skip to content
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

Refactor Armbian version detection and add support for ubuntu-based armbian detection #1447

Merged
merged 4 commits into from
Dec 19, 2024

Conversation

JohnTheCoolingFan
Copy link
Contributor

Ubuntu can be used to build Armbian, it is one of the official bases for Armbian. This allows the detection of Armbian in case it is based on Ubuntu.

Ubuntu can be used to build Armbian, it is one of the official bases for
Armbian. This allows the detection of Armbian in case it is based on
Ubuntu.
@JohnTheCoolingFan JohnTheCoolingFan marked this pull request as draft December 18, 2024 09:27
@JohnTheCoolingFan JohnTheCoolingFan marked this pull request as ready for review December 18, 2024 09:30
@CarterLi
Copy link
Member

Please reuse code of debian flavors.

@JohnTheCoolingFan
Copy link
Contributor Author

The debian-derived detection function doesn't run if the id is Ubuntu, which is the case for an ubuntu-based Armbian image. It will still need to be handled in both Ubuntu and debian variant detection. If you want me to just refactor so that Armbian detection uses a common function in both Ubuntu and debian flavours detection then that's fine, but I don't completely understand what you mean.

@CarterLi
Copy link
Member

refactor so that Armbian detection uses a common function in both Ubuntu and debian flavours detection

I mean this

@JohnTheCoolingFan JohnTheCoolingFan changed the title Add support for detection of Armbian as Ubuntu flavor Refactor Armbian version detection and add support for ubuntu-based armbian detection Dec 18, 2024
@JohnTheCoolingFan JohnTheCoolingFan marked this pull request as draft December 18, 2024 18:08
@JohnTheCoolingFan JohnTheCoolingFan marked this pull request as ready for review December 18, 2024 18:17
@JohnTheCoolingFan
Copy link
Contributor Author

Alright, refactored the armbian detection. The version detection is in a single function, which also sets idLike based on the original id. This is then used in both getUbuntuFlavour and detectDebianDerived.

@CarterLi CarterLi merged commit 3bb8242 into fastfetch-cli:dev Dec 19, 2024
16 checks passed
@CarterLi
Copy link
Member

Thanks.

@CarterLi
Copy link
Member

Since it's called armbian, I assume it supports only arm32 and aarch64? Is #if __arm__ || __aarch64__ ok?

@JohnTheCoolingFan
Copy link
Contributor Author

JohnTheCoolingFan commented Dec 19, 2024

While the project was initially aimed at arm SBCs, it currently supports x86_64 as well, and I think I've heard something about risc-v boards. So no, it shouldn't be limited to arm.

UPD: the website has images for aarch64, armhf, amd64 and riscv64

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants