Skip to contentSkip to conversation

pkgconfig.bbclass: search configs in D instead of S

PATCH In review Stanislav Brabec 2 participants 3 messages Apr 16, 2011 – Apr 20, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 2/5 pkgconfig.bbclass: search configs in D instead of S

Searching for .pc files in S makes more problems than it brings benefits. Searching in the installed root seems to be more logical.

Fixes possible subtle breakages:
- .pc files populated with a different name that upstream intended
- populated .pc files files that were not intended to be populated

classes/pkgconfig.bbclass +1 -1
index d96b708..00298ca 100644
@@ -14,7 +14,7 @@ SYSROOT_PREPROCESS_FUNCS += "pkgconfig_sysroot_preprocess"
 
 pkgconfig_sysroot_preprocess () {
 	install -d ${SYSROOT_DESTDIR}${PKG_CONFIG_DIR}
-	for pc in `find ${S} -name '*.pc' -type f | grep -v -- '-uninstalled.pc$'`; do
+	for pc in `find ${D} -name '*.pc' -type f`; do
 		pcname=`basename $pc`
 		if [ ! -f ${SYSROOT_DESTDIR}${PKG_CONFIG_DIR}/$pcname ]; then
 			oenote "$pcname was not installed."
Signature · 3 lines
________________________________________________________________________
Stanislav Brabec
http://www.penguin.cz/~utx/zaurus
#1 lore raw
Quoted 7 lines · Stanislav Brabec

Searching for .pc files in S makes more problems than it brings benefits. Searching in the installed root seems to be more logical.

Fixes possible subtle breakages:
- .pc files populated with a different name that upstream intended
- populated .pc files files that were not intended to be populated

This has already been fixed with commit
c2c8fe4c5629add94bd0b922f5b3446624a9f4d8.

Quoted 8 lines
classes/pkgconfig.bbclass +0 -0
index d96b708..00298ca 100644

classes/pkgconfig.bbclass SYSROOT_PREPROCESS_FUNCS += "pkgconfig_sysroot_preprocess" · line 20

Quoted 8 lines
classes/pkgconfig.bbclass +1 -1
@@ -14,7 +14,7 @@ SYSROOT_PREPROCESS_FUNCS += "pkgconfig_sysroot_preprocess"
 
 pkgconfig_sysroot_preprocess () {
 	install -d ${SYSROOT_DESTDIR}${PKG_CONFIG_DIR}
-	for pc in `find ${S} -name '*.pc' -type f | grep -v -- '-uninstalled.pc$'`; do
+	for pc in `find ${D} -name '*.pc' -type f`; do
 		pcname=`basename $pc`
 		if [ ! -f ${SYSROOT_DESTDIR}${PKG_CONFIG_DIR}/$pcname ]; then
 			oenote "$pcname was not installed."

This function just prints a warning, if it finds a .pc file that didn't get installed. Using ${D} at this point makes this function a no-op.

It might be better to just remove it completely.

Regards,
Andreas

#2 lore raw
Quoted 18 lines · Andreas Oberritter
Quoted 6 lines
classes/pkgconfig.bbclass +0 -0
index d96b708..00298ca 100644

classes/pkgconfig.bbclass SYSROOT_PREPROCESS_FUNCS += "pkgconfig_sysroot_preprocess" · line 20

Quoted 8 lines
classes/pkgconfig.bbclass +1 -1
@@ -14,7 +14,7 @@ SYSROOT_PREPROCESS_FUNCS += "pkgconfig_sysroot_preprocess"
 
 pkgconfig_sysroot_preprocess () {
 	install -d ${SYSROOT_DESTDIR}${PKG_CONFIG_DIR}
-	for pc in `find ${S} -name '*.pc' -type f | grep -v -- '-uninstalled.pc$'`; do
+	for pc in `find ${D} -name '*.pc' -type f`; do
 		pcname=`basename $pc`
 		if [ ! -f ${SYSROOT_DESTDIR}${PKG_CONFIG_DIR}/$pcname ]; then
 			oenote "$pcname was not installed."

This function just prints a warning, if it finds a .pc file that didn't get installed. Using ${D} at this point makes this function a no-op.

Quoted 1 line

It might be better to just remove it completely.

Good hint. So I'll not submit this patch. Your commit c2c8fe4 already did the right fix here.

Signature · 2 lines
Stanislav Brabec
http://www.penguin.cz/~utx/zaurus