#159489:libgnome-dev: packages depending on both png2 and png3
Package: libgnome-dev
Followup-For: Bug #159489
In arguing for gratuitous dependencies, Junichi Uekawa wrote:
> It's a different matter, and it is a different reason that I am
> requesting for the dependency. And I am requesting that dependency
> with png package maintainer hat on. We still have packages that are
> broken, and we will probably only discover it when we run them.
Not necessarily; a quick hack to apt-rdepends (see patch below) lets
me generate a list of affected packages with the commands
apt-rdepends.hacked -r --section-follow='(old)?libs' libpng2 > libpng2.rdepends
apt-rdepends.hacked -r --section-follow='(old)?libs' libpng3 > libpng3.rdepends
grep -v '^ ' libpng3.rdepends | sort > libpng3.rdepends.sorted
grep -v '^ ' libpng2.rdepends | sort > libpng2.rdepends.sorted
comm -12 libpng?.rdepends.sorted
analog
autotrace
bonobo-python
burgerspace
ganso
gbatnav
gco
gdtclft
gerbv
gmoo
gnoise-gnome
gs-esp
gvid
http-analyze
kdelibs3-cups
kismet
libgnome-applet-perl
libgnome-perl
libgnome-print-perl
libparagui1.0
libparagui1.0-dev
libqt3-mt-odbc
libqt3-odbc
libqtcups-dev
libqtcups2
linuxconf
modlogan
netsaint
ntop
nut-cgi
ooqstart-gnome
prestimel
pstoedit
python-gdk-imlib
python-gnome
qtcups
rubymagick
tora
xastir
xgsmlib
--- /usr/bin/apt-rdepends 2002-08-19 12:19:14.000000000 -0400
+++ /home/amu/bin/apt-rdepends.hacked 2002-09-12 21:46:46.000000000 -0400
@@ -44,6 +44,8 @@
my @statefollow = ();
# Which states should I show?
my @stateshow = ();
+# Which sections should I follow?
+my @sectionfollow = ();
GetOptions ('reverse|r' => \$reverse,
'dotty|d' => \$dotty,
@@ -52,6 +54,7 @@
'print-state|p' => \$printstate,
'state-follow=s' => \@statefollow,
'state-show=s' => \@stateshow,
+ 'section-follow=s' => \@sectionfollow,
'help|?' => \$help,
man => \$man) or pod2usage(2);
pod2usage(1) if $help;
@@ -60,6 +63,7 @@
@show = split(/,/,join(',',@show ));
@statefollow = split(/,/,join(',',@statefollow));
@stateshow = split(/,/,join(',',@stateshow ));
+@sectionfollow = split(/,/,join(',',@sectionfollow));
@follow = ('Depends') unless @follow;
@show = ('Depends') unless @show;
@@ -69,6 +73,8 @@
@stateshow = ('NotInstalled', 'UnPacked', 'HalfConfigured',
'HalfInstalled', 'ConfigFiles', 'Installed')
unless @stateshow;
+@sectionfollow = ('.*')
+ unless @sectionfollow;
# Finish choosing the direction of our recursive dependencies
my $DirText;
@@ -151,13 +157,16 @@
: "")
. $version;
}
- # Figure out the current state.
+ # Figure out the current state and section.
my $state = $reverse
? $_->{ParentPkg}->{CurrentState}
: $_->{TargetPkg}->{CurrentState};
+ my $section = $reverse
+ ? $_->{TargetPkg}->{Section}
+ : $_->{ParentPkg}->{Section};
# Push the name of this package into the right pigeonhole.
$results{$_->{DepType}}{$_->{$PkgReference}->{Name}}
- = [ $version, $state ];
+ = [ $version, $state, $section ];
}
# Display this list.
@@ -216,6 +225,11 @@
if (grep {$deptype eq $_} @follow) {
show_rdepends (
grep {
+ my $section = $results{$deptype}{$_}[2];
+ grep {
+ $section =~ /^$_$/
+ } @sectionfollow
+ } grep {
my $state = $results{$deptype}{$_}[1];
grep {
$state eq $_
Reply to: