diff options
author | Andrew Geissler <geissonator@yahoo.com> | 2020-04-13 21:39:40 +0300 |
---|---|---|
committer | Andrew Geissler <geissonator@yahoo.com> | 2020-05-05 16:30:44 +0300 |
commit | 82c905dc58a36aeae40b1b273a12f63fb1973cf4 (patch) | |
tree | 38caf00263451b5036435cdc36e035b25d32e623 /poky/meta/classes/mime.bbclass | |
parent | 83ecb75644b3d677c274188f9ac0b2374d6f6925 (diff) | |
download | openbmc-82c905dc58a36aeae40b1b273a12f63fb1973cf4.tar.xz |
meta-openembedded and poky: subtree updates
Squash of the following due to dependencies among them
and OpenBMC changes:
meta-openembedded: subtree update:d0748372d2..9201611135
meta-openembedded: subtree update:9201611135..17fd382f34
poky: subtree update:9052e5b32a..2e11d97b6c
poky: subtree update:2e11d97b6c..a8544811d7
The change log was too large for the jenkins plugin
to handle therefore it has been removed. Here is
the first and last commit of each subtree:
meta-openembedded:d0748372d2
cppzmq: bump to version 4.6.0
meta-openembedded:17fd382f34
mpv: Remove X11 dependency
poky:9052e5b32a
package_ipk: Remove pointless comment to trigger rebuild
poky:a8544811d7
pbzip2: Fix license warning
Change-Id: If0fc6c37629642ee207a4ca2f7aa501a2c673cd6
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
Diffstat (limited to 'poky/meta/classes/mime.bbclass')
-rw-r--r-- | poky/meta/classes/mime.bbclass | 62 |
1 files changed, 32 insertions, 30 deletions
diff --git a/poky/meta/classes/mime.bbclass b/poky/meta/classes/mime.bbclass index 6c7b868f7..c9072adf3 100644 --- a/poky/meta/classes/mime.bbclass +++ b/poky/meta/classes/mime.bbclass @@ -1,46 +1,47 @@ -DEPENDS += "shared-mime-info" +# +# This class is used by recipes installing mime types +# + +DEPENDS += "${@bb.utils.contains('BPN', 'shared-mime-info', '', 'shared-mime-info', d)}" PACKAGE_WRITE_DEPS += "shared-mime-info-native" +MIMEDIR = "${datadir}/mime" mime_postinst() { -if [ "$1" = configure ]; then - UPDATEMIMEDB=`which update-mime-database` - if [ -x "$UPDATEMIMEDB" ] ; then - echo "Updating MIME database... this may take a while." - $UPDATEMIMEDB $D${datadir}/mime - else - echo "Missing update-mime-database, update of mime database failed!" - exit 1 - fi +if [ "x$D" != "x" ]; then + $INTERCEPT_DIR/postinst_intercept update_mime_database ${PKG} \ + mlprefix=${MLPREFIX} \ + mimedir=${MIMEDIR} +else + echo "Updating MIME database... this may take a while." + update-mime-database $D${MIMEDIR} fi } mime_postrm() { -if [ "$1" = remove ] || [ "$1" = upgrade ]; then - UPDATEMIMEDB=`which update-mime-database` - if [ -x "$UPDATEMIMEDB" ] ; then - echo "Updating MIME database... this may take a while." - $UPDATEMIMEDB $D${datadir}/mime - else - echo "Missing update-mime-database, update of mime database failed!" - exit 1 - fi +if [ "x$D" != "x" ]; then + $INTERCEPT_DIR/postinst_intercept update_mime_database ${PKG} \ + mlprefix=${MLPREFIX} \ + mimedir=${MIMEDIR} +else + echo "Updating MIME database... this may take a while." + update-mime-database $D${MIMEDIR} fi } python populate_packages_append () { - import re packages = d.getVar('PACKAGES').split() pkgdest = d.getVar('PKGDEST') + mimedir = d.getVar('MIMEDIR') for pkg in packages: - mime_dir = '%s/%s/usr/share/mime/packages' % (pkgdest, pkg) - mimes = [] - mime_re = re.compile(".*\.xml$") - if os.path.exists(mime_dir): - for f in os.listdir(mime_dir): - if mime_re.match(f): - mimes.append(f) - if mimes: + mime_packages_dir = '%s/%s%s/packages' % (pkgdest, pkg, mimedir) + mimes_types_found = False + if os.path.exists(mime_packages_dir): + for f in os.listdir(mime_packages_dir): + if f.endswith('.xml'): + mimes_types_found = True + break + if mimes_types_found: bb.note("adding mime postinst and postrm scripts to %s" % pkg) postinst = d.getVar('pkg_postinst_%s' % pkg) if not postinst: @@ -52,6 +53,7 @@ python populate_packages_append () { postrm = '#!/bin/sh\n' postrm += d.getVar('mime_postrm') d.setVar('pkg_postrm_%s' % pkg, postrm) - bb.note("adding shared-mime-info-data dependency to %s" % pkg) - d.appendVar('RDEPENDS_' + pkg, " " + d.getVar('MLPREFIX')+"shared-mime-info-data") + if pkg != 'shared-mime-info-data': + bb.note("adding shared-mime-info-data dependency to %s" % pkg) + d.appendVar('RDEPENDS_' + pkg, " " + d.getVar('MLPREFIX')+"shared-mime-info-data") } |