aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--URPM/Signature.pm20
-rw-r--r--perl-URPM.spec5
2 files changed, 15 insertions, 10 deletions
diff --git a/URPM/Signature.pm b/URPM/Signature.pm
index d9c5b2f..7b90693 100644
--- a/URPM/Signature.pm
+++ b/URPM/Signature.pm
@@ -35,7 +35,7 @@ sub parse_pubkeys {
#- parse an armored file and import in keys hash if the key does not already exists.
sub parse_armored_file {
- my ($urpm, $file) = @_;
+ my ($urpm, $file, %options) = @_;
my ($block, @l, $content);
local (*F, $_);
@@ -64,13 +64,15 @@ sub parse_armored_file {
@l < 1 and die "no key found while parsing armored file";
#- check if key has been found, remove from list.
- @l = grep {
- my $found = 0;
- foreach my $k (values %{$urpm->{keys} || {}}) {
- $k->{content} eq $_ and $found = 1, last;
- }
- !$found;
- } @l;
+ if ($options{only_unknown_keys}) {
+ @l = grep {
+ my $found = 0;
+ foreach my $k (values %{$urpm->{keys} || {}}) {
+ $k->{content} eq $_ and $found = 1, last;
+ }
+ !$found;
+ } @l;
+ }
#- now return something (true) which reflect what should be found in keys.
map { +{ content => $_ } } @l;
@@ -80,7 +82,7 @@ sub import_armored_file {
my ($urpm, $file, %options) = @_;
#- this is a tempory operation currently...
- system "$ENV{LD_LOADER} rpm ".($options{root} && "--root '$options{root}'" || "")."--import '$file'" == 0 or
+ system("rpm", ($options{root} ? ("--root", $options{root}) : @{[]}), "--import", $file) == 0 or
die "import of armored file failed";
}
1;
diff --git a/perl-URPM.spec b/perl-URPM.spec
index b319173..f413ad2 100644
--- a/perl-URPM.spec
+++ b/perl-URPM.spec
@@ -1,7 +1,7 @@
%define name perl-URPM
%define real_name URPM
%define version 0.93
-%define release 1mdk
+%define release 2mdk
%{expand:%%define rpm_version %(rpm -q --queryformat '%{VERSION}-%{RELEASE}' rpm)}
@@ -51,6 +51,9 @@ rm -rf $RPM_BUILD_ROOT
%changelog
+* Mon Aug 11 2003 François Pons <fpons@mandrakesoft.com> 0.93-2mdk
+- fixed pubkey management, fixed importation of pubkey in rpmdb.
+
* Wed Aug 6 2003 François Pons <fpons@mandrakesoft.com> 0.93-1mdk
- added URPM::Signature for handling armored gpg file and
internal rpm pubkey.