diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-21 05:22:11 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-21 05:22:11 +0000 |
commit | 724b36b7051c0d9190cbd8854ba5919904967c11 (patch) | |
tree | 8996ac57bf70972bf524e865e0845cd54aab6f6b /widget | |
parent | Releasing progress-linux version 115.10.0esr-1~deb12u1progress7u1. (diff) | |
download | firefox-esr-724b36b7051c0d9190cbd8854ba5919904967c11.tar.xz firefox-esr-724b36b7051c0d9190cbd8854ba5919904967c11.zip |
Merging upstream version 115.11.0esr.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | widget/LSBUtils.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/widget/LSBUtils.cpp b/widget/LSBUtils.cpp index 520d50e5cc..672398cc86 100644 --- a/widget/LSBUtils.cpp +++ b/widget/LSBUtils.cpp @@ -45,6 +45,7 @@ bool GetOSRelease(nsACString& aDistributor, nsACString& aDescription, bool seen_id = false, seen_pretty_name = false, seen_version_id = false; std::string rawline; nsAutoCString name; + nsAutoCString build_id; while (std::getline(stream, rawline)) { std::string_view line(rawline); size_t pos = line.find('='); @@ -68,6 +69,8 @@ bool GetOSRelease(nsACString& aDistributor, nsACString& aDescription, if (ExtractAndSetValue(aDescription, value)) seen_pretty_name = true; } else if (key == "VERSION_ID") { if (ExtractAndSetValue(aRelease, value)) seen_version_id = true; + } else if (key == "BUILD_ID") { + ExtractAndSetValue(build_id, value); } else if (key == "VERSION_CODENAME") { ExtractAndSetValue(aCodename, value); } @@ -77,6 +80,11 @@ bool GetOSRelease(nsACString& aDistributor, nsACString& aDescription, if (seen_id && !name.IsEmpty() && name.EqualsIgnoreCase(aDistributor)) { aDistributor = name; } + // If VERSION_ID is not set but BUILD_ID is, use BUILD_ID. + if (!seen_version_id && !build_id.IsEmpty()) { + aRelease = build_id; + seen_version_id = true; + } // Only consider our work done if we've seen at least ID, PRETTY_NAME and // VERSION_ID. return seen_id && seen_pretty_name && seen_version_id; |