diff options
-rw-r--r-- | classes/task-metadata-track.bbclass | 96 | ||||
-rw-r--r-- | recipes/intltool/intltool-native_0.30.bb | 1 | ||||
-rw-r--r-- | recipes/intltool/intltool-native_0.31.bb | 1 | ||||
-rw-r--r-- | recipes/intltool/intltool-native_0.34.bb | 1 | ||||
-rw-r--r-- | recipes/intltool/intltool-native_0.35.0.bb | 1 | ||||
-rw-r--r-- | recipes/intltool/intltool-native_0.35.5.bb | 1 | ||||
-rw-r--r-- | recipes/intltool/intltool-native_0.37.1.bb | 1 | ||||
-rw-r--r-- | recipes/intltool/intltool-native_0.40.3.bb | 3 | ||||
-rw-r--r-- | recipes/intltool/intltool.inc | 2 | ||||
-rw-r--r-- | recipes/intltool/intltool_0.30.bb | 3 | ||||
-rw-r--r-- | recipes/intltool/intltool_0.31.bb | 3 | ||||
-rw-r--r-- | recipes/intltool/intltool_0.34.bb | 3 | ||||
-rw-r--r-- | recipes/intltool/intltool_0.35.0.bb | 6 | ||||
-rw-r--r-- | recipes/intltool/intltool_0.35.2.bb | 5 | ||||
-rw-r--r-- | recipes/intltool/intltool_0.35.5.bb | 6 | ||||
-rw-r--r-- | recipes/intltool/intltool_0.37.1.bb | 3 | ||||
-rw-r--r-- | recipes/intltool/intltool_0.40.3.bb | 2 |
17 files changed, 117 insertions, 21 deletions
diff --git a/classes/task-metadata-track.bbclass b/classes/task-metadata-track.bbclass new file mode 100644 index 0000000000..d3622aef68 --- /dev/null +++ b/classes/task-metadata-track.bbclass @@ -0,0 +1,96 @@ +# Copyright (C) 2009 Chris Larson <clarson@kergoth.com> +# Released under the MIT license (see COPYING.MIT for the terms) +# +# This class uses events to capture the state of the datastore when the task +# starts, and after it completes. It diffs those captured states, and emits +# messages showing which variables changed, and what their values were changed +# to. +# +# It provides a mechanism to blacklist variables you expect to change, both +# globally and on a per-task basis. +# +# Known instances of tasks changing metadata: +# +# PSTAGE_PKGMANAGER changes by calls to pstage_set_pkgmanager in: +# do_clean, do_setscene, do_package_stage +# +# Subpackage metadata, read by the pkgdata functions in base.bbclass, in: +# do_package, do_package_stage, do_package_write_* + + +TASK_METADATA_BLACKLIST = "\ + __RUNQUEUE_DO_NOT_USE_EXTERNALLY \ +" + +#TASK_METADATA_BLACKLIST_do_clean = "\ +# PSTAGE_PKGMANAGER \ +#" + + +def dict_diff(olddict, newdict): + diff = {} + for key in set(olddict).union(set(newdict)): + old = olddict.get(key) + new = newdict.get(key) + if old != new: + diff[key] = (old, new) + + return diff + +def dict_for_data(data): + newdict = {} + for key in data.keys(): + newdict[key] = data.getVar(key, False) + return newdict + +def task_metadata_track_start(task, data): + originaldata = dict_for_data(data) + data.setVar("__originaldata_%s" % task, originaldata) + +def task_metadata_track_stop(task, data): + from bb import note + + pf = data.getVar("PF", True) + def emit(msg): + note("%s: %s" % (pf, msg)) + + originaldata = data.getVar("__originaldata_%s" % task, False) + newdata = dict_for_data(data) + blacklist = data.getVar("TASK_METADATA_BLACKLIST", True).split() + \ + (data.getVar("TASK_METADATA_BLACKLIST_%s" % task, True) or "").split() + + diff = dict_diff(originaldata, newdata) + diff_clean = [key for key in diff \ + if not key in blacklist and \ + not key.startswith("__originaldata_")] + + if diff_clean: + emit("Variables changed by %s:" % task) + for key in diff_clean: + (old, new) = diff[key] + emit(" %s:" % key) + emit(" '%s' -> '%s'" % (old, new)) + +python __task_metadata_track_eh () { + from bb.build import TaskStarted, TaskSucceeded + + if isinstance(e, TaskStarted): + if e.data is None: + from bb import fatal + fatal("e.data is none for %s" % e) + task_metadata_track_start(e.task, e.data) + elif isinstance(e, TaskSucceeded): + task_metadata_track_stop(e.task, e.data) +} +addhandler __task_metadata_track_eh + +addtask py_listtasks +do_py_listtasks[nostamp] = "1" +do_py_listtasks[recrdeptask] = "do_py_listtasks" +python do_py_listtasks() { + import sys + for e in d.keys(): + if d.getVarFlag(e, "task") and \ + d.getVarFlag(e, "python"): + sys.stdout.write("%s\n" % e) +} diff --git a/recipes/intltool/intltool-native_0.30.bb b/recipes/intltool/intltool-native_0.30.bb index 05f7efdda4..6801a670c1 100644 --- a/recipes/intltool/intltool-native_0.30.bb +++ b/recipes/intltool/intltool-native_0.30.bb @@ -1,4 +1,3 @@ require intltool_${PV}.bb inherit native -DEPENDS = "libxml-parser-perl-native" diff --git a/recipes/intltool/intltool-native_0.31.bb b/recipes/intltool/intltool-native_0.31.bb index 05f7efdda4..6801a670c1 100644 --- a/recipes/intltool/intltool-native_0.31.bb +++ b/recipes/intltool/intltool-native_0.31.bb @@ -1,4 +1,3 @@ require intltool_${PV}.bb inherit native -DEPENDS = "libxml-parser-perl-native" diff --git a/recipes/intltool/intltool-native_0.34.bb b/recipes/intltool/intltool-native_0.34.bb index 05f7efdda4..6801a670c1 100644 --- a/recipes/intltool/intltool-native_0.34.bb +++ b/recipes/intltool/intltool-native_0.34.bb @@ -1,4 +1,3 @@ require intltool_${PV}.bb inherit native -DEPENDS = "libxml-parser-perl-native" diff --git a/recipes/intltool/intltool-native_0.35.0.bb b/recipes/intltool/intltool-native_0.35.0.bb index bac5378113..1d14d898f9 100644 --- a/recipes/intltool/intltool-native_0.35.0.bb +++ b/recipes/intltool/intltool-native_0.35.0.bb @@ -1,7 +1,6 @@ require intltool_${PV}.bb inherit native -DEPENDS = "libxml-parser-perl-native" export PERL = "/usr/bin/env perl" SRC_URI_append = " file://intltool-nowarn.patch;patch=1" diff --git a/recipes/intltool/intltool-native_0.35.5.bb b/recipes/intltool/intltool-native_0.35.5.bb index ba9b90c07a..debef1cc99 100644 --- a/recipes/intltool/intltool-native_0.35.5.bb +++ b/recipes/intltool/intltool-native_0.35.5.bb @@ -1,7 +1,6 @@ require intltool_${PV}.bb inherit native -DEPENDS = "libxml-parser-perl-native" export PERL = "/usr/bin/env perl" SRC_URI_append = " file://intltool-nowarn.patch;patch=1" diff --git a/recipes/intltool/intltool-native_0.37.1.bb b/recipes/intltool/intltool-native_0.37.1.bb index bac5378113..1d14d898f9 100644 --- a/recipes/intltool/intltool-native_0.37.1.bb +++ b/recipes/intltool/intltool-native_0.37.1.bb @@ -1,7 +1,6 @@ require intltool_${PV}.bb inherit native -DEPENDS = "libxml-parser-perl-native" export PERL = "/usr/bin/env perl" SRC_URI_append = " file://intltool-nowarn.patch;patch=1" diff --git a/recipes/intltool/intltool-native_0.40.3.bb b/recipes/intltool/intltool-native_0.40.3.bb index b9550cc982..37198a5904 100644 --- a/recipes/intltool/intltool-native_0.40.3.bb +++ b/recipes/intltool/intltool-native_0.40.3.bb @@ -1,9 +1,6 @@ require intltool_${PV}.bb -PR = "r2" - inherit native -DEPENDS = "libxml-parser-perl-native" EXTRA_OEMAKE = "'PERL_TARGET=/usr/bin/env perl'" diff --git a/recipes/intltool/intltool.inc b/recipes/intltool/intltool.inc index 410a89cfa3..1938407fd0 100644 --- a/recipes/intltool/intltool.inc +++ b/recipes/intltool/intltool.inc @@ -2,6 +2,8 @@ DESCRIPTION = "Utility scripts for internationalizing XML" PRIORITY = "optional" SECTION = "devel" LICENSE = "GPL" +DEPENDS += "libxml-parser-perl-native" +INC_PR = "r2" URLV="${@'.'.join(bb.data.getVar('PV',d,1).split('.')[0:2])}" SRC_URI = "${GNOME_MIRROR}/intltool/${URLV}/intltool-${PV}.tar.bz2" diff --git a/recipes/intltool/intltool_0.30.bb b/recipes/intltool/intltool_0.30.bb index e48262574b..04bd71fd71 100644 --- a/recipes/intltool/intltool_0.30.bb +++ b/recipes/intltool/intltool_0.30.bb @@ -1 +1,4 @@ require intltool.inc + +PR = "${INC_PR}.1" + diff --git a/recipes/intltool/intltool_0.31.bb b/recipes/intltool/intltool_0.31.bb index e48262574b..04bd71fd71 100644 --- a/recipes/intltool/intltool_0.31.bb +++ b/recipes/intltool/intltool_0.31.bb @@ -1 +1,4 @@ require intltool.inc + +PR = "${INC_PR}.1" + diff --git a/recipes/intltool/intltool_0.34.bb b/recipes/intltool/intltool_0.34.bb index e48262574b..04bd71fd71 100644 --- a/recipes/intltool/intltool_0.34.bb +++ b/recipes/intltool/intltool_0.34.bb @@ -1 +1,4 @@ require intltool.inc + +PR = "${INC_PR}.1" + diff --git a/recipes/intltool/intltool_0.35.0.bb b/recipes/intltool/intltool_0.35.0.bb index 6dea51a5fc..6da883212a 100644 --- a/recipes/intltool/intltool_0.35.0.bb +++ b/recipes/intltool/intltool_0.35.0.bb @@ -1,8 +1,6 @@ require intltool.inc -DEPENDS = "libxml-parser-perl-native" #RDEPENDS = "libxml-parser-perl" - -PR = "r1" - RRECOMMENDS = "perl-modules" + +PR = "${INC_PR}.1" diff --git a/recipes/intltool/intltool_0.35.2.bb b/recipes/intltool/intltool_0.35.2.bb index 5e2f94eb43..a8e2cf8905 100644 --- a/recipes/intltool/intltool_0.35.2.bb +++ b/recipes/intltool/intltool_0.35.2.bb @@ -1,8 +1,7 @@ require intltool.inc -DEPENDS = "libxml-parser-perl-native" RDEPENDS = "perl-module-text-wrap perl-module-re" +RRECOMMENDS = "perl-modules" -PR = "r1" +PR = "${INC_PR}.1" -RRECOMMENDS = "perl-modules" diff --git a/recipes/intltool/intltool_0.35.5.bb b/recipes/intltool/intltool_0.35.5.bb index 092689b24b..4cb7a794ef 100644 --- a/recipes/intltool/intltool_0.35.5.bb +++ b/recipes/intltool/intltool_0.35.5.bb @@ -1,12 +1,10 @@ require intltool.inc -DEPENDS = "libxml-parser-perl-native" RDEPENDS = "perl-module-text-wrap perl-module-re" - -PR = "r2" - RRECOMMENDS = "perl-modules" +PR = "${INC_PR}.1" + DEFAULT_PREFERENCE = "-1" SRC_URI += "file://intltool-0.35.5-polkit.patch;patch=1" diff --git a/recipes/intltool/intltool_0.37.1.bb b/recipes/intltool/intltool_0.37.1.bb index e48262574b..04bd71fd71 100644 --- a/recipes/intltool/intltool_0.37.1.bb +++ b/recipes/intltool/intltool_0.37.1.bb @@ -1 +1,4 @@ require intltool.inc + +PR = "${INC_PR}.1" + diff --git a/recipes/intltool/intltool_0.40.3.bb b/recipes/intltool/intltool_0.40.3.bb index b4000dc7c0..ddd6f8956d 100644 --- a/recipes/intltool/intltool_0.40.3.bb +++ b/recipes/intltool/intltool_0.40.3.bb @@ -1,6 +1,6 @@ require intltool.inc -PR = "r2" +PR = "${INC_PR}.1" EXTRA_OEMAKE = "'PERL_TARGET=/usr/bin/perl'" |