Skip to content

Commit

Permalink
Modify message about skipped verification
Browse files Browse the repository at this point in the history
  • Loading branch information
j-mracek committed May 27, 2024
1 parent 13672b6 commit abc4fdd
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions libdnf5/base/transaction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1321,10 +1321,10 @@ bool Transaction::Impl::check_gpg_signatures() {
repos_with_skipped_checks, C_("It is a joining character for repositories IDs", ", "));
auto warning_msg =
(num_checks_skipped == 1)
? utils::sformat(_("Warning: skipped PGP checks for 1 package from {} repository."), repo_string)
? utils::sformat(_("Warning: skipped PGP checks for 1 package from repository: {}"), repo_string)
: utils::sformat(
P_("Warning: skipped PGP checks for {0} packages from {1} repository.",
"Warning: skipped PGP checks for {0} packages from {1} repositories.",
P_("Warning: skipped PGP checks for {0} packages from repository: {1}",
"Warning: skipped PGP checks for {0} packages from repositories: {1}",
repos_with_skipped_checks.size()),
num_checks_skipped,
repo_string);
Expand Down
2 changes: 1 addition & 1 deletion test/libdnf5/base/test_transaction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ void BaseTransactionTest::test_check_gpg_signatures_no_gpgcheck() {
CPPUNIT_ASSERT(transaction.check_gpg_signatures());
CPPUNIT_ASSERT_EQUAL((size_t)1, transaction.get_gpg_signature_problems().size());
CPPUNIT_ASSERT_EQUAL(
std::string("Warning: skipped PGP checks for 1 package from repomd-repo1 repository."),
std::string("Warning: skipped PGP checks for 1 package from repository: repomd-repo1"),
transaction.get_gpg_signature_problems()[0]);
}

Expand Down
2 changes: 1 addition & 1 deletion test/python3/libdnf5/base/test_transaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def test_check_gpg_signatures_no_gpgcheck(self):

self.assertEqual(1, transaction.get_transaction_packages_count())
self.assertTrue(transaction.check_gpg_signatures())
self.assertEqual(('Warning: skipped PGP checks for 1 package from repomd-repo1 repository.',),
self.assertEqual(('Warning: skipped PGP checks for 1 package from repository: repomd-repo1',),
transaction.get_gpg_signature_problems())

def test_check_gpg_signatures_fail(self):
Expand Down

0 comments on commit abc4fdd

Please sign in to comment.