diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2012-05-11 11:57:09 +0300 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2012-05-11 11:57:09 +0300 |
commit | a29c15cb0543b0230bc0e75346d422baace91281 (patch) | |
tree | 0ee0de676a8c44494e1248f1701dab6de912e96c /build | |
parent | 06d9825f4cf9adb617d4cac04ff510805183f972 (diff) | |
download | librpm-tizen-a29c15cb0543b0230bc0e75346d422baace91281.tar.gz librpm-tizen-a29c15cb0543b0230bc0e75346d422baace91281.tar.bz2 librpm-tizen-a29c15cb0543b0230bc0e75346d422baace91281.zip |
Improve spec %include error detection and message
- Besides excess arguments, catch missing argument too
- Log filename and line number like with other error messages
Diffstat (limited to 'build')
-rw-r--r-- | build/parseSpec.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/build/parseSpec.c b/build/parseSpec.c index 40a1ed6ae..491bfa526 100644 --- a/build/parseSpec.c +++ b/build/parseSpec.c @@ -388,8 +388,9 @@ int readLine(rpmSpec spec, int strip) SKIPNONSPACE(endFileName); p = endFileName; SKIPSPACE(p); - if (*p != '\0') { - rpmlog(RPMLOG_ERR, _("malformed %%include statement\n")); + if (*fileName == '\0' || *p != '\0') { + rpmlog(RPMLOG_ERR, _("%s:%d: malformed %%include statement\n"), + ofi->fileName, ofi->lineNum); return PART_ERROR; } *endFileName = '\0'; |