aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2003-08-18 15:29:08 +0000
committerPascal Rigaux <pixel@mandriva.com>2003-08-18 15:29:08 +0000
commit6234a392b4070a7a2c8441506db9913028075588 (patch)
tree13f8eef42aad1fe08afc5bfa90d114a7ada80c36
parent6df3239cda682d403321c6ae58a6a7767536ad75 (diff)
downloadperl-URPM-6234a392b4070a7a2c8441506db9913028075588.tar
perl-URPM-6234a392b4070a7a2c8441506db9913028075588.tar.gz
perl-URPM-6234a392b4070a7a2c8441506db9913028075588.tar.bz2
perl-URPM-6234a392b4070a7a2c8441506db9913028075588.tar.xz
perl-URPM-6234a392b4070a7a2c8441506db9913028075588.zip
perl_checker compliance
-rw-r--r--URPM/Resolve.pm22
-rw-r--r--perl-URPM.spec5
2 files changed, 15 insertions, 12 deletions
diff --git a/URPM/Resolve.pm b/URPM/Resolve.pm
index 9d439a4..f0dac96 100644
--- a/URPM/Resolve.pm
+++ b/URPM/Resolve.pm
@@ -117,9 +117,9 @@ sub find_chosen_packages {
}
}
#- sort package in order to have best ones first (this means good locales, no locales, bad locales).
- return ((sort { $a->id <=> $b->id } @chosen_good_locales),
- (sort { $a->id <=> $b->id } @chosen_other),
- (sort { $a->id <=> $b->id } @chosen_bad_locales));
+ return (sort { $a->id <=> $b->id } @chosen_good_locales),
+ (sort { $a->id <=> $b->id } @chosen_other),
+ (sort { $a->id <=> $b->id } @chosen_bad_locales);
}
return values(%packages);
@@ -158,7 +158,7 @@ sub unsatisfied_requires {
#- check on installed system a package which is not obsoleted is satisfying the require.
my $satisfied = 0;
- if ($n =~ /^\//) {
+ if ($n =~ m!^/!) {
$db->traverse_tag('path', [ $n ], sub {
my ($p) = @_;
exists $state->{rejected}{$p->fullname} and return;
@@ -303,7 +303,7 @@ sub resolve_rejected {
#- check if the package has already been asked to be rejected (removed or obsoleted).
#- this means only add the new reason and return.
- unless ($state->{rejected}{$pkg->fullname}) {
+ if (! $state->{rejected}{$pkg->fullname}) {
my @closure = $pkg;
#- keep track of size of package which are finally removed.
@@ -619,7 +619,7 @@ sub resolve_requested {
$state->{rejected}{$p->fullname}{closure}{$pkg->fullname} = undef;
}
}
- if (my ($file) = /^(\/[^\s\[]*)/) {
+ if (my ($file) = m!^(/[^\s\[]*)!) {
$db->traverse_tag('path', [ $file ], sub {
@keep and return;
my ($p) = @_;
@@ -858,7 +858,7 @@ sub compute_flags {
#- perform the fastest possible, unless a regular expression is given,
#- the operation matches only according to provides.
while (my ($name, $sense) = each %$val) {
- if ($name =~ /^\/(.*)\/$/) {
+ if ($name =~ m!^/(.*)/$!) {
$regex{$1} = $sense;
} else {
foreach (keys %{$urpm->{provides}{$name} || {}}) {
@@ -1075,10 +1075,10 @@ sub build_transaction_set {
if ($options{split_length}) {
#- first step consists of sorting packages according to dependencies.
- my @sorted = sort { ($a <=> $b, -1, +1, 0)[($urpm->has_dependence($state, $a, $b) && 1) +
- ($urpm->has_dependence($state, $b, $a) && 2)] }
+ my @sorted = sort { ($a <=> $b, -1, 1, 0)[($urpm->has_dependence($state, $a, $b) && 1) +
+ ($urpm->has_dependence($state, $b, $a) && 2)] }
grep { (! defined $options{start} || $_ >= $options{start}) &&
- (! defined $options{end} || $_ <= $options{end})} keys %{$state->{selected}};
+ (! defined $options{end} || $_ <= $options{end}) } keys %{$state->{selected}};
#- second step consists of re-applying resolve_requested in the same
#- order computed in first step and to update a list of package to
@@ -1164,7 +1164,7 @@ sub resolve_closure_ask_remove {
@unsatisfied;
}
sub resolve_unrequested {
- my ($urpm, $db, $state, $unrequested, %options) = @_;
+ my ($urpm, $db, $state, $unrequested, %_options) = @_;
print STDERR "calling obsoleted method URPM::resolve_unrequested\n";
diff --git a/perl-URPM.spec b/perl-URPM.spec
index ad81ce2..c4ac3cd 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 4mdk
+%define release 5mdk
%{expand:%%define rpm_version %(rpm -q --queryformat '%{VERSION}-%{RELEASE}' rpm)}
@@ -52,6 +52,9 @@ rm -rf $RPM_BUILD_ROOT
%changelog
+* Mon Aug 18 2003 Pixel <pixel@mandrakesoft.com> 0.93-5mdk
+- perl_checker compliance
+
* Wed Aug 13 2003 Guillaume Cottenceau <gc@mandrakesoft.com> 0.93-4mdk
- provide URPM::Signature as well