aboutsummaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorQing He <qing.he@intel.com>2011-04-29 10:55:05 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-05-04 00:51:05 +0100
commit122f8e4af98a049de01526a6d09e7eb422494b9a (patch)
tree142cb04acab925ea547c5e03252dbc66ceb4e6a7 /meta
parentbb92a1852e17232c07658eef013f243ca6780563 (diff)
downloadopenembedded-core-contrib-122f8e4af98a049de01526a6d09e7eb422494b9a.tar.gz
shared-mime-info: upgrade to version 0.90
from 0.80 - parallel build with 0.9 is buggy, disable part of the check for now Signed-off-by: Qing He <qing.he@intel.com>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-support/shared-mime-info/files/fix-parallel-build.patch33
-rw-r--r--meta/recipes-support/shared-mime-info/shared-mime-info_0.80.bb5
-rw-r--r--meta/recipes-support/shared-mime-info/shared-mime-info_0.90.bb7
3 files changed, 40 insertions, 5 deletions
diff --git a/meta/recipes-support/shared-mime-info/files/fix-parallel-build.patch b/meta/recipes-support/shared-mime-info/files/fix-parallel-build.patch
new file mode 100644
index 0000000000..ea8b05eae3
--- /dev/null
+++ b/meta/recipes-support/shared-mime-info/files/fix-parallel-build.patch
@@ -0,0 +1,33 @@
+the check rule will trigger a weird dependency issue in automake,
+it's possible that update-mime-database are invoked simultaneously in
+two different threads at the same time.
+
+As a workaround, revert it to the logic in 0.80
+
+Upstream-Status: Inappropriate [workaround]
+
+Signed-off-by: qing He <qing.he@intel.com>
+
+diff --git a/Makefile.am b/Makefile.am
+index 1a887bc..9df581e 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -72,7 +72,7 @@ uninstall-hook:
+ create-pot:
+ $(MAKE) -C po shared-mime-info.pot
+
+-check: freedesktop.org.xml update-mime-database check-translations
++check: freedesktop.org.xml check-translations
+ if test -n $(XMLLINT) ; then \
+ if test -e $(top_builddir)/freedesktop.org.xml; then \
+ xmllint --noout --valid $(top_builddir)/freedesktop.org.xml; \
+@@ -80,9 +80,6 @@ check: freedesktop.org.xml update-mime-database check-translations
+ xmllint --noout --valid $(top_srcdir)/freedesktop.org.xml; \
+ fi \
+ fi
+- if test -d .git/ && test -x $(top_builddir)/update-mime-database && test -d $(top_srcdir)/mime-db-tests ; then \
+- $(top_builddir)/update-mime-database mime-db-tests/ ; \
+- fi
+ if test -d .git/ && test -x ../xdgmime/src/test-mime-data && test -x $(top_builddir)/test-tree-magic ; then \
+ mkdir -p $(top_builddir)/temp-mime-dir/mime/packages ; \
+ cp -a $(top_builddir)/freedesktop.org.xml $(top_builddir)/temp-mime-dir/mime/packages/ ; \
diff --git a/meta/recipes-support/shared-mime-info/shared-mime-info_0.80.bb b/meta/recipes-support/shared-mime-info/shared-mime-info_0.80.bb
deleted file mode 100644
index f80992372e..0000000000
--- a/meta/recipes-support/shared-mime-info/shared-mime-info_0.80.bb
+++ /dev/null
@@ -1,5 +0,0 @@
-require shared-mime-info.inc
-PR = "r0"
-
-SRC_URI[md5sum] = "eb8d24a6a80888849c9db7f30232ba6a"
-SRC_URI[sha256sum] = "80857ba19f8066bfc8d998bfc72b492e241ebd52d49c245aae9fd5b3d233b024"
diff --git a/meta/recipes-support/shared-mime-info/shared-mime-info_0.90.bb b/meta/recipes-support/shared-mime-info/shared-mime-info_0.90.bb
new file mode 100644
index 0000000000..a806b3672b
--- /dev/null
+++ b/meta/recipes-support/shared-mime-info/shared-mime-info_0.90.bb
@@ -0,0 +1,7 @@
+require shared-mime-info.inc
+PR = "r0"
+
+SRC_URI += "file://fix-parallel-build.patch"
+
+SRC_URI[md5sum] = "967d68d3890ba3994cfce3adf5b8f15b"
+SRC_URI[sha256sum] = "52c9f84a8c72de631a0458542980b1728560f59845eb5e93e1dbe825f4b72304"
tespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ }
# ex:ts=4:sw=4:sts=4:et
# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
#
#
# Copyright (C)       2006 Holger Hans Peter Freyther
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
#   Redistributions of source code must retain the above copyright notice,
#   this list of conditions and the following disclaimer.
#
#   Redistributions in binary form must reproduce the above copyright
#   notice, this list of conditions and the following disclaimer in the
#   documentation and/or other materials provided with the distribution.
#
#   Neither the name Holger Hans Peter Freyther nor the names of its
#   contributors may be used to endorse or promote products derived
#   from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
# IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.


"""
    What is a method pool?

    BitBake has a global method scope where .bb, .inc and .bbclass
    files can install methods. These methods are parsed from strings.
    To avoid recompiling and executing these string we introduce
    a method pool to do this task.

    This pool will be used to compile and execute the functions. It
    will be smart enough to 
"""

from bb.utils import better_compile, better_exec
from bb       import error

# A dict of modules we have handled
# it is the number of .bbclasses + x in size
_parsed_methods = { }
_parsed_fns     = { }

def insert_method(modulename, code, fn):
    """
    Add code of a module should be added. The methods
    will be simply added, no checking will be done
    """
    comp = better_compile(code, "<bb>", fn )
    better_exec(comp, __builtins__, code, fn)

    # hack hack hack XXX
    return

    # now some instrumentation
    code = comp.co_names
    for name in code:
        if name in ['None', 'False']:
            continue
        elif name in _parsed_fns and not _parsed_fns[name] == modulename:
            error( "Error Method already seen: %s in' %s' now in '%s'" % (name, _parsed_fns[name], modulename))
        else:
            _parsed_fns[name] = modulename

def check_insert_method(modulename, code, fn):
    """
    Add the code if it wasnt added before. The module
    name will be used for that 

    Variables:
        @modulename a short name e.g. base.bbclass
        @code The actual python code
        @fn   The filename from the outer file
    """
    if not modulename in _parsed_methods:
        return insert_method(modulename, code, fn)

def parsed_module(modulename):
    """
    Inform me file xyz was parsed
    """
    return modulename in _parsed_methods


def get_parsed_dict():
    """
    shortcut
    """
    return _parsed_methods