Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support to generate a log file that keeps track of all requests to
pkg-config. Used by the upcoming pkgtools/verifypc package. Bump PKGREVISION to 1.
- Loading branch information
jmmv
committed
Oct 1, 2005
1 parent
d5c4f27
commit e702620
Showing
3 changed files
with
69 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
$NetBSD: distinfo,v 1.1.1.1 2005/07/21 16:22:42 wiz Exp $ | ||
$NetBSD: distinfo,v 1.2 2005/10/01 12:52:16 jmmv Exp $ | ||
|
||
SHA1 (pkg-config-0.19.tar.gz) = b09fa43dcc44fe0db8df1c4994a8ff9eab371666 | ||
RMD160 (pkg-config-0.19.tar.gz) = 30355004c09fe947dc3cf8f1159f068924d0d7a2 | ||
Size (pkg-config-0.19.tar.gz) = 968790 bytes | ||
SHA1 (patch-aa) = b07ff0f2a8caaef6d91673c1883f0de9d4d2ae7f | ||
SHA1 (patch-ab) = 4554bbb56ffaa857051e44b31897f0b254650803 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
$NetBSD: patch-ab,v 1.1 2005/10/01 12:52:16 jmmv Exp $ | ||
|
||
Log all pkg-config calls to a file. Used by pkgtools/verifypc. | ||
|
||
--- main.c.orig 2005-05-21 11:14:47.000000000 +0200 | ||
+++ main.c | ||
@@ -458,12 +458,27 @@ main (int argc, char **argv) | ||
{ | ||
GSList *reqs; | ||
GSList *iter; | ||
+ char *log_name; | ||
+ FILE *log; | ||
|
||
reqs = parse_module_list (NULL, str->str, | ||
"(command line arguments)"); | ||
|
||
iter = reqs; | ||
|
||
+ log_name = getenv ("PKG_CONFIG_LOG"); | ||
+ if (log_name != NULL) | ||
+ { | ||
+ log = fopen (getenv ("PKG_CONFIG_LOG"), "a"); | ||
+ if (log == NULL) | ||
+ { | ||
+ fprintf (stderr, "Cannot open log file: %s\n", log_name); | ||
+ exit (1); | ||
+ } | ||
+ } | ||
+ else | ||
+ log = NULL; | ||
+ | ||
while (iter != NULL) | ||
{ | ||
Package *req; | ||
@@ -471,6 +486,18 @@ main (int argc, char **argv) | ||
|
||
req = get_package (ver->name); | ||
|
||
+ if (log != NULL) | ||
+ { | ||
+ if (req == NULL) | ||
+ fprintf (log, "%s NOT-FOUND", ver->name); | ||
+ else | ||
+ fprintf (log, "%s %s %s", ver->name, | ||
+ comparison_to_str (ver->comparison), | ||
+ ver->version); | ||
+ | ||
+ fprintf (log, "\n"); | ||
+ } | ||
+ | ||
if (req == NULL) | ||
{ | ||
verbose_error ("No package '%s' found\n", ver->name); | ||
@@ -497,6 +524,11 @@ main (int argc, char **argv) | ||
|
||
iter = g_slist_next (iter); | ||
} | ||
+ | ||
+ if (log != NULL) | ||
+ { | ||
+ fclose (log); | ||
+ } | ||
} | ||
|
||
g_string_free (str, TRUE); |