summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--urpm/select.pm2
-rw-r--r--urpm/util.pm3
2 files changed, 2 insertions, 3 deletions
diff --git a/urpm/select.pm b/urpm/select.pm
index 3abf6507..fa018352 100644
--- a/urpm/select.pm
+++ b/urpm/select.pm
@@ -368,8 +368,6 @@ sub unselected_packages {
grep { $state->{rejected}{$_}{backtrack} } keys %{$state->{rejected} || {}};
}
-sub uniq { my %l; $l{$_} = 1 foreach @_; grep { delete $l{$_} } @_ }
-
sub translate_why_unselected {
my ($urpm, $state, @fullnames) = @_;
diff --git a/urpm/util.pm b/urpm/util.pm
index 77ee415c..520ce7f7 100644
--- a/urpm/util.pm
+++ b/urpm/util.pm
@@ -11,7 +11,7 @@ our @EXPORT = qw(quotespace unquotespace
untaint
copy_and_own
same_size_and_mtime
- partition
+ partition uniq
difference2 member file_size cat_ dirname basename
);
@@ -125,6 +125,7 @@ sub partition(&@) {
\@a, \@b;
}
+sub uniq { my %l; $l{$_} = 1 foreach @_; grep { delete $l{$_} } @_ }
sub difference2 { my %l; @l{@{$_[1]}} = (); grep { !exists $l{$_} } @{$_[0]} }
sub member { my $e = shift; foreach (@_) { $e eq $_ and return 1 } 0 }
sub cat_ { my @l = map { my $F; open($F, '<', $_) ? <$F> : () } @_; wantarray() ? @l : join '', @l }