diff options
Diffstat (limited to 'classes')
-rw-r--r-- | classes/base.bbclass | 12 | ||||
-rw-r--r-- | classes/patch.bbclass | 10 |
2 files changed, 20 insertions, 2 deletions
diff --git a/classes/base.bbclass b/classes/base.bbclass index 51b6d2111f..80e0b82198 100644 --- a/classes/base.bbclass +++ b/classes/base.bbclass @@ -324,6 +324,16 @@ python base_do_clean() { os.system('rm -f '+ dir) } +addtask rebuild +do_rebuild[dirs] = "${TOPDIR}" +do_rebuild[nostamp] = "1" +do_rebuild[bbdepcmd] = "" +python base_do_rebuild() { + """rebuild a package""" + bb.build.exec_task('do_clean', d) + bb.build.exec_task('do_' + bb.data.getVar('BB_DEFAULT_TASK', d, 1), d) +} + addtask mrproper do_mrproper[dirs] = "${TOPDIR}" do_mrproper[nostamp] = "1" @@ -685,7 +695,7 @@ python () { # Patch handling inherit patch -EXPORT_FUNCTIONS do_clean do_mrproper do_fetch do_unpack do_configure do_compile do_install do_package do_populate_pkgs do_stage +EXPORT_FUNCTIONS do_clean do_mrproper do_fetch do_unpack do_configure do_compile do_install do_package do_populate_pkgs do_stage do_rebuild MIRRORS[func] = "0" MIRRORS () { diff --git a/classes/patch.bbclass b/classes/patch.bbclass index f0232adf1e..e3b89ba4f9 100644 --- a/classes/patch.bbclass +++ b/classes/patch.bbclass @@ -117,7 +117,11 @@ def patch_init(d): """""" PatchSet.Import(self, patch, force) - self.patches.insert(self._current or 0, patch) + if self._current is not None: + i = self._current + 1 + else: + i = 0 + self.patches.insert(i, patch) def _applypatch(self, patch, force = None, reverse = None): shellcmd = ["cat", patch['file'], "|", "patch", "-p", patch['strippath']] @@ -137,18 +141,22 @@ def patch_init(d): return output def Push(self, force = None, all = None): + bb.note("self._current is %s" % self._current) + bb.note("patches is %s" % self.patches) if all: for i in self.patches: if self._current is not None: self._current = self._current + 1 else: self._current = 0 + bb.note("applying patch %s" % i) self._applypatch(i, force) else: if self._current is not None: self._current = self._current + 1 else: self._current = 0 + bb.note("applying patch %s" % self.patches[self._current]) self._applypatch(self.patches[self._current], force) |