Misc patches
cover Misc patches
A series of minor tweaks from my disk. The XFCE support in oe.terminal has only been tested on a Fedora machine so I would appreciate testing from XFCE users on other distros.
Regards,
Joshua
The following changes since commit ddc9a58b8553599d2328ac1c4449b41681ae45d1:
Add readline as dependecy for gdb-cross-canadian (2011-10-27 08:37:53 +0100)
are available in the git repository at:
git://git.openembedded.org/openembedded-core-contrib josh/work
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=josh/work
Joshua Lock (4):
lib/oe/terminal: add support for XFCE's terminal emulator
libxslt: Fix packaging of xsltConf.sh
libcanberra: add new package for unpackaged files
clutter-gtk: add LIC_FILES_CHKSUM to include file
meta/lib/oe/terminal.py | 21 ++++++++++++++++++++ meta/recipes-graphics/clutter/clutter-gtk.inc | 1 + .../pulseaudio/libcanberra_0.28.bb | 11 ++++++++- meta/recipes-support/libxslt/libxslt_1.1.26.bb | 4 +- 4 files changed, 33 insertions(+), 4 deletions(-)
Signature · 1 line
1.7.7
PATCH 1/4 lib/oe/terminal: add support for XFCE's terminal emulator
That's Terminal on Fedora and xfce4-terminal on Ubuntu/Debian... This could get interesting!
--- meta/lib/oe/terminal.py | 21 +++++++++++++++++++++ 1 files changed, 21 insertions(+), 0 deletions(-)
meta/lib/oe/terminal.py +21 -0
@@ -57,6 +57,27 @@ class Gnome(XTerminal): command = 'gnome-terminal --disable-factory -t "{title}" -x {command}' priority = 2 +class Xfce(XTerminal): + def distro_name(): + import subprocess as sub + try: + p = sub.Popen(['lsb_release', '-i'], stdout=sub.PIPE, + stderr=sub.PIPE) + out, err = p.communicate() + distro = out.split(':').strip() + except: + distro = "unknown" + return distro + + # Upstream binary name is Terminal but Debian/Ubuntu use + # xfce4-terminal to avoid possible(?) conflicts + distro = distro_name() + if distro == 'Ubuntu' or distro == 'Debian': + command = 'xfce4-terminal -T "{title}" -e "{command}"' + else: + command = 'Terminal -T "{title}" -e "{command}"' + priority = 2 + class Konsole(XTerminal): command = 'konsole -T "{title}" -e {command}' priority = 2
Signature · 1 line
1.7.7
PATCH 2/4 libxslt: Fix packaging of xsltConf.sh
In reply to Joshua LockxsltConf.sh is installed to libdir not bindir, fix pacakging.
--- meta/recipes-support/libxslt/libxslt_1.1.26.bb | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
meta/recipes-support/libxslt/libxslt_1.1.26.bb +2 -2
@@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=0cd9a07afbeb24026c9b03aecfeba458" SECTION = "libs" DEPENDS = "libxml2" -PR = "r2" +PR = "r3" SRC_URI = "ftp://xmlsoft.org/libxslt//libxslt-${PV}.tar.gz \ file://pkgconfig_fix.patch"
@@ -24,6 +24,6 @@ RPROVIDES_${PN}-bin += "${PN}-utils" RCONFLICTS_${PN}-bin += "${PN}-utils" RREPLACES_${PN}-bin += "${PN}-utils" -FILES_${PN}-dev += "${bindir}/xsltConf.sh" +FILES_${PN}-dev += "${libdir}/xsltConf.sh" BBCLASSEXTEND = "native"
Signature · 1 line
1.7.7
PATCH 3/4 libcanberra: add new package for unpackaged files
In reply to Joshua LockCreate an extra package, libcanberra-gnome, for gdm and gnome-settings-daemon files installed by libcanberra.
--- .../pulseaudio/libcanberra_0.28.bb | 11 +++++++++-- 1 files changed, 9 insertions(+), 2 deletions(-)
meta/recipes-multimedia/pulseaudio/libcanberra_0.28.bb +9 -2
@@ -5,7 +5,7 @@ LIC_FILES_CHKSUM = "file://LGPL;md5=2d5025d4aa3495befef8f17206a5b0a1 \ file://src/canberra.h;beginline=7;endline=24;md5=c616c687cf8da540a14f917e0d23ab03" DEPENDS = "gtk+ pulseaudio alsa-lib libtool" -PR = "r0" +PR = "r1" inherit gconf autotools
@@ -20,6 +20,13 @@ do_configure_prepend () { rm -f ${S}/libltdl/configure* } +PACKAGES += "${PN}-gnome" + FILES_${PN} += "${libdir}/gtk-2.0/modules/ ${datadir}/gnome" -FILES_${PN}-dbg += "${libdir}/gtk-2.0/modules/.debug" +FILES_${PN}-gnome += "${datadir}/gdm/autostart/LoginWindow/libcanberra-ready-sound.desktop \ + ${libdir}/gnome-settings-daemon-3.0/gtk-modules/canberra-gtk-module.desktop" +FILES_${PN}-dev += "${libdir}/libcanberra-0.28/libcanberra-*.so \ + ${libdir}/libcanberra-0.28/libcanberra-*.la \ + ${datadir}/vala/vapi" +FILES_${PN}-dbg += "${libdir}/gtk-2.0/modules/.debug ${libdir}/libcanberra-0.28/.debug"
Signature · 1 line
1.7.7
PATCH 4/4 clutter-gtk: add LIC_FILES_CHKSUM to include file
In reply to Joshua Lock--- meta/recipes-graphics/clutter/clutter-gtk.inc | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
meta/recipes-graphics/clutter/clutter-gtk.inc +1 -0
@@ -1,6 +1,7 @@ DESCRIPTION = "Clutter GTK+" HOMEPAGE = "http://www.clutter-project.org/" LICENSE = "LGPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=7fbc338309ac38fefcd64b04bb903e34" DEPENDS = "gtk+"
Signature · 1 line
1.7.7
Re: [PATCH 1/4] lib/oe/terminal: add support for XFCE's terminal emulator
In reply to Joshua LockQuoted 26 lines · Joshua Lock
That's Terminal on Fedora and xfce4-terminal on Ubuntu/Debian... This could get interesting!
Signed-off-by Joshua Lock <[email protected]>---
meta/lib/oe/terminal.py | 21 +++++++++++++++++++++1 files changed, 21 insertions(+), 0 deletions(-)meta/lib/oe/terminal.py +0
-0@@ -57,6 +57,27 @@ class Gnome(XTerminal):command = 'gnome-terminal --disable-factory -t "{title}" -x {command}' priority = 2
meta/lib/oe/terminal.py +10
-0+class Xfce(XTerminal): + def distro_name(): + import subprocess as sub + try: + p = sub.Popen(['lsb_release', '-i'], stdout=sub.PIPE, + stderr=sub.PIPE) + out, err = p.communicate() + distro = out.split(':').strip() + except: + distro = "unknown"
meta/lib/oe/terminal.py class Gnome(XTerminal): · line 79
Quoted 10 lines
meta/lib/oe/terminal.py +10
-0+ return distro + + # Upstream binary name is Terminal but Debian/Ubuntu use + # xfce4-terminal to avoid possible(?) conflicts + distro = distro_name() + if distro == 'Ubuntu' or distro == 'Debian': + command = 'xfce4-terminal -T "{title}" -e "{command}"' + else: + command = 'Terminal -T "{title}" -e "{command}"' + priority = 2
The first problem I see with this is you're calling lsb_release at module import time. Doing things like that is generally a no-no. I'd suggest shifting it into the constructor. Set up the command there as self.command, and be sure to call the superclass constructor as well, after the command bits. The other thing is, and I'm sure you just copied & pasted it from konsole, but we already import a fully functional Popen -- it's the superclass of all the terminal classes. So there's no need to pull in subprocess's version of it. And the defaults of the Popen we use ensure the output is captured, so there's no need for the sub.PIPE bits at all if you use that one. Simply do p = Popen(['lsb_release', '-i']).
Thanks for adding this, I'm sure folks using stock Xubuntu and the like will find this helpful (I'm an rxvt-unicode guy myself).
Signature · 5 lines
Christopher Larson clarson at kergoth dot com Founder - BitBake, OpenEmbedded, OpenZaurus Maintainer - Tslib Senior Software Engineer, Mentor Graphics
Quoted 16 lines · Joshua Lock
A series of minor tweaks from my disk. The XFCE support in oe.terminal has only been tested on a Fedora machine so I would appreciate testing from XFCE users on other distros.
Regards,
Joshua
The following changes since commit
ddc9a58b8553599d2328ac1c4449b41681ae45d1:Add readline as dependecy for gdb-cross-canadian (2011-10-27 08:37:53 +0100)
are available in the git repository at:
git://git.openembedded.org/openembedded-core-contribjosh/work
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=josh/work
Quoted 5 lines
Joshua Lock (4):
lib/oe/terminal: add support for XFCE's terminal emulator
libxslt: Fix packaging ofxsltConf.sh
libcanberra: add new package for unpackaged files
clutter-gtk: addLIC_FILES_CHKSUMto include file
I've merged these last three, Chris had some good feedback on the first one.
Cheers,
Richard
Re: [PATCH 1/4] lib/oe/terminal: add support for XFCE's terminal emulator
In reply to Chris LarsonQuoted 41 lines · Chris Larson
Quoted 26 lines · Joshua Lock
That's Terminal on Fedora and xfce4-terminal on Ubuntu/Debian... This could get interesting!
Signed-off-by Joshua Lock <[email protected]>--- meta/lib/oe/terminal.py | 21 +++++++++++++++++++++ 1 files changed, 21 insertions(+), 0 deletions(-)meta/lib/oe/terminal.py +10
-0@@ -57,6 +57,27 @@ class Gnome(XTerminal): command = 'gnome-terminal --disable-factory -t "{title}" -x {command}' priority = 2 +class Xfce(XTerminal): + def distro_name(): + import subprocess as sub + try: + p = sub.Popen(['lsb_release', '-i'], stdout=sub.PIPE, + stderr=sub.PIPE) + out, err = p.communicate() + distro = out.split(':').strip() + except: + distro = "unknown"meta/lib/oe/terminal.py class Gnome(XTerminal): · line 79
Quoted 10 lines
meta/lib/oe/terminal.py +10
-0+ return distro + + # Upstream binary name is Terminal but Debian/Ubuntu use + # xfce4-terminal to avoid possible(?) conflicts + distro = distro_name() + if distro == 'Ubuntu' or distro == 'Debian': + command = 'xfce4-terminal -T "{title}" -e "{command}"' + else: + command = 'Terminal -T "{title}" -e "{command}"' + priority = 2The first problem I see with this is you're calling
lsb_releaseat module import time. Doing things like that is generally a no-no. I'd suggest shifting it into the constructor. Set up the command there as
Quoted 8 lines
self.command, and be sure to call the superclass constructor as well, after the command bits. The other thing is, and I'm sure you just copied & pasted it from konsole, but we already import a fully functional Popen -- it's the superclass of all the terminal classes. So there's no need to pull in subprocess's version of it. And the defaults of the Popen we use ensure the output is captured, so there's no need for the sub.PIPE bits at all if you use that one. Simply do p =
Popen(['lsb_release', '-i']).
Thanks for the feedback Chris. I'll roll your suggestions into a v2 today.
Quoted 3 lines
Thanks for adding this, I'm sure folks using stock Xubuntu and the like will find this helpful (I'm an rxvt-unicode guy myself).
I figured that DE would be getting more popular, hence throwing a patch together.
Cheers,
Joshua
Signature · 3 lines
Joshua Lock
Yocto Project "Johannes factotum"
Intel Open Source Technology Centre