diff options
author | Carlos Rafael Giani <dv@pseudoterminal.org> | 2013-05-31 19:15:56 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-06-07 16:48:23 +0100 |
commit | 32c72522b5f30db9df04bb623b74a97fe1954373 (patch) | |
tree | 9decbc5288f8cdb353e695ea976eb49fab8ce8ea /meta/recipes-multimedia/gstreamer/gst-plugins-package.inc | |
parent | 8ec642bf2d873661ada77ba0e602365c3f4e7efb (diff) | |
download | poky-32c72522b5f30db9df04bb623b74a97fe1954373.tar.gz |
gstreamer: fixed -meta package rdepends
The -meta packages were depending on non-existing packages,
like -glib and -apps. The fix checks if packages in the PACKAGES list
are empty. If so, they are omitted from the rdepends list.
(From OE-Core rev: 7c556a1f437c0a5b472727f89ff6c3d5f835b63d)
Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-multimedia/gstreamer/gst-plugins-package.inc')
-rw-r--r-- | meta/recipes-multimedia/gstreamer/gst-plugins-package.inc | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/meta/recipes-multimedia/gstreamer/gst-plugins-package.inc b/meta/recipes-multimedia/gstreamer/gst-plugins-package.inc index 7ae3ef6b0c..5962e4bdf3 100644 --- a/meta/recipes-multimedia/gstreamer/gst-plugins-package.inc +++ b/meta/recipes-multimedia/gstreamer/gst-plugins-package.inc | |||
@@ -1,6 +1,8 @@ | |||
1 | PACKAGESPLITFUNCS_prepend = " split_gstreamer10_packages " | ||
2 | PACKAGESPLITFUNCS_append = " set_metapkg_rdepends " | ||
1 | LIBV = "0.10" | 3 | LIBV = "0.10" |
2 | 4 | ||
3 | python populate_packages_prepend () { | 5 | python split_gstreamer10_packages () { |
4 | gst_libdir = d.expand('${libdir}/gstreamer-${LIBV}') | 6 | gst_libdir = d.expand('${libdir}/gstreamer-${LIBV}') |
5 | postinst = d.getVar('plugin_postinst', True) | 7 | postinst = d.getVar('plugin_postinst', True) |
6 | glibdir = d.getVar('libdir', True) | 8 | glibdir = d.getVar('libdir', True) |
@@ -9,23 +11,38 @@ python populate_packages_prepend () { | |||
9 | do_split_packages(d, gst_libdir, 'libgst(.*)\.so$', d.expand('${PN}-%s'), 'GStreamer plugin for %s', postinst=postinst, extra_depends=d.expand('${PN}')) | 11 | do_split_packages(d, gst_libdir, 'libgst(.*)\.so$', d.expand('${PN}-%s'), 'GStreamer plugin for %s', postinst=postinst, extra_depends=d.expand('${PN}')) |
10 | do_split_packages(d, gst_libdir, 'libgst(.*)\.la$', d.expand('${PN}-%s-dev'), 'GStreamer plugin for %s (development files)', extra_depends=d.expand('${PN}-dev')) | 12 | do_split_packages(d, gst_libdir, 'libgst(.*)\.la$', d.expand('${PN}-%s-dev'), 'GStreamer plugin for %s (development files)', extra_depends=d.expand('${PN}-dev')) |
11 | do_split_packages(d, gst_libdir, 'libgst(.*)\.a$', d.expand('${PN}-%s-staticdev'), 'GStreamer plugin for %s (static development files)', extra_depends=d.expand('${PN}-staticdev')) | 13 | do_split_packages(d, gst_libdir, 'libgst(.*)\.a$', d.expand('${PN}-%s-staticdev'), 'GStreamer plugin for %s (static development files)', extra_depends=d.expand('${PN}-staticdev')) |
12 | 14 | } | |
15 | |||
16 | python set_metapkg_rdepends () { | ||
17 | import os | ||
18 | |||
13 | pn = d.getVar('PN', True) | 19 | pn = d.getVar('PN', True) |
14 | metapkg = pn + '-meta' | 20 | metapkg = pn + '-meta' |
15 | d.setVar('ALLOW_EMPTY_' + metapkg, "1") | 21 | d.setVar('ALLOW_EMPTY_' + metapkg, "1") |
16 | d.setVar('FILES_' + metapkg, "") | 22 | d.setVar('FILES_' + metapkg, "") |
17 | blacklist = [ pn + '-locale', pn + '-dev', pn + '-dbg', pn + '-doc' ] | 23 | blacklist = [ pn, pn + '-locale', pn + '-dev', pn + '-dbg', pn + '-doc', pn + '-meta' ] |
18 | metapkg_rdepends = [] | 24 | metapkg_rdepends = [] |
19 | packages = d.getVar('PACKAGES', True).split() | 25 | packages = d.getVar('PACKAGES', True).split() |
26 | pkgdest = d.getVar('PKGDEST', True) | ||
20 | for pkg in packages[1:]: | 27 | for pkg in packages[1:]: |
21 | if not pkg in blacklist and not pkg in metapkg_rdepends and not pkg.endswith('-dev') and not pkg.endswith('-dbg') and not pkg.count('locale') and not pkg.count('-staticdev'): | 28 | if not pkg in blacklist and not pkg in metapkg_rdepends and not pkg.endswith('-dev') and not pkg.endswith('-dbg') and not pkg.count('locale') and not pkg.count('-staticdev'): |
22 | metapkg_rdepends.append(pkg) | 29 | # See if the package is empty by looking at the contents of its PKGDEST subdirectory. |
30 | # If this subdirectory is empty, then the package is. | ||
31 | # Empty packages do not get added to the meta package's RDEPENDS | ||
32 | pkgdir = os.path.join(pkgdest, pkg) | ||
33 | if os.path.exists(pkgdir): | ||
34 | dir_contents = os.listdir(pkgdir) or [] | ||
35 | else: | ||
36 | dir_contents = [] | ||
37 | is_empty = len(dir_contents) == 0 | ||
38 | if not is_empty: | ||
39 | metapkg_rdepends.append(pkg) | ||
23 | d.setVar('RDEPENDS_' + metapkg, ' '.join(metapkg_rdepends)) | 40 | d.setVar('RDEPENDS_' + metapkg, ' '.join(metapkg_rdepends)) |
24 | d.setVar('DESCRIPTION_' + metapkg, pn + ' meta package') | 41 | d.setVar('DESCRIPTION_' + metapkg, pn + ' meta package') |
25 | } | 42 | } |
26 | 43 | ||
27 | # metapkg has runtime dependency on PN | 44 | # metapkg has runtime dependency on PN |
28 | # each plugin depends on PN, plugin-dev on PN-dev and plugin-staticdev on PN-staticdev | 45 | # each plugin depends on PN, plugin-dev on PN-dev, plugin-staticdev on PN-staticdev |
29 | # so we need them even when empty (like in gst-plugins-good case) | 46 | # so we need them even when empty (like in gst-plugins-good case) |
30 | ALLOW_EMPTY_${PN} = "1" | 47 | ALLOW_EMPTY_${PN} = "1" |
31 | ALLOW_EMPTY_${PN}-dev = "1" | 48 | ALLOW_EMPTY_${PN}-dev = "1" |