Skip to content

Commit

Permalink
expired-pgp-keys: Drop checking for gpg command
Browse files Browse the repository at this point in the history
The gpg provider is now a hard dependency in the spec file.
  • Loading branch information
jan-kolarik committed Feb 24, 2025
1 parent 7c673ce commit 44a8852
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions libdnf5-plugins/expired-pgp-keys/expired-pgp-keys.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,17 +92,6 @@ class ExpiryInfoMessage : public libdnf5::Message {
int64_t expiration_timestamp;
};

/// Check that GPG is installed to enable querying expired keys later.
static bool is_gpg_installed() {
auto ts = rpmtsCreate();
rpmdbMatchIterator mi;
mi = rpmtsInitIterator(ts, RPMDBI_PROVIDENAME, "gpg", 0);
bool found = rpmdbNextIterator(mi) != NULL;
rpmdbFreeIterator(mi);
rpmtsFree(ts);
return found;
}

/// Check if the transaction contains any inbound actions.
/// This determines if new software is to be installed, which might require downloading a new PGP signing key.
static bool any_inbound_action(const libdnf5::base::Transaction & transaction) {
Expand Down Expand Up @@ -175,11 +164,6 @@ void ExpiredPgpKeys::process_expired_pgp_keys(const libdnf5::base::Transaction &
return;
}

if (!is_gpg_installed()) {
logger.error("Expired PGP Keys Plugin: GPG is not installed on the system. Aborting...");
return;
}

if (!any_inbound_action(transaction)) {
return;
}
Expand Down

0 comments on commit 44a8852

Please sign in to comment.