Skip to content

Commit 5fc214c

Browse files
authored
Ignore the file '/etc/board-release' (#353)
1 parent 40ecdd9 commit 5fc214c

5 files changed

Lines changed: 43 additions & 0 deletions

File tree

src/distro/distro.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ class InfoDict(TypedDict):
152152
"system-release",
153153
"plesk-release",
154154
"iredmail-release",
155+
"board-release",
155156
)
156157

157158

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# PLEASE DO NOT EDIT THIS FILE
2+
BOARD=h616
3+
BOARD_NAME="BTT-CB1"
4+
DISTRIBUTION_CODENAME=bullseye
5+
VERSION=2.3.1
6+
LINUXFAMILY=sun50iw9
7+
ARCH=arm64
8+
INITRD_ARCH=arm64
9+
BRANCH=current
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
PRETTY_NAME="BTT-CB1 2.3.1 Bullseye"
2+
NAME="Debian GNU/Linux"
3+
VERSION_ID="11"
4+
VERSION="11 (bullseye)"
5+
VERSION_CODENAME=bullseye
6+
ID=debian
7+
HOME_URL="https://www.debian.org/"
8+
SUPPORT_URL="https://www.debian.org/support"
9+
BUG_REPORT_URL="https://bugs.debian.org/"
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
2+
NAME="Debian GNU/Linux"
3+
VERSION_ID="11"
4+
VERSION="11 (bullseye)"
5+
VERSION_CODENAME=bullseye
6+
ID=debian
7+
HOME_URL="https://www.debian.org/"
8+
SUPPORT_URL="https://www.debian.org/support"
9+
BUG_REPORT_URL="https://bugs.debian.org/"

tests/test_distro.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -522,6 +522,21 @@ def test_altlinux10_os_release(self) -> None:
522522
}
523523
self._test_outcome(desired_outcome)
524524

525+
def test_bttcb1_os_release(self) -> None:
526+
desired_outcome = {
527+
"id": "debian",
528+
"codename": "bullseye",
529+
"name": "Debian GNU/Linux",
530+
"pretty_name": "BTT-CB1 2.3.1 Bullseye",
531+
"like": "",
532+
"version": "11",
533+
"pretty_version": "11 (bullseye)",
534+
"best_version": "11",
535+
"major_version": "11",
536+
"minor_version": "0",
537+
}
538+
self._test_outcome(desired_outcome)
539+
525540

526541
class TestWithRootDir(TestOSRelease):
527542
"""Test that a LinuxDistribution can be created using an arbitrary root_dir

0 commit comments

Comments
 (0)