[oe-commits] org.oe.dev patch.bbclass:
clarson commit
openembedded-commits at lists.openembedded.org
Wed Aug 30 07:34:29 UTC 2006
patch.bbclass:
* Add NOOPResolver class, which simply passes the patch failure on up, not
doing any actual patch resolution. Set PATCHRESOLVE = "noop" to make use of
it. Most useful for unattended builds.
Author: clarson at kergoth.com
Branch: org.openembedded.dev
Revision: aa23e3ef188ca09f9f09519f2c7b006a68b9a691
ViewMTN: http://monotone.openembedded.org/revision.psp?id=aa23e3ef188ca09f9f09519f2c7b006a68b9a691
Files:
1
classes/patch.bbclass
Diffs:
#
# mt diff -r4b6ef12415cd44dacf0804d01ea5a6e0120afa7e -raa23e3ef188ca09f9f09519f2c7b006a68b9a691
#
#
#
# patch "classes/patch.bbclass"
# from [43a7cdac0d459f62c68c6d258f001d3b06688906]
# to [e05e72c39752e90c2160435332f720e73d782cfd]
#
============================================================
--- classes/patch.bbclass 43a7cdac0d459f62c68c6d258f001d3b06688906
+++ classes/patch.bbclass e05e72c39752e90c2160435332f720e73d782cfd
@@ -309,6 +309,19 @@ def patch_init(d):
def Finalize(self):
raise NotImplementedError()
+ class NOOPResolver(Resolver):
+ def __init__(self, patchset):
+ self.patchset = patchset
+
+ def Resolve(self):
+ olddir = os.path.abspath(os.curdir)
+ os.chdir(self.patchset.dir)
+ try:
+ self.patchset.Push()
+ except Exception:
+ os.chdir(olddir)
+ raise sys.exc_value
+
# Patch resolver which relies on the user doing all the work involved in the
# resolution, with the exception of refreshing the remote copy of the patch
# files (the urls).
@@ -360,20 +373,13 @@ def patch_init(d):
raise
os.chdir(olddir)
- # Throw away the changes to the patches in the patchset made by resolve()
- def Revert(self):
- raise NotImplementedError()
-
- # Apply the changes to the patches in the patchset made by resolve()
- def Finalize(self):
- raise NotImplementedError()
-
g = globals()
g["PatchSet"] = PatchSet
g["PatchTree"] = PatchTree
g["QuiltTree"] = QuiltTree
g["Resolver"] = Resolver
g["UserResolver"] = UserResolver
+ g["NOOPResolver"] = NOOPResolver
g["NotFoundError"] = NotFoundError
g["CmdError"] = CmdError
@@ -397,6 +403,7 @@ python patch_do_patch() {
cls = patchsetmap[bb.data.getVar('PATCHTOOL', d, 1) or 'quilt']
resolvermap = {
+ "noop": NOOPResolver,
"user": UserResolver,
}
More information about the Openembedded-commits
mailing list