Bug 59426

Summary: Upgrade to latest pkg-config
Product: [Retired] Red Hat Raw Hide Reporter: Enrico Scholz <rh-bugzilla>
Component: pkgconfigAssignee: Havoc Pennington <hp>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 1.0   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2002-03-01 15:08:50 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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.