Skip to contentSkip to conversation

pkgconfig.bbclass: don't blindly install every .pc file

PATCH In review Andreas Oberritter 1 participant 3 messages Oct 25, 2010 – Nov 16, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pkgconfig.bbclass: don't blindly install every .pc file

* Instead of installing the file, print a log message. Later, this function could be removed.
* .pc files must be installed explicitly to avoid causing build problems. E.g. libsoup-2.4-gnome.pc must not be installed if libsoup-2.4 is built without gnome support, because gstreamer would try to link against libsoup-2.4-gnome.
* Fixes for lua5.1 and libid3tag, which install their own .pc files from OE, have been submitted.

---
 classes/pkgconfig.bbclass |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
classes/pkgconfig.bbclass +3 -1
index 23ab453..d96b708 100644
@@ -16,6 +16,8 @@ pkgconfig_sysroot_preprocess () {
 	install -d ${SYSROOT_DESTDIR}${PKG_CONFIG_DIR}
 	for pc in `find ${S} -name '*.pc' -type f | grep -v -- '-uninstalled.pc$'`; do
 		pcname=`basename $pc`
-		cat $pc > ${SYSROOT_DESTDIR}${PKG_CONFIG_DIR}/$pcname
+		if [ ! -f ${SYSROOT_DESTDIR}${PKG_CONFIG_DIR}/$pcname ]; then
+			oenote "$pcname was not installed."
+		fi
 	done
 }
Signature · 1 line
1.7.1
#1 lore raw

Ping

Quoted 28 lines · Andreas Oberritter

* Instead of installing the file, print a log message. Later, this function could be removed.
* .pc files must be installed explicitly to avoid causing build problems. E.g. libsoup-2.4-gnome.pc must not be installed if libsoup-2.4 is built without gnome support, because gstreamer would try to link against libsoup-2.4-gnome.
* Fixes for lua5.1 and libid3tag, which install their own .pc files from OE, have been submitted.

---
 classes/pkgconfig.bbclass |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
classes/pkgconfig.bbclass +3 -1
index 23ab453..d96b708 100644
@@ -16,6 +16,8 @@ pkgconfig_sysroot_preprocess () {
 	install -d ${SYSROOT_DESTDIR}${PKG_CONFIG_DIR}
 	for pc in `find ${S} -name '*.pc' -type f | grep -v -- '-uninstalled.pc$'`; do
 		pcname=`basename $pc`
-		cat $pc > ${SYSROOT_DESTDIR}${PKG_CONFIG_DIR}/$pcname
+		if [ ! -f ${SYSROOT_DESTDIR}${PKG_CONFIG_DIR}/$pcname ]; then
+			oenote "$pcname was not installed."
+		fi
 	done
 }
#2 lore raw

I think I need to draw some more attention to this patch, because the current way of installing all .pc files from a source tree to sysroot causes build breakage.

I'd really prefer this being merged now, so it will make it into the planned december release. Potential problems caused by the patch can still be fixed before release, which means adding an install rule where packages don't install their .pc files themselves.

Any opinions?

Regards,
Andreas

Quoted 37 lines · Andreas Oberritter

Ping

Quoted 19 lines · Andreas Oberritter

* Instead of installing the file, print a log message. Later, this function could be removed.
* .pc files must be installed explicitly to avoid causing build problems. E.g. libsoup-2.4-gnome.pc must not be installed if libsoup-2.4 is built without gnome support, because gstreamer would try to link against libsoup-2.4-gnome.
* Fixes for lua5.1 and libid3tag, which install their own .pc files from OE, have been submitted.

---
 classes/pkgconfig.bbclass |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
classes/pkgconfig.bbclass +0 -0
index 23ab453..d96b708 100644

classes/pkgconfig.bbclass pkgconfig_sysroot_preprocess () { · line 23

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

_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel