From 215a62cad40d96f9d52e4acef35d694319789191 Mon Sep 17 00:00:00 2001 From: thorpej Date: Wed, 26 Apr 2000 05:12:06 +0000 Subject: [PATCH] Don't warn when two nodes provide the same thing; this can be quite useful (read the big comment I added). --- sbin/rcorder/rcorder.c | 44 ++++++++++++++++++++++++++++++++++++++---- 1 file changed, 40 insertions(+), 4 deletions(-) diff --git a/sbin/rcorder/rcorder.c b/sbin/rcorder/rcorder.c index e14f1f76408f..951bcb630ced 100644 --- a/sbin/rcorder/rcorder.c +++ b/sbin/rcorder/rcorder.c @@ -1,4 +1,4 @@ -/* $NetBSD: rcorder.c,v 1.1 1999/11/23 05:28:22 mrg Exp $ */ +/* $NetBSD: rcorder.c,v 1.2 2000/04/26 05:12:06 thorpej Exp $ */ /* * Copyright (c) 1998, 1999 Matthew R. Green @@ -264,10 +264,46 @@ add_provide(fnode, s) head->fnode = NULL; head->last = head->next = NULL; Hash_SetValue(entry, head); - } else if (new == 0) { - warnx("file `%s' provides `%s'.", fnode->filename, s); - warnx("\tpreviously seen in `%s'.", head->next->fnode->filename); } +#if 0 + /* + * Don't warn about this. We want to be able to support + * scripts that do two complex things: + * + * - Two independent scripts which both provide the + * same thing. Both scripts must be executed in + * any order to meet the barrier. An example: + * + * Script 1: + * + * PROVIDE: mail + * REQUIRE: LOGIN + * + * Script 2: + * + * PROVIDE: mail + * REQUIRE: LOGIN + * + * - Two interdependent scripts which both provide the + * same thing. Both scripts must be executed in + * graph order to meet the barrier. An example: + * + * Script 1: + * + * PROVIDE: nameservice dnscache + * REQUIRE: SERVERS + * + * Script 2: + * + * PROVIDE: nameservice nscd + * REQUIRE: dnscache + */ + else if (new == 0) { + warnx("file `%s' provides `%s'.", fnode->filename, s); + warnx("\tpreviously seen in `%s'.", + head->next->fnode->filename); + } +#endif pnode = emalloc(sizeof(*pnode)); pnode->head = RESET;