From c0ed5b0a35d4819782a5f069a70893f19d3ded9f Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Mon, 1 Jun 2009 13:37:20 +0300 Subject: [PATCH] Turn unused spec syntax obsoletion mechanism into deprecation warning --- build/parsePreamble.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/build/parsePreamble.c b/build/parsePreamble.c index c000780..d6b7a1c 100644 --- a/build/parsePreamble.c +++ b/build/parsePreamble.c @@ -689,7 +689,7 @@ typedef struct PreambleRec_s { rpmTag tag; size_t len; int multiLang; - int obsolete; + int deprecated; const char * token; } * PreambleRec; @@ -761,10 +761,9 @@ static int findPreambleTag(rpmSpec spec,rpmTag * tag, for (p = preambleList; p->token != NULL; p++) { if (!(p->token && !rstrncasecmp(spec->line, p->token, p->len))) continue; - if (p->obsolete) { - rpmlog(RPMLOG_ERR, _("Legacy syntax is unsupported: %s\n"), - p->token); - p = NULL; + if (p->deprecated) { + rpmlog(RPMLOG_WARNING, _("line %d: %s is deprecated: %s\n"), + spec->lineNum, p->token, spec->line); } break; } -- 2.7.4