aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <thierry.vignaud@gmail.com>2019-04-30 11:53:27 +0200
committerThierry Vignaud <thierry.vignaud@gmail.com>2019-12-23 17:06:14 +0100
commit4fe92b2faa1dd90fa68b7fbddacb82a6a3094e5f (patch)
tree11a1b2b04a8fb0cc5a82b9c463214b46b195cbcd
parent6b882f8190e9788de3c8b6ab77570c4ec991640f (diff)
downloadperl-URPM-4fe92b2faa1dd90fa68b7fbddacb82a6a3094e5f.tar
perl-URPM-4fe92b2faa1dd90fa68b7fbddacb82a6a3094e5f.tar.gz
perl-URPM-4fe92b2faa1dd90fa68b7fbddacb82a6a3094e5f.tar.bz2
perl-URPM-4fe92b2faa1dd90fa68b7fbddacb82a6a3094e5f.tar.xz
perl-URPM-4fe92b2faa1dd90fa68b7fbddacb82a6a3094e5f.zip
document URPM::Signature
-rw-r--r--URPM.pm2
-rw-r--r--URPM/Signature.pm38
2 files changed, 36 insertions, 4 deletions
diff --git a/URPM.pm b/URPM.pm
index 84560e6..0fa9e86 100644
--- a/URPM.pm
+++ b/URPM.pm
@@ -1044,6 +1044,8 @@ B<transaction_state>: $state object
The L<URPM::Resolve> implements the resolving bits.
+The L<URPM::Signature> implements the pubkey bits.
+
The L<urpm> package is a higher level module used by the urpmi command line tool,
the rpmdrake GUI and the drakx installer.
diff --git a/URPM/Signature.pm b/URPM/Signature.pm
index f72c087..aa9e96e 100644
--- a/URPM/Signature.pm
+++ b/URPM/Signature.pm
@@ -4,9 +4,24 @@ use strict;
use warnings;
# perl_checker: require URPM
-#- parse from rpmlib db.
-#-
-#- side-effects: $urpm
+=head1 NAME
+
+URPM::Signature - Pubkey routines for URPM/urpmi
+
+=head1 SYNOPSIS
+
+=head1 DESCRIPTION
+
+=over
+
+=cut
+
+=item parse_pubkeys($urpm, %options)
+
+Parse from rpmlib db ("gpg-pubkey")
+
+=cut
+
sub parse_pubkeys {
my ($urpm, %options) = @_;
@@ -64,7 +79,18 @@ sub import_needed_pubkeys() {
return;
}
-#- import pubkeys only if it is needed.
+=item import_needed_pubkeys_from_file($db, $pubkey_file, $o_callback)
+
+Import pubkeys from file, but only if it is needed.
+Returns the return value of the optionnal callback.
+
+The optional callback enables to handle success or error.
+
+The callback signature is callback($id, $imported), aka the ID of the key and
+whether it was imported or not.
+
+=cut
+
sub import_needed_pubkeys_from_file {
my ($db, $pubkey_file, $o_callback) = @_;
@@ -85,3 +111,7 @@ sub import_needed_pubkeys_from_file {
}
1;
+
+__END__
+
+=back