Miscellaneous fixes: mainly qt- and DISTRO_FEATURES-related
cover Miscellaneous fixes: mainly qt- and DISTRO_FEATURES-related
A series with some miscellaneous fixes/changes.
Patches:
0001: make it possible to build qt4 while disabling certain parts of it. 0002: A partial sync of qmake_base.bbclass from meta-oe. Hopefully we should
be able to delete qmake_base.bbclass from meta-oe after this sync.
0003-4: respect wifi and bluetooth in DISTRO_FEATURES while building connman
and ofono.
0005: increase the likelihood that a rename and modification is detected,
instead of a deleta/add-pair.
Patch 0005 is the patch that is most likely to be controversial. The other patches should be of minor impact, and result in a more consistent build environment (i.e. better respect for DISTRO_FEATURES).
The following changes since commit 13db5f420ca9bff98561f80d78958278734ad1f4:
distro-tracking: Update info for gpgme, libassuan, apr... after last upgrade. (2011-08-15 15:26:04 +0100)
are available in the git repository at:
git://github.com/darander/oe-core qt4-fixes
https://github.com/darander/oe-core/tree/qt4-fixes
Anders Darander (5):
qt4: allow a reduction in build time
qmake_base: add uclibceabi
connman: use DISTRO_FEATURES to enable wifi and bluetooth
ofono: conditionally enable bluetooth
create-pull-request: increase likelihood of detecting a rename
meta/classes/qmake_base.bbclass | 2 +- meta/recipes-connectivity/connman/connman_0.75.bb | 4 ++-- meta/recipes-connectivity/ofono/ofono.inc | 3 ++- meta/recipes-connectivity/ofono/ofono_0.50.bb | 1 + meta/recipes-connectivity/ofono/ofono_git.bb | 4 ++++ meta/recipes-qt/qt4/qt4.inc | 13 ++++++++----- scripts/create-pull-request | 2 +- 7 files changed, 19 insertions(+), 10 deletions(-)
Signature · 1 line
1.7.5.4
PATCH 1/5 qt4: allow a reduction in build time
When reducing build time by adding QT_DISTRO_FLAGS from the set '-no-gui -nomake tools -nomake examples -nomake demos -nomake docs', build failure can occur, due to not building all tools.
* Make rm not error out when removing one of the, possibly, non-existing tools.
* Only try to rename qtdemo, if qtdemo exists.
* Guard do_split_packages() with an try-except-clause, otherwise we get an error stating that .../phrasebooks/... do not exist.
--- meta/recipes-qt/qt4/qt4.inc | 13 ++++++++----- 1 files changed, 8 insertions(+), 5 deletions(-)
meta/recipes-qt/qt4/qt4.inc +8 -5
@@ -227,7 +227,10 @@ python populate_packages_prepend() { phrasebook_dir = bb.data.expand('${datadir}/${QT_DIR_NAME}/phrasebooks/', d) phrasebook_name = bb.data.expand('${QT_BASE_NAME}-phrasebook-%s', d) - do_split_packages(d, phrasebook_dir, '^(.*)\.qph$', phrasebook_name, '${PN} phrasebook for %s', extra_depends='' ) + try: + do_split_packages(d, phrasebook_dir, '^(.*)\.qph$', phrasebook_name, '${PN} phrasebook for %s', extra_depends='' ) + except: + pass # Package all the plugins and their -dbg version and create a meta package import os
@@ -278,11 +281,11 @@ do_install() { # These are host binaries, we should only use them in staging rm ${D}/${bindir}/qmake - rm ${D}/${bindir}/uic - rm ${D}/${bindir}/uic3 + rm -f ${D}/${bindir}/uic + rm -f ${D}/${bindir}/uic3 rm ${D}/${bindir}/moc rm ${D}/${bindir}/rcc - rm ${D}/${bindir}/lrelease + rm -f ${D}/${bindir}/lrelease # fix pkgconfig, libtool and prl files sed -i -e s#-L${S}/lib##g \
@@ -319,6 +322,6 @@ do_install() { #Append an E to the qtdemo file if [ -n "${QT_LIBINFIX}" ] ; then - mv ${D}${bindir}/qtdemo ${D}${bindir}/qtdemo${QT_LIBINFIX} + [ -f ${D}${bindir}/qtdemo ] && mv ${D}${bindir}/qtdemo ${D}${bindir}/qtdemo${QT_LIBINFIX} fi }
Signature · 1 line
1.7.5.4
Re: [PATCH 1/5] qt4: allow a reduction in build time
Quoted 53 lines · On Tuesday 16 August 2011 14:57:48 Anders Darander wrote:
When reducing build time by adding
QT_DISTRO_FLAGSfrom the set '-no-gui -nomake tools -nomake examples -nomake demos -nomake docs', build failure can occur, due to not building all tools.* Make rm not error out when removing one of the, possibly, non-existing tools. * Only try to rename qtdemo, if qtdemo exists.
* Guarddo_split_packages()with an try-except-clause, otherwise we get an error stating that .../phrasebooks/... do not exist.Signed-off-by Anders Darander <[email protected]>--- meta/recipes-qt/qt4/qt4.inc | 13 ++++++++----- 1 files changed, 8 insertions(+), 5 deletions(-)meta/recipes-qt/qt4/qt4.inc +0
-0@@ -227,7 +227,10 @@ python populate_packages_prepend() { phrasebook_dir = bb.data.expand('${datadir}/${QT_DIR_NAME}/phrasebooks/', d)
phrasebook_name=bb.data.expand('${QT_BASE_NAME}-phrasebook-%s', d)-
do_split_packages(d,phrasebook_dir, '^(.*)\.qph$',phrasebook_name,
'${PN} phrasebook for %s', extra_depends='' ) + try:
+ do_split_packages(d,phrasebook_dir, '^(.*)\.qph$',phrasebook_name, '${PN} phrasebook for %s', extra_depends='' ) + except:
+ pass# Package all the plugins and their -dbg version and create a meta
package import osmeta/recipes-qt/qt4/qt4.inc +4
-4@@ -278,11 +281,11 @@ do_install() { # These are host binaries, we should only use them in staging rm ${D}/${bindir}/qmake - rm ${D}/${bindir}/uic - rm ${D}/${bindir}/uic3 + rm -f ${D}/${bindir}/uic + rm -f ${D}/${bindir}/uic3 rm ${D}/${bindir}/moc rm ${D}/${bindir}/rcc - rm ${D}/${bindir}/lrelease + rm -f ${D}/${bindir}/lrelease # fix pkgconfig, libtool and prl files sed -i -e s#-L${S}/lib##g \@@ -319,6 +322,6 @@ do_install() { #Append an E to the qtdemo file if [ -n "${QT_LIBINFIX}" ] ; then - mv ${D}${bindir}/qtdemo ${D}${bindir}/qtdemo${QT_LIBINFIX} + [ -f ${D}${bindir}/qtdemo ] && mv ${D}${bindir}/qtdemo
Quoted 2 lines
${D}${bindir}/qtdemo${QT_LIBINFIX} fi
}
Cheers,
Paul
Signature · 2 lines
Paul Eggleton Intel Open Source Technology Centre
Re: [PATCH 1/5] qt4: allow a reduction in build time
In reply to Anders DaranderQuoted 19 lines · Anders Darander
When reducing build time by adding
QT_DISTRO_FLAGSfrom the set '-no-gui -nomake tools -nomake examples -nomake demos -nomake docs', build failure can occur, due to not building all tools.* Make rm not error out when removing one of the, possibly, non-existing tools.
* Only try to rename qtdemo, if qtdemo exists.
* Guarddo_split_packages()with an try-except-clause, otherwise we get an error stating that .../phrasebooks/... do not exist.Signed-off-by Anders Darander <[email protected]>--- meta/recipes-qt/qt4/qt4.inc | 13 ++++++++----- 1 files changed, 8 insertions(+), 5 deletions(-)meta/recipes-qt/qt4/qt4.inc +0
-0
meta/recipes-qt/qt4/qt4.inc python populate_packages_prepend() { · line 233
Quoted 8 lines
meta/recipes-qt/qt4/qt4.inc +4
-1@@ -227,7 +227,10 @@ python populate_packages_prepend() { phrasebook_dir = bb.data.expand('${datadir}/${QT_DIR_NAME}/phrasebooks/', d) phrasebook_name = bb.data.expand('${QT_BASE_NAME}-phrasebook-%s', d) - do_split_packages(d, phrasebook_dir, '^(.*)\.qph$', phrasebook_name, '${PN} phrasebook for %s', extra_depends='' ) + try: + do_split_packages(d, phrasebook_dir, '^(.*)\.qph$', phrasebook_name, '${PN} phrasebook for %s', extra_depends='' ) + except: + pass
Please use some actual test here, not a general try/except/pass. This reason is that is some failure we want to know about happens, this will hide it as the code stands.
The rest of the patch is ok, this just needs tweaking.
Cheers,
Richard
Re: [PATCH 1/5] qt4: allow a reduction in build time
Quoted 21 lines · Richard Purdie
Quoted 20 lines · Anders Darander
When reducing build time by adding
QT_DISTRO_FLAGSfrom the set '-no-gui -nomake tools -nomake examples -nomake demos -nomake docs', build failure can occur, due to not building all tools.* Make rm not error out when removing one of the, possibly, non-existing tools.
* Only try to rename qtdemo, if qtdemo exists.
* Guarddo_split_packages()with an try-except-clause, otherwise we get an error stating that .../phrasebooks/... do not exist.Signed-off-by Anders Darander <[email protected]>--- meta/recipes-qt/qt4/qt4.inc | 13 ++++++++----- 1 files changed, 8 insertions(+), 5 deletions(-)meta/recipes-qt/qt4/qt4.inc +0
-0@@ -227,7 +227,10 @@ python populate_packages_prepend() {
Quoted 11 lines
meta/recipes-qt/qt4/qt4.inc python populate_packages_prepend() { · line 233
Quoted 7 lines
meta/recipes-qt/qt4/qt4.inc +4
-1phrasebook_dir = bb.data.expand('${datadir}/${QT_DIR_NAME}/phrasebooks/', d) phrasebook_name = bb.data.expand('${QT_BASE_NAME}-phrasebook-%s', d) - do_split_packages(d, phrasebook_dir, '^(.*)\.qph$', phrasebook_name, '${PN} phrasebook for %s', extra_depends='' ) + try: + do_split_packages(d, phrasebook_dir, '^(.*)\.qph$', phrasebook_name, '${PN} phrasebook for %s', extra_depends='' ) + except: + passPlease use some actual test here, not a general try/except/pass. This reason is that is some failure we want to know about happens, this will hide it as the code stands.
Yes, that's right. Initially I had a plan to get some ideas on how to tackle this, but I think I've got a good test outlined. Hopefully I can implement and test it tonight, otherwise I'll do it tomorrow.
Cheers,
Anders
Signature · 2 lines
Anders Darander ChargeStorm AB
Re: [PATCH 1/5] qt4: allow a reduction in build time
In reply to Richard PurdieQuoted 9 lines · Richard Purdie
meta/recipes-qt/qt4/qt4.inc python populate_packages_prepend() { · line 233
Quoted 7 lines · Anders Darander
phrasebook_dir = bb.data.expand('${datadir}/${QT_DIR_NAME}/phrasebooks/', d) phrasebook_name = bb.data.expand('${QT_BASE_NAME}-phrasebook-%s', d)meta/recipes-qt/qt4/qt4.inc +4
-1- do_split_packages(d, phrasebook_dir, '^(.*)\.qph$', phrasebook_name, '${PN} phrasebook for %s', extra_depends='' ) + try: + do_split_packages(d, phrasebook_dir, '^(.*)\.qph$', phrasebook_name, '${PN} phrasebook for %s', extra_depends='' ) + except: + pass
Quoted 5 lines
Please use some actual test here, not a general try/except/pass. This reason is that is some failure we want to know about happens, this will hide it as the code stands.
The rest of the patch is ok, this just needs tweaking.
An updated patch is available at the same pull tree. I've also sent a new pull request titled: [PATCH v3 0/1] Qt4: reduce build time.
In this updated version, I'll check if the path in phrasebook_dir exists, and depending on this outcome, I'll call do_split_packages.
Cheers,
Anders
Signature · 2 lines
Anders Darander ChargeStorm AB
PATCH 2/5 qmake_base: add uclibceabi
In reply to Anders DaranderPartial sync of qmake_base from meta-oe.
* Add a matching rule for *linux-uclibceabi-oe-g++, to make qmake_base.bbclase more similar to the version in meta-oe.
--- meta/classes/qmake_base.bbclass | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
meta/classes/qmake_base.bbclass +1 -1
@@ -47,7 +47,7 @@ addtask generate_qt_config_file after do_patch before do_configure qmake_base_do_configure() { case ${QMAKESPEC} in - *linux-oe-g++|*linux-uclibc-oe-g++|*linux-gnueabi-oe-g++) + *linux-oe-g++|*linux-uclibc-oe-g++|*linux-gnueabi-oe-g++|*linux-uclibceabi-oe-g++) ;; *-oe-g++) die Unsupported target ${TARGET_OS} for oe-g++ qmake spec
Signature · 1 line
1.7.5.4
PATCH 3/5 connman: use DISTRO_FEATURES to enable wifi and bluetooth
In reply to Anders DaranderAs wifi and bluetooth is set in DISTRO_FEATURES, connman should respect this during configuring.
--- meta/recipes-connectivity/connman/connman_0.75.bb | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
meta/recipes-connectivity/connman/connman_0.75.bb +2 -2
@@ -8,8 +8,8 @@ EXTRA_OECONF += "\ --enable-threads \ --enable-loopback \ --enable-ethernet \ - --enable-wifi \ - --enable-bluetooth \ + ${@base_contains('DISTRO_FEATURES', 'wifi','--enable-wifi', '--disable-wifi', d)} \ + ${@base_contains('DISTRO_FEATURES', 'bluetooth','--enable-bluetooth', '--disable-bluetooth', d)} \ --enable-dnsproxy \ --disable-dhclient \ --enable-test \
Signature · 1 line
1.7.5.4
PATCH 4/5 ofono: conditionally enable bluetooth
In reply to Anders DaranderUse DISTRO_FEATURE to conditionally depend on bluez4, as well as enabling bluetooth.
--- meta/recipes-connectivity/ofono/ofono.inc | 3 ++- meta/recipes-connectivity/ofono/ofono_0.50.bb | 1 + meta/recipes-connectivity/ofono/ofono_git.bb | 4 ++++ 3 files changed, 7 insertions(+), 1 deletions(-)
meta/recipes-connectivity/ofono/ofono.inc +2 -1
@@ -7,7 +7,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a \ inherit autotools pkgconfig update-rc.d -DEPENDS = "dbus glib-2.0 udev bluez4" +BLUEZDEPENDS = "bluez4" +DEPENDS = "dbus glib-2.0 udev ${@base_contains('DISTRO_FEATURES', 'bluetooth','${BLUEZDEPENDS}', '', d)}" INITSCRIPT_NAME = "ofono" INITSCRIPT_PARAMS = "defaults 22"
meta/recipes-connectivity/ofono/ofono_0.50.bb +1 -0
@@ -7,6 +7,7 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/network/ofono/${BPN}-${PV}.tar.bz2 \ EXTRA_OECONF += "\ --enable-test \ + ${@base_contains('DISTRO_FEATURES', 'bluetooth','--enable-bluetooth', '--disable-bluetooth', d)} \ " SRC_URI[md5sum] = "b2656fd0bbf33f926fc86c1e8915d697"
meta/recipes-connectivity/ofono/ofono_git.bb +4 -0
@@ -10,6 +10,10 @@ PR = "r1" SRC_URI = "git://git.kernel.org/pub/scm/network/ofono/ofono.git;protocol=git \ file://ofono" +EXTRA_OECONF += "\ + ${@base_contains('DISTRO_FEATURES', 'bluetooth','--enable-bluetooth', '--disable-bluetooth', d)} \ +" + do_configure_prepend () { ${S}/bootstrap }
Signature · 1 line
1.7.5.4
Re: [PATCH 4/5] ofono: conditionally enable bluetooth
Op 16 aug. 2011, om 15:57 heeft Anders Darander het volgende geschreven:
Quoted 17 lines
Use
DISTRO_FEATUREto conditionally depend on bluez4, as well as enabling bluetooth.Signed-off-by Anders Darander <[email protected]>---
meta/recipes-connectivity/ofono/ofono.inc | 3 ++- meta/recipes-connectivity/ofono/ofono_0.50.bb | 1 + meta/recipes-connectivity/ofono/ofono_git.bb | 4 ++++ 3 files changed, 7 insertions(+), 1 deletions(-)meta/recipes-connectivity/ofono/ofono.inc +0
-0@@ -7,7 +7,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a \inherit autotools pkgconfig update-rc.d
meta/recipes-connectivity/ofono/ofono.inc LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a \ · line 11
Quoted 3 lines
meta/recipes-connectivity/ofono/ofono.inc +2
-1-DEPENDS = "dbus glib-2.0 udev bluez4" +BLUEZDEPENDS = "bluez4" +DEPENDS = "dbus glib-2.0 udev ${@base_contains('DISTRO_FEATURES', 'bluetooth','${BLUEZDEPENDS}', '', d)}"
is that BLUEZDEPENDS helper var really needed?
Re: [PATCH 4/5] ofono: conditionally enable bluetooth
Quoted 17 lines · Koen Kooi
Op 16 aug. 2011, om 15:57 heeft Anders Darander het volgende geschreven:
Quoted 15 lines
Use
DISTRO_FEATUREto conditionally depend on bluez4, as well as enabling bluetooth.Signed-off-by Anders Darander <[email protected]>---
meta/recipes-connectivity/ofono/ofono.inc | 3 ++- meta/recipes-connectivity/ofono/ofono_0.50.bb | 1 + meta/recipes-connectivity/ofono/ofono_git.bb | 4 ++++ 3 files changed, 7 insertions(+), 1 deletions(-)meta/recipes-connectivity/ofono/ofono.inc +0
-0@@ -7,7 +7,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a \
Quoted 7 lines
meta/recipes-connectivity/ofono/ofono.inc LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a \ · line 11
Quoted 5 lines
inherit autotools pkgconfig update-rc.d
meta/recipes-connectivity/ofono/ofono.inc +2
-1-DEPENDS = "dbus glib-2.0 udev bluez4" +BLUEZDEPENDS = "bluez4" +DEPENDS = "dbus glib-2.0 udev ${@base_contains('DISTRO_FEATURES', 'bluetooth','${BLUEZDEPENDS}', '', d)}"is that BLUEZDEPENDS helper var really needed?
I'll rework this patch and send an updated pull-request shortly.
Cheers,
Anders
Signature · 2 lines
Anders Darander ChargeStorm AB
PATCH 5/5 create-pull-request: increase likelihood of detecting a rename
In reply to Anders DaranderDecrease the similarity percentage needed to recognize a delete/add-pair followed by an edit, as a rename.
This make reviewing patches easier.
--- scripts/create-pull-request | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
scripts/create-pull-request +1 -1
@@ -166,7 +166,7 @@ mkdir $ODIR # Generate the patches and cover letter -git format-patch -M --subject-prefix="$PREFIX" -n -o $ODIR --thread=shallow --cover-letter $RELATIVE_TO..$COMMIT_ID > /dev/null +git format-patch -M40 --subject-prefix="$PREFIX" -n -o $ODIR --thread=shallow --cover-letter $RELATIVE_TO..$COMMIT_ID > /dev/null # Customize the cover letter
Signature · 1 line
1.7.5.4
Saul Wold
AppliedQuoted 18 lines · Anders Darander
A series with some miscellaneous fixes/changes.
Patches:
0001: make it possible to build qt4 while disabling certain parts of it. 0002: A partial sync of qmake_base.bbclass from meta-oe. Hopefully we should
be able to delete qmake_base.bbclass from meta-oe after this sync.
0003-4: respect wifi and bluetooth inDISTRO_FEATURESwhile building connman
and ofono.
0005: increase the likelihood that a rename and modification is detected,
instead of a deleta/add-pair.Patch 0005 is the patch that is most likely to be controversial. The other patches should be of minor impact, and result in a more consistent build environment (i.e. better respect for
DISTRO_FEATURES).The following changes since commit
13db5f420ca9bff98561f80d78958278734ad1f4:
Quoted 8 lines
distro-tracking: Update info for gpgme, libassuan, apr... after last upgrade. (2011-08-15 15:26:04 +0100)
are available in the git repository at:
git://github.com/darander/oe-coreqt4-fixes
https://github.com/darander/oe-core/tree/qt4-fixesAnders Darander (5):
qt4: allow a reduction in build time
See comments from Richard.
Quoted 5 lines
qmake_base: add uclibceabi
connman: useDISTRO_FEATURESto enable wifi and bluetooth
ofono: conditionally enable bluetooth
create-pull-request: increase likelihood of detecting a rename
Quoted 9 lines
meta/classes/qmake_base.bbclass | 2 +- meta/recipes-connectivity/connman/connman_0.75.bb | 4 ++-- meta/recipes-connectivity/ofono/ofono.inc | 3 ++- meta/recipes-connectivity/ofono/ofono_0.50.bb | 1 + meta/recipes-connectivity/ofono/ofono_git.bb | 4 ++++ meta/recipes-qt/qt4/qt4.inc | 13 ++++++++----- scripts/create-pull-request | 2 +- 7 files changed, 19 insertions(+), 10 deletions(-)
Merged into OE-Core, except for the Qt4 patch as already commented on by Richard
Thanks
Sau!