diff options
| author | Otavio Salvador <otavio@ossystems.com.br> | 2014-07-11 16:32:17 -0300 |
|---|---|---|
| committer | Otavio Salvador <otavio@ossystems.com.br> | 2014-07-11 17:40:22 -0300 |
| commit | cf138e7067f6151d91cac915da1545f143092cbb (patch) | |
| tree | ca7326f8580afc4ef46c0b3ec5fe7d25e21341f9 /meta-fsl-arm/recipes-multimedia | |
| parent | ad663d5d8a12d0c33f5bf3ab2c018597a6d2ae03 (diff) | |
| download | meta-freescale-cf138e7067f6151d91cac915da1545f143092cbb.tar.gz | |
libfslcodec: Use python functions to split and amend metadata
The metadata amending, to include the INSANE_SKIP hacks, need to be
done before we run the QA checks. This has change now that the QA
checks are run in a separate task.
To accomodate the code to this the recipe needed to be reworked to use
separated methods to:
- split the packages for the plugins;
- generate the needed rdepends for the meta package;
- apply the quirks;
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Diffstat (limited to 'meta-fsl-arm/recipes-multimedia')
| -rw-r--r-- | meta-fsl-arm/recipes-multimedia/libfslcodec/libfslcodec.inc | 31 |
1 files changed, 22 insertions, 9 deletions
diff --git a/meta-fsl-arm/recipes-multimedia/libfslcodec/libfslcodec.inc b/meta-fsl-arm/recipes-multimedia/libfslcodec/libfslcodec.inc index 8ce80bc9b..8bc3e487a 100644 --- a/meta-fsl-arm/recipes-multimedia/libfslcodec/libfslcodec.inc +++ b/meta-fsl-arm/recipes-multimedia/libfslcodec/libfslcodec.inc | |||
| @@ -40,25 +40,36 @@ do_install_append() { | |||
| 40 | 40 | ||
| 41 | } | 41 | } |
| 42 | 42 | ||
| 43 | python populate_packages_prepend() { | 43 | python __set_insane_skip() { |
| 44 | codecdir = bb.data.expand('${libdir}', d) | 44 | # Ensure we have PACKAGES expanded |
| 45 | do_split_packages(d, codecdir, '^lib_([^_]*).*_arm.*_elinux\.so\..*', | 45 | bb.build.exec_func("read_subpackage_metadata", d) |
| 46 | aux_files_pattern='${libdir}/imx-mm/audio-codec/wrap/lib_%sd_wrap_arm*_elinux.so.*', | ||
| 47 | output_pattern='libfslcodec-%s', | ||
| 48 | description='Freescale i.MX Codec (%s)', | ||
| 49 | extra_depends='') | ||
| 50 | 46 | ||
| 51 | # FIXME: All binaries lack GNU_HASH in elf binary but as we don't have | ||
| 52 | # the source we cannot fix it. Disable the insane check for now. | ||
| 53 | for p in d.getVar('PACKAGES', True).split(): | 47 | for p in d.getVar('PACKAGES', True).split(): |
| 48 | # Even though we are packaging libraries those are plugins so we | ||
| 49 | # shouldn't rename the packages to follow its sonames. | ||
| 54 | d.setVar("DEBIAN_NOAUTONAME_%s" % p, "1") | 50 | d.setVar("DEBIAN_NOAUTONAME_%s" % p, "1") |
| 55 | 51 | ||
| 52 | # FIXME: All binaries lack GNU_HASH in elf binary but as we don't have | ||
| 53 | # the source we cannot fix it. Disable the insane check for now. | ||
| 56 | if p == 'libfslcodec-test-bin': | 54 | if p == 'libfslcodec-test-bin': |
| 57 | # FIXME: includes the DUT .so files so we need to deploy those | 55 | # FIXME: includes the DUT .so files so we need to deploy those |
| 58 | d.setVar("INSANE_SKIP_%s" % p, "ldflags textrel libdir") | 56 | d.setVar("INSANE_SKIP_%s" % p, "ldflags textrel libdir") |
| 59 | else: | 57 | else: |
| 60 | d.setVar("INSANE_SKIP_%s" % p, "ldflags textrel") | 58 | d.setVar("INSANE_SKIP_%s" % p, "ldflags textrel") |
| 59 | } | ||
| 61 | 60 | ||
| 61 | do_package_qa[prefuncs] += "__set_insane_skip" | ||
| 62 | |||
| 63 | python __split_libfslcodec_plugins() { | ||
| 64 | codecdir = bb.data.expand('${libdir}', d) | ||
| 65 | do_split_packages(d, codecdir, '^lib_([^_]*).*_arm.*_elinux\.so\..*', | ||
| 66 | aux_files_pattern='${libdir}/imx-mm/audio-codec/wrap/lib_%sd_wrap_arm*_elinux.so.*', | ||
| 67 | output_pattern='libfslcodec-%s', | ||
| 68 | description='Freescale i.MX Codec (%s)', | ||
| 69 | extra_depends='') | ||
| 70 | } | ||
| 71 | |||
| 72 | python __set_metapkg_rdepends() { | ||
| 62 | # Allow addition of all codecs in a image; useful specially for | 73 | # Allow addition of all codecs in a image; useful specially for |
| 63 | # debugging. | 74 | # debugging. |
| 64 | codec_pkgs = oe.utils.packages_filter_out_system(d) | 75 | codec_pkgs = oe.utils.packages_filter_out_system(d) |
| @@ -67,6 +78,8 @@ python populate_packages_prepend() { | |||
| 67 | d.appendVar('RDEPENDS_libfslcodec-meta', ' ' + ' '.join(codec_pkgs)) | 78 | d.appendVar('RDEPENDS_libfslcodec-meta', ' ' + ' '.join(codec_pkgs)) |
| 68 | } | 79 | } |
| 69 | 80 | ||
| 81 | PACKAGESPLITFUNCS =+ "__split_libfslcodec_plugins __set_metapkg_rdepends" | ||
| 82 | |||
| 70 | # Ensure we get warnings if we miss something | 83 | # Ensure we get warnings if we miss something |
| 71 | FILES_${PN} = "" | 84 | FILES_${PN} = "" |
| 72 | 85 | ||
