Bug 9430

Summary: 'mad pkg-config' doesn't recognize comma separated values
Product: [Maemo Official Platform] Development platform Reporter: Lukasz Skomial <maemobugs>
Component: MaddeAssignee: unassigned <nobody>
Status: RESOLVED FIXED QA Contact: sdk-madde-bugs
Severity: normal    
Priority: Unspecified CC: tomi.ollila
Version: 5.0-final   
Target Milestone: 5.0-update4   
Hardware: All   
OS: Windows   

Description Lukasz Skomial (reporter) 2010-03-06 21:30:14 UTC
SOFTWARE VERSION: 0.6.14
(Settings > General > About product)

EXACT STEPS LEADING TO PROBLEM: 
(Explain in detail what you do (e.g. tap on OK) and what you see (e.g. message
Connection Failed appears))
1. Start MADDE terminal
2. type 'mad pkg-config dbus-1, hildon-1'

EXPECTED OUTCOME:
-I/usr/include/...
ACTUAL OUTCOME:
Package hildon-1, was not found in the pkg-config search path.
No package 'hildon-1,' found

REPRODUCIBILITY: always
(always, less than 1/10, 5/10, 9/10)

EXTRA SOFTWARE INSTALLED:

OTHER COMMENTS:
works on linux scratchbox. Projects which got compiled previously on linux
cause problems in madde terminal.

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US)
AppleWebKit/533.2 (KHTML, like Gecko) Chrome/5.0.342.2 Safari/533.2
Comment 1 Tomi Ollila 2010-03-09 08:32:42 UTC
diff --git a/src/madlib/pkg-config b/src/madlib/pkg-config
index 7d62395..83dfc44 100755
--- a/src/madlib/pkg-config
+++ b/src/madlib/pkg-config
@@ -66,7 +66,7 @@ foreach (@ARGV)
 {
     handle_optval($1, $2), next if /^--(.*?)=(.*)/;
     handle_opt($1), next if /^--(.*)/;
-    push @modules, $_;
+    s/^,+//; push @modules, split ','; # split also at ','.
 }

 exit 1 unless Madde::PkgConfig::search @modules;

Unfortunately  push @modules, split ','; was not enough, did not
handle case mad pkg-config dbus-1 ,hildon-1

Fix will be available in next release.
Comment 2 Tomi Ollila 2010-04-26 12:37:33 UTC
Fixed in 

git clone git://gitorious.org/meego-developer-tools/madde.git