1
0
mirror of https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git synced 2025-08-24 16:15:44 +00:00

gnome-software: handle dnf5 key import prompt

GNOME Software with the dnf5 backend prompts for GPG key import
if it hasn't already happened. We need to handle that. Luckily
I don't think we can get both this *and* the 'download unsigned'
needle, so we just make them alternates.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
This commit is contained in:
Adam Williamson 2025-07-28 15:14:08 -07:00
parent 597658b47f
commit bb75e1a425
3 changed files with 26 additions and 0 deletions

View File

@ -0,0 +1,15 @@
{
"area": [
{
"xpos": 537,
"ypos": 538,
"width": 84,
"height": 16,
"type": "match"
}
],
"properties": [],
"tags": [
"desktop_package_tool_import_key"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 103 KiB

View File

@ -96,6 +96,17 @@ sub run {
# https://gitlab.gnome.org/GNOME/gnome-software/-/issues/2246
click_lastmatch if (check_screen "desktop_package_tool_update_download_unsigned", 30);
}
elsif ($desktop eq 'gnome' && !get_var("ADVISORY_OR_TASK")) {
# we might get a key import prompt
# https://gitlab.gnome.org/GNOME/gnome-software/-/issues/2874
# this won't happen for update tests as we've already
# imported it in an earlier dnf command-line operation
if (check_screen 'desktop_package_tool_import_key', 30) {
click_lastmatch;
my $pass = get_var("USER_PASSWORD", "weakpassword");
type_very_safely("$pass\n") if (check_screen("auth_required", 10));
}
}
# If there is an issue and Software reports it, let us click
# "Details" to see what the problem was to make later
# troubleshooting easier.