summaryrefslogtreecommitdiff
path: root/parse.c
diff options
context:
space:
mode:
authorTollef Fog Heen <tfheen@err.no>2009-03-30 20:40:53 +0200
committerTollef Fog Heen <tfheen@err.no>2009-03-30 20:40:53 +0200
commit02d5ae3fb61c52f642d3b6b41973f12372fcdc60 (patch)
tree6f4f2952c0d62cfd0b92be663557cc6108b21093 /parse.c
parent34657e444f7a8879ea3ed7b5d5d795fe96b231c7 (diff)
2009-03-30 Tollef Fog Heen <tfheen@err.no>
* pkg.[ch], parse.[ch], main.c, check/Makefile.am, check/check-missing, check/missing-requires-private.pc: Skip Requires.private unless we need to look at them for cflags. Add test case. Thanks to Loïc Minier for most of the idea and the implementation. Debian #475031
Diffstat (limited to 'parse.c')
-rw-r--r--parse.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/parse.c b/parse.c
index f773db3..4c6275f 100644
--- a/parse.c
+++ b/parse.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2006-2008 Tollef Fog Heen <tfheen@err.no>
+ * Copyright (C) 2006-2009 Tollef Fog Heen <tfheen@err.no>
* Copyright (C) 2001, 2002, 2005-2006 Red Hat Inc.
*
* This program is free software; you can redistribute it and/or
@@ -917,7 +917,9 @@ pathnamecmp (const char *a,
#endif
static void
-parse_line (Package *pkg, const char *untrimmed, const char *path, gboolean ignore_requires, gboolean ignore_private_libs)
+parse_line (Package *pkg, const char *untrimmed, const char *path,
+ gboolean ignore_requires, gboolean ignore_private_libs,
+ gboolean ignore_requires_private)
{
char *str;
char *p;
@@ -961,7 +963,10 @@ parse_line (Package *pkg, const char *untrimmed, const char *path, gboolean igno
else if (strcmp (tag, "Version") == 0)
parse_version (pkg, p, path);
else if (strcmp (tag, "Requires.private") == 0)
- parse_requires_private (pkg, p, path);
+ {
+ if (!ignore_requires_private)
+ parse_requires_private (pkg, p, path);
+ }
else if (strcmp (tag, "Requires") == 0)
{
if (ignore_requires == FALSE)
@@ -1078,7 +1083,9 @@ parse_line (Package *pkg, const char *untrimmed, const char *path, gboolean igno
}
Package*
-parse_package_file (const char *path, gboolean ignore_requires, gboolean ignore_private_libs)
+parse_package_file (const char *path, gboolean ignore_requires,
+ gboolean ignore_private_libs,
+ gboolean ignore_requires_private)
{
FILE *f;
Package *pkg;
@@ -1115,7 +1122,8 @@ parse_package_file (const char *path, gboolean ignore_requires, gboolean ignore_
{
one_line = TRUE;
- parse_line (pkg, str->str, path, ignore_requires, ignore_private_libs);
+ parse_line (pkg, str->str, path, ignore_requires, ignore_private_libs,
+ ignore_requires_private);
g_string_truncate (str, 0);
}