Skip to content

Commit e827b65

Browse files
authored
[xaprepare] Add support for Debian trixie release (#8127)
Context: https://bits.debian.org/2023/06/bookworm-released.html Context: https://siduction.org/ Debian 12, aka bookworm, has just been released and that means work on the next release, codenamed "trixie", has begun. The code name appeared in `/etc/debian_version` and `/etc/os-release` files and `xaprepare` needs to be updated in order to properly detect trixie. While this change won't be necessary for users of Debian "stable" or any distributions based on it, it is necessary for rolling Debian "unstable" distributions like `siduction` (which is what I use :D) Debian "unstable" distribution (which eventually becomes the "testing" distribution, to become "stable" on release) does not use version numbers in the abovementioned files, just the codename. This is the reason we need to fake the OS version number for Debian.
1 parent fd19c46 commit e827b65

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

build-tools/xaprepare/xaprepare/ConfigAndData/Dependencies/Linux.Debian.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ class LinuxDebian : LinuxDebianCommon
2525
static readonly Dictionary<string, string> DebianUnstableVersionMap = new Dictionary<string, string> (StringComparer.OrdinalIgnoreCase) {
2626
{ "bookworm", "12" },
2727
{ "bookworm/sid", "12" },
28+
{ "trixie", "13" },
29+
{ "trixie/sid", "13" },
2830
};
2931

3032
protected Version DebianRelease { get; private set; } = new Version (0, 0);
@@ -56,6 +58,7 @@ static bool IsDebian10OrNewer (string? version)
5658
return
5759
version!.IndexOf ("bullseye", StringComparison.OrdinalIgnoreCase) >= 0 ||
5860
version.IndexOf ("bookworm", StringComparison.OrdinalIgnoreCase) >= 0 ||
61+
version.IndexOf ("trixie", StringComparison.OrdinalIgnoreCase) >= 0 ||
5962
version.IndexOf ("sid", StringComparison.OrdinalIgnoreCase) >= 0;
6063
}
6164

@@ -75,7 +78,8 @@ static bool IsBookwormSidOrNewer (string? debian_version)
7578
return false;
7679
}
7780

78-
return debian_version!.IndexOf ("bookworm", StringComparison.OrdinalIgnoreCase) >= 0;
81+
return debian_version!.IndexOf ("bookworm", StringComparison.OrdinalIgnoreCase) >= 0 ||
82+
debian_version!.IndexOf ("trixie", StringComparison.OrdinalIgnoreCase) >= 0;
7983
}
8084

8185
protected override bool EnsureVersionInformation (Context context)

0 commit comments

Comments
 (0)