]> code.ossystems Code Review - openembedded-core.git/commit
lib/oe/patch.py: Fix and improve PatchTree() resolver logic
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 1 Mar 2012 23:38:00 +0000 (23:38 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 2 Mar 2012 16:13:31 +0000 (16:13 +0000)
commitf0fc47aea37793a62c43f10eea27ca014c420924
tree7442376a81bc2edc8defec8e689c903b7225fa4e
parentb82c216c1ee8e2a009e87856b7adad08f7f50482
lib/oe/patch.py: Fix and improve PatchTree() resolver logic

Currently, if PATCHRESOLVE is user and and PatchTree() is being used, you can
get backtraces if patch application fails. This is because even in the failure
case, self._current is incremented, meaning second time around, there are array
range issues.

This patch changes the code so _current is only incremented upon successful
patch application, thereby resolving this failure.

Secondly, if you bitbake -c patch -f a recipe using PatchTree(), the
clean method was unimplemented leading to patch failures.

The other part of this patch changes the logic so a series file and
set of applied patches are maintained in a quilt like fashion. This
means a the Clean method can be implemented correctly and rerunning
the patch task of an existing patches source now works reliably.

[YOCTO #2043 partially]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oe/patch.py