Bug 426106 - pkg-config-0.21-requires-private-fix.patch breaks Requires.private Cflags
pkg-config-0.21-requires-private-fix.patch breaks Requires.private Cflags
Product: Fedora
Classification: Fedora
Component: redhat-rpm-config (Show other bugs)
All Linux
low Severity medium
: ---
: ---
Assigned To: Jon Masters
Fedora Extras Quality Assurance
: 436773 (view as bug list)
Depends On:
  Show dependency treegraph
Reported: 2007-12-18 11:46 EST by Dan Nicholson
Modified: 2009-07-14 11:37 EDT (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-07-14 11:37:03 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Extend --print-requires to process Requires.private, too (3.05 KB, patch)
2008-10-24 17:34 EDT, Dan Nicholson
no flags Details | Diff
Filter duplicates from Requires and Requires.private in find-requires (619 bytes, patch)
2008-10-24 17:36 EDT, Dan Nicholson
no flags Details | Diff

External Trackers
Tracker ID Priority Status Summary Last Updated
FreeDesktop.org 4738 None None None Never

  None (edit)
Description Dan Nicholson 2007-12-18 11:46:59 EST
This is a continuation of #224148. I noticed on the Xorg list that one of the
developers using F8 had broken behavior in pkg-config:


It seems that the pkg-config-0.21-requires-private-fix.patch breaks the behavior
that Cflags are always pulled from Requires.private. Here's a test case:

$ cat > dummy.pc << "EOF"
Name: dummy
Version: 0
Description: dummy
Requires.private: pixman-1
$ PKG_CONFIG_PATH=. pkg-config --cflags dummy

Using vanilla pkg-config-0.22, the result is -I/usr/include/pixman-1, but the
rawhide pkg-config prints nothing. This behavior is broken by the patch
mentioned above.

I believe what you want to achieve in the patch is not to have the Requires
fields processed when --exists is used. I've attached a patch to the fd.o bug
that (I believe) does the right thing for both cases.


Maybe you also need this behavior for the --print-requires and --print-provides
options, too. It should be trivial to add those cases to main.c if you look at
the patch.
Comment 1 Dan Nicholson 2007-12-18 12:28:32 EST
Oh, looking back at #224148, I see the problem that was addressing. If you don't
have the .pc file for something in Requires.private and you use --libs (without
--static), it shouldn't error. The patch I posted doesn't fix that issue, and I
can't see an easy way to fix it.

One possible workaround for fedora is to beef up the reqprov patch and
/usr/lib/rpm/pkgconfigdeps.sh so that it pulls the Requires and Requires.private
fields. The you'll just get all the necessary dependencies for shared or static
linking from rpm. This has been working well on my system, and I can attach
patches if you're interested.
Comment 2 Bug Zapper 2008-05-14 00:12:42 EDT
Changing version to '9' as part of upcoming Fedora 9 GA.
More information and reason for this action is here:
Comment 3 Dominik 'Rathann' Mierzejewski 2008-07-13 14:42:36 EDT
I just got bitten by this, too. This has already caused a false bugreport
upstream: http://bugs.freedesktop.org/show_bug.cgi?id=15199 . Please fix it.
Comment 4 Dan Nicholson 2008-10-24 17:34:23 EDT
Created attachment 321465 [details]
Extend --print-requires to process Requires.private, too

This makes --print-requires iterate over Requires.private in addition to Requires. This should allow rpm to add all dependencies from pkg-config needed for building against -devel packages. With this, I think the broken pkg-config-0.21-requires-private-fix.patch can be removed.

Matthias, looking back at bug 224148, it seems the major problem is that deps aren't consistent within yum/rpm. I didn't see a strong argument that the upstream Requires.private behavior is wrong. I believe this patch solves that problem and allows Requires.private to be used as upstream intended. Can you please take a look or CC someone who feels more strongly about this?

Comment 5 Dan Nicholson 2008-10-24 17:36:59 EDT
Created attachment 321466 [details]
Filter duplicates from Requires and Requires.private in find-requires

Since .pc files often have overlapping Requires and Requires.private, making --print-requires process Requires.private will result in duplicate rpm deps. Filter the duplicates in find-requires.pkgconfig.
Comment 6 Matthias Clasen 2008-12-08 12:48:23 EST
I've added the patch in comment #4 to pkg-config-0.23-6.fc11.

Moving this bug to rpm for the find-requires change.
Comment 7 Jindrich Novy 2008-12-09 03:38:58 EST
Reassigning to redhat-rpm-config.
Comment 8 Matthias Clasen 2009-01-16 21:34:48 EST
*** Bug 436773 has been marked as a duplicate of this bug. ***
Comment 9 Bug Zapper 2009-06-09 19:18:13 EDT
This message is a reminder that Fedora 9 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 9.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '9'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 9's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 9 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
Comment 10 Bug Zapper 2009-07-14 11:37:03 EDT
Fedora 9 changed to end-of-life (EOL) status on 2009-07-10. Fedora 9 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.

Note You need to log in before you can comment on or make changes to this bug.