r35019 - in /trunk/dh-make-perl/lib: Debian/Dependencies.pm DhMakePerl.pm
dmn at users.alioth.debian.org
dmn at users.alioth.debian.org
Fri May 8 13:57:41 UTC 2009
Author: dmn
Date: Fri May 8 13:57:35 2009
New Revision: 35019
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=35019
Log:
Dependencies: prune() is deprecated
Modified:
trunk/dh-make-perl/lib/Debian/Dependencies.pm
trunk/dh-make-perl/lib/DhMakePerl.pm
Modified: trunk/dh-make-perl/lib/Debian/Dependencies.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/dh-make-perl/lib/Debian/Dependencies.pm?rev=35019&op=diff
==============================================================================
--- trunk/dh-make-perl/lib/Debian/Dependencies.pm (original)
+++ trunk/dh-make-perl/lib/Debian/Dependencies.pm Fri May 8 13:57:35 2009
@@ -192,36 +192,15 @@
=item prune()
-Reduces the list of dependencies by removing duplicate or covering ones. The
-resulting list is also sorted by package name.
-
-For example, if you have libppi-perl, libppi-perl (>= 3.0), libarm-perl,
-libalpa-perl, libarm-perl (>= 2), calling C<prune> will leave you with
-libalpa-perl, libarm-perl (>= 2), libppi-perl (>= 3.0)
+This method is deprecated. If you want to sort the dependency list, either call L</sort> or use normal perl sorting stuff on the dereferenced array.
=cut
sub prune(@) {
my $self = shift;
- my %deps;
- for (@$self) {
- my $p = $_->pkg;
- my $v = $_->ver;
- if ( exists $deps{$p} ) {
- my $cur_ver = $deps{$p}->ver;
-
- # replace the present dependency unless it also satisfies the new
- # one
- $deps{$p} = $_
- unless $deps{$p}->satisfies($_);
- }
- else {
- $deps{$p} = $_;
- }
-
- }
-
- @$self = map( $deps{$_}, sort( keys(%deps) ) );
+
+ use Carp ();
+ Carp::croak("prune() is deprecated and does nothing");
}
=back
Modified: trunk/dh-make-perl/lib/DhMakePerl.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/dh-make-perl/lib/DhMakePerl.pm?rev=35019&op=diff
==============================================================================
--- trunk/dh-make-perl/lib/DhMakePerl.pm (original)
+++ trunk/dh-make-perl/lib/DhMakePerl.pm Fri May 8 13:57:35 2009
@@ -1227,10 +1227,6 @@
$bdepends += $bdependsi;
@$bdependsi = ();
}
-
- $depends->prune();
- $bdepends->prune();
- $bdependsi->prune();
$fh->print("Source: $srcname\n");
$fh->print("Section: $section\n");
More information about the Pkg-perl-cvs-commits
mailing list