[Initscripts-ng-commits] r412 - in /trunk/src/insserv/debian: changelog check-initd-order
pere at users.alioth.debian.org
pere at users.alioth.debian.org
Wed Jan 2 14:28:17 UTC 2008
Author: pere
Date: Wed Jan 2 14:28:17 2008
New Revision: 412
URL: http://svn.debian.org/wsvn/initscripts-ng/?sc=1&rev=412
Log:
* Extended check-initd-order to graph services with multiple
provides as two nodes with the same dependencies, and that depend
on each other..
Modified:
trunk/src/insserv/debian/changelog
trunk/src/insserv/debian/check-initd-order
Modified: trunk/src/insserv/debian/changelog
URL: http://svn.debian.org/wsvn/initscripts-ng/trunk/src/insserv/debian/changelog?rev=412&op=diff
==============================================================================
--- trunk/src/insserv/debian/changelog (original)
+++ trunk/src/insserv/debian/changelog Wed Jan 2 14:28:17 2008
@@ -13,6 +13,9 @@
* Move code to divert update-rc.d from postinst to
update-bootsystem-insserv, to make sure both ways to activate
insserv are equivalent.
+ * Extended check-initd-order to graph services with multiple
+ provides as two nodes with the same dependencies, and that depend
+ on each other..
-- Petter Reinholdtsen <pere at debian.org> Tue, 1 Jan 2008 21:57:58 +0100
Modified: trunk/src/insserv/debian/check-initd-order
URL: http://svn.debian.org/wsvn/initscripts-ng/trunk/src/insserv/debian/check-initd-order?rev=412&op=diff
==============================================================================
--- trunk/src/insserv/debian/check-initd-order (original)
+++ trunk/src/insserv/debian/check-initd-order Wed Jan 2 14:28:17 2008
@@ -113,31 +113,42 @@
}
if (1 < @provides) {
- print STDERR "warning: Unable to properly handle multiple provides: @provides\n";
- }
-
- my %deps =
- (
- "required-$key" => 'blue',
- "should-$key" => 'springgreen',
- "$revkey" => 'yellow'
- );
-
- for $key (keys %deps) {
- if (exists $lsbinfo{$key} && $lsbinfo{$key}) {
- my @depends = split(/\s+/, $lsbinfo{$key});
- for my $pkg (@depends) {
- my $color = $deps{$key};
- if ($revkey eq $key) {
- print "\"$provides[0]\" -> \"$pkg\"[color=$color] ;\n";
- } else {
- print "\"$pkg\" -> \"$provides[0]\"[color=$color] ;\n";
+ my @providescopy = @provides;
+ my $lastprovide = shift @providescopy;
+ for my $provide (@providescopy) {
+ graph_addnode('provides' => $lastprovide,
+ "required-$key" => $provide);
+ print STDERR "Linking from $lastprovide to $provide\n";
+ graph_addnode('provides' => $provide,
+ "required-$key" => $lastprovide);
+ print STDERR "Linking from $provide to $lastprovide\n";
+ }
+ }
+
+ for my $provide (@provides) {
+ my %deps =
+ (
+ "required-$key" => 'blue',
+ "should-$key" => 'springgreen',
+ "$revkey" => 'yellow'
+ );
+
+ for $key (keys %deps) {
+ if (exists $lsbinfo{$key} && $lsbinfo{$key}) {
+ my @depends = split(/\s+/, $lsbinfo{$key});
+ for my $pkg (@depends) {
+ my $color = $deps{$key};
+ if ($revkey eq $key) {
+ print "\"$provide\" -> \"$pkg\"[color=$color] ;\n";
+ } else {
+ print "\"$pkg\" -> \"$provide\"[color=$color] ;\n";
+ }
}
}
}
- }
-
- print "\"$provides[0]\" [shape=box];\n";
+
+ print "\"$provide\" [shape=box];\n";
+ }
}
sub graph_generate {
More information about the Initscripts-ng-commits
mailing list