diff options
author | Francois Pons <fpons@mandriva.com> | 2003-08-11 14:04:35 +0000 |
---|---|---|
committer | Francois Pons <fpons@mandriva.com> | 2003-08-11 14:04:35 +0000 |
commit | 9d5c3d93c70a758b4d4abf34b3f31ed06142da8b (patch) | |
tree | e15d16dbc769ca276a348508ed404dcaaea9eb22 | |
parent | b020aab28e81fd405cc0585c2c0928d2bdd134a0 (diff) | |
download | perl-URPM-9d5c3d93c70a758b4d4abf34b3f31ed06142da8b.tar perl-URPM-9d5c3d93c70a758b4d4abf34b3f31ed06142da8b.tar.gz perl-URPM-9d5c3d93c70a758b4d4abf34b3f31ed06142da8b.tar.bz2 perl-URPM-9d5c3d93c70a758b4d4abf34b3f31ed06142da8b.tar.xz perl-URPM-9d5c3d93c70a758b4d4abf34b3f31ed06142da8b.zip |
0.93-2mdk
-rw-r--r-- | URPM/Signature.pm | 20 | ||||
-rw-r--r-- | perl-URPM.spec | 5 |
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. |