Upcoming 0.24

Dan Nicholson dbn.lists at gmail.com
Sun May 9 11:42:12 PDT 2010


On Sun, May 09, 2010 at 12:00:03PM +0200, Johannes Schmid wrote:
> Hi!
> 
> I updated the patch to actually work and in addition avoid the
> duplicates.
> 
> Regards,
> Johannes
> 
> Am Sonntag, den 09.05.2010, 10:16 +0200 schrieb Tollef Fog Heen:
> > ]] Johannes Schmid 
> > 
> > | And the recently discussed --print-requires/--print-provides would be
> > | great, too (
> > | http://cvs.fedoraproject.org/viewvc/rpms/pkgconfig/devel/pkgconfig-0.15.0-reqprov.patch?view=markup)
> > 
> > The patch in Fedora CVS seems to not enable requires or
> > requires.private, making --print-requires useless.  Is this intentional?
> > :-)  After fixing this, it still seems to print duplicates:
> > 
> > > PKG_CONFIG_LIBDIR=`pwd`/check ./pkg-config --errors-to-stdout --print-errors --print-requires requires-test                        
> > public-dep
> > private-dep
> > public-dep
> > 
> > If people are going to rely on this output, I'd somewhat want it to be
> > --print-requires that just prints Requires and --print-requires-private
> > that prints the private variant.  Input appreciated on this, as I'm not
> > the one who'll be consuming the information.
> > 
> > Also, if I could have some documentation for the feature, that'd be
> > appreciated.
> > 
> 

> From 288a360b38e15a2398dd9b016993e32f612580b7 Mon Sep 17 00:00:00 2001
> From: Johannes Schmid <jhs at gnome.org>
> Date: Sun, 9 May 2010 11:54:49 +0200
> Subject: [PATCH] Add --print-requires and --print-provides options
> 
> --print-requires: Print all the packages (including private packages) that this packages
> requires
> 
> --print-provides: Print all packages this package provides
> ---
>  main.c |   69 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
>  1 files changed, 67 insertions(+), 2 deletions(-)
> 
> diff --git a/main.c b/main.c
> index a144d27..db98bea 100644
> --- a/main.c
> +++ b/main.c
> @@ -189,6 +189,8 @@ main (int argc, char **argv)
>    static int want_uninstalled = 0;
>    static char *variable_name = NULL;
>    static int want_exists = 0;
> +  static int want_prov = 0;
> +  static int want_req = 0;
>    static char *required_atleast_version = NULL;
>    static char *required_exact_version = NULL;
>    static char *required_max_version = NULL;
> @@ -264,6 +266,10 @@ main (int argc, char **argv)
>        "given on the command line)" },
>      { "errors-to-stdout", 0, POPT_ARG_NONE, &want_stdout_errors, 0,
>        "print errors from --print-errors to stdout not stderr" },
> +    { "print-provides", 0, POPT_ARG_NONE, &want_prov, 0,
> +      "print which packages the package provides" },
> +    { "print-requires", 0, POPT_ARG_NONE, &want_req, 0,
> +      "print which packages the package requires" },
>  #ifdef G_OS_WIN32
>      { "dont-define-prefix", 0, POPT_ARG_NONE, &dont_define_prefix, 0,
>        "don't try to override the value of prefix for each .pc file found with "
> @@ -391,13 +397,13 @@ main (int argc, char **argv)
>     * libs are requested */
>  
>    if (want_I_cflags || want_other_cflags || want_cflags ||
> -      (want_static_lib_list && (want_libs || want_l_libs || want_L_libs)))
> +      (want_static_lib_list && (want_libs || want_l_libs || want_L_libs || want_req)))
>      enable_requires_private();
>  
>    /* ignore Requires if no Cflags or Libs are requested */
>  
>    if (!want_I_cflags && !want_other_cflags && !want_cflags &&
> -      !want_libs && !want_l_libs && !want_L_libs)
> +      !want_libs && !want_l_libs && !want_L_libs && !want_req)
>      disable_requires();
>  
>    if (want_my_version)
> @@ -583,6 +589,65 @@ main (int argc, char **argv)
>          }
>      }
>  
> + if (want_prov)
> +   {

Not your fault, but could you fix the indentation for this patch? There
should be two spaces for the first indent to match the rest of the file.
Also, could you squash the second patch in?

Seems good to me otherwise, though Tollef's question about whether
--print-requires-private is still open. The other way would be to handle
it with --static.

--
Dan


More information about the pkg-config mailing list