From 13cf507c8b4a26761147e8d0ba36c8402bf6fec8 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Wed, 12 Mar 2025 10:55:45 -0700 Subject: [PATCH] Patch date as well as type for KDE upgrade metadata For deciding whether to show a release as available for upgrade, Discover now also checks its date as well as its 'type'. If the date is in the future, even if the type is stable, it won't show it unless the allow-pre-releases flag is set. So, we need to also patch out the date. Just blanking it also works, but let's hardcode it to the start of 2025 to be a bit more realistic (in case there's ever a situation where the check passes with an empty date, but fails with a date it should pass with). Signed-off-by: Adam Williamson --- tests/graphical_upgrade_prerequisites.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/graphical_upgrade_prerequisites.pm b/tests/graphical_upgrade_prerequisites.pm index 3be6af9f..ba54b2d2 100644 --- a/tests/graphical_upgrade_prerequisites.pm +++ b/tests/graphical_upgrade_prerequisites.pm @@ -92,8 +92,9 @@ sub run { # Replace "rawhide" with the Rawhide version number if we're # upgrading to Rawhide assert_script_run("sed -i 's,rawhide,$rawrel,g' /usr/share/metainfo/org.fedoraproject.fedora.metainfo.xml") if ($release eq $rawrel); - # Now mark the release we want to upgrade to as stable - assert_script_run("sed -i 's,version=\"$release\" type=\".*\" date=,version=\"$release\" type=\"stable\" date=,g' /usr/share/metainfo/org.fedoraproject.fedora.metainfo.xml"); + # Now mark the release we want to upgrade to as stable and + # ensure it doesn't have a date in the future + assert_script_run("sed -i 's,version=\"$release\" type=\".*\" date=\".*\",version=\"$release\" type=\"stable\" date=\"2025-01-01\",g' /usr/share/metainfo/org.fedoraproject.fedora.metainfo.xml"); # Upload the modified file for debugging upload_logs("/usr/share/metainfo/org.fedoraproject.fedora.metainfo.xml", failok => 1); # Switch to the regular user