From e0340162e87a8f62367d0b41243836eb256444e7 Mon Sep 17 00:00:00 2001 From: Frank Lichtenheld Date: Mon, 20 Feb 2006 14:43:53 +0000 Subject: [PATCH] Merge print_deps and print_src_deps and move the differences of print_src_deps to SrcPage->get_dep_field. --- lib/Packages/DoShow.pm | 12 ++++---- lib/Packages/HTML.pm | 62 ++++++++--------------------------------- lib/Packages/SrcPage.pm | 26 ++++++++++++++++- 3 files changed, 42 insertions(+), 58 deletions(-) diff --git a/lib/Packages/DoShow.pm b/lib/Packages/DoShow.pm index b7dfa31..b1bf7ac 100644 --- a/lib/Packages/DoShow.pm +++ b/lib/Packages/DoShow.pm @@ -345,12 +345,12 @@ sub do_show { # display dependencies # my $dep_list; - $dep_list = print_src_deps( \%packages, $opts, $pkg, - $page->get_dep_field('build-depends'), - 'build-depends' ); - $dep_list .= print_src_deps( \%packages, $opts, $pkg, - $page->get_dep_field('build-depends-indep'), - 'build-depends-indep' ); + $dep_list = print_deps( \%packages, $opts, $pkg, + $page->get_dep_field('build-depends'), + 'build-depends' ); + $dep_list .= print_deps( \%packages, $opts, $pkg, + $page->get_dep_field('build-depends-indep'), + 'build-depends-indep' ); if ( $dep_list ) { $package_page .= "
\n"; diff --git a/lib/Packages/HTML.pm b/lib/Packages/HTML.pm index 7ec5335..1a68b5f 100644 --- a/lib/Packages/HTML.pm +++ b/lib/Packages/HTML.pm @@ -243,10 +243,12 @@ sub dep_item { sub print_deps { my ( $packages, $opts, $pkg, $relations, $type) = @_; my %dep_type = ('depends' => 'dep', 'recommends' => 'rec', - 'suggests' => 'sug'); + 'suggests' => 'sug', 'build-depends' => 'adep', + 'build-depends-indep' => 'idep' ); my $res = "