Bug 59426 - Upgrade to latest pkg-config
Summary: Upgrade to latest pkg-config
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Raw Hide
Classification: Retired
Component: pkgconfig
Version: 1.0
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Havoc Pennington
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-02-07 18:40 UTC by Enrico Scholz
Modified: 2008-05-01 15:38 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2002-03-01 15:08:50 UTC
Embargoed:


Attachments (Terms of Use)

Description Enrico Scholz 2002-02-07 18:40:11 UTC
Description of Problem:

When having a PKG_CONFIG_PATH ending with a '/', the character before will be
stripped also:

| $ PKG_CONFIG_PATH='bar/' strace -eopen pkg-config foo
| ...
| open("ba", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = -1 ENOENT (No such
file or directory)


scan_dir() in pkg.c seems to be responsible:

| if (dirnamelen > 1 && dirname[dirnamelen-1] == G_DIR_SEPARATOR)
|   {
|      dirnamelen--;
|      dirname_copy[dirnamelen-1] = '\0';
|   }

Since decrementing happened already, the '[dirnamelen-1]' should be replaced by
a simple '[dirnamelen]'.

I could not find another bugreport-address, so please forward this report to
upstream!


Version-Release number of selected component (if applicable):

pkgconfig-0.9.0-2

Comment 1 Havoc Pennington 2002-02-12 21:31:35 UTC
Fixed in CVS pkg-config, will be in Red Hat when we upgrade to pkg-config 0.12:

2002-02-12  Havoc Pennington  <hp>

	* pkg.c (scan_dir): use g_strdup, and fix the location where 
	we assign the nul byte, so we don't mangle things for directories
	that end in '/' - reported by Enrico Scholz


Comment 2 Havoc Pennington 2002-03-08 16:28:28 UTC
Upgraded.


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