Bug 191 - [PENDING] --list-all breaks off when Requires not met
Summary: [PENDING] --list-all breaks off when Requires not met
Alias: None
Product: pkg-config
Classification: Unclassified
Component: src (show other bugs)
Version: unspecified
Hardware: x86 (IA32) Linux (All)
: high normal
Assignee: Havoc Pennington
QA Contact:
URL: http://bugs.debian.org/232719
Depends on:
Reported: 2004-02-15 02:24 UTC by J.H.M. Dassen (Ray)
Modified: 2014-03-30 12:48 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:

Proposed patch (2.45 KB, patch)
2004-02-15 02:26 UTC, J.H.M. Dassen (Ray)
Details | Splinter Review

Description J.H.M. Dassen (Ray) 2004-02-15 02:24:45 UTC
[Originally filed as http://bugs.debian.org/232719]

From: Erik de Castro Lopo <erikd@mega-nerd.com>
Subject: pkg-config: --list-all option fails due to Requires field in some packages.
Date: Sun, 15 Feb 2004 10:50:59 +1100
Message-Id: <20040214235100.0DB5F8D76@coltrane.mega-nerd.net>

Package: pkg-config
Version: 0.15.0-3
Severity: important

Running the following command:

    erikd@coltrane > pkg-config --list-all
    gconfgtk                  gconfgtk - GTK+ bindings for GConf
    mad                       mad - MPEG Audio Decoder
    pango                     Pango - Internationalized text handling
    ogg                       ogg - ogg is a library for manipulating ogg bitstreams
    libpng10                  libpng10 - Loads and saves PNG files
    libpng                    libpng10 - Loads and saves PNG files
    glib-2.0                  GLib - C Utility Library
    libxml                    libXML - libXML library.
    pangoxft                  Pango Xft - Xft font support for Pango
    directfb                  DirectFB - graphics and windowing library on Linux
    fftw3                     FFTW - fast Fourier transform library
    libIDL                    libIDL - IDL parsing library
    gnome-mime-data-2.0       gnome-mime-data - Base set of file types and
applications for GNOME
    gdk-pixbuf-xlib-2.0       GdkPixbuf Xlib - GdkPixbuf rendering for Xlib
    fftw3f                    FFTW - fast Fourier transform library
    xft                       Xft - X FreeType library
    gtk+                      GTK+ - GIMP Tool Kit
    gobject-2.0               GObject - GLib Type, Object, Parameter and Signal
    Package libgnomeui-2.0 was not found in the pkg-config search path.
    Perhaps you should add the directory containing `libgnomeui-2.0.pc'
    to the PKG_CONFIG_PATH environment variable
    Package 'libgnomeui-2.0', required by 'gnome-window-settings-2.0', not found

While if I count the number of *.pc files in the appropriate place:

    erikd@coltrane > ls -l /usr/lib/pkgconfig/*.pc | wc -l

I get far more files than the above command listed. This seems to be caused by
a "Requires:" directive in gnome-window-settings-2.0.pc.

I believe that the "Requires:" directive should be ignored when all I want
to do is list all the packages which have *.pc files.
Comment 1 J.H.M. Dassen (Ray) 2004-02-15 02:26:19 UTC
Date: Sun, 15 Feb 2004 12:50:13 +1100
From: Erik de Castro Lopo <erikd@mega-nerd.com>

Subject: Patch to fix list-all problem
Message-Id: <20040215125013.6ba7d4dd.erikd@mega-nerd.com>

Please find enclosed two patches.

The first fixes a couple of compiler warnings, the second fixes
the above listed bug. The second one might not be the neatest 
solution, but it seems to work here.

[The first one is bugzilla #190]
Comment 2 J.H.M. Dassen (Ray) 2004-02-15 02:26:53 UTC
Created attachment 93 [details] [review]
Proposed patch
Comment 3 Tollef Fog Heen 2005-03-22 01:19:05 UTC
Fixed in CVS

2005-03-18  Tollef Fog Heen  <tfheen@debian.org>

       * pkg.c (print_package_list): Ignore requires when just listing
       the available packages.
       (internal_get_package): Pass ignore_requires on.

       * parse.h: update prototype for parse_package_file.

       * parse.c (parse_line): Ignore Requires when told so.
       (parse_package_file): Pass ingore_requires on to parse_line.

       (Freedesktop #191, Debian #232719)
Comment 4 Tollef Fog Heen 2005-03-28 08:03:41 UTC
pkgconfig 0.16 has been released and contains a fix for this bug.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.