Hi, On Wed, 30 Nov 2011 16:43:04 +0100 Koen Kooi <[email protected]> wrote:
> Signed-off-by: Koen Kooi <[email protected]> > --- > meta/classes/patch.bbclass | 1 + > meta/lib/oe/patch.py | 14 ++++++++++++++ > 2 files changed, 15 insertions(+), 0 deletions(-) > > diff --git a/meta/classes/patch.bbclass b/meta/classes/patch.bbclass > index ac6c1ce..9f99e38 100644 > --- a/meta/classes/patch.bbclass > +++ b/meta/classes/patch.bbclass > @@ -18,6 +18,7 @@ python patch_do_patch() { > "patch": oe.patch.PatchTree, > "quilt": oe.patch.QuiltTree, > "git": oe.patch.GitApplyTree, > + "gitam": oe.patch.GitAmTree, > } > > cls = patchsetmap[d.getVar('PATCHTOOL', 1) or 'quilt'] > diff --git a/meta/lib/oe/patch.py b/meta/lib/oe/patch.py > index f4ccb3e..06965ba 100644 > --- a/meta/lib/oe/patch.py > +++ b/meta/lib/oe/patch.py > @@ -176,6 +176,20 @@ class GitApplyTree(PatchTree): > > return runcmd(["sh", "-c", " ".join(shellcmd)], self.dir) > > +class GitAmTree(PatchTree): > + def __init__(self, dir, d): > + PatchTree.__init__(self, dir, d) > + > + def _applypatch(self, patch, force = False, reverse = False, run = True): > + shellcmd = ["git", "am"] > + > + shellcmd.append(patch['file']) > + > + if not run: > + return "sh" + "-c" + " ".join(shellcmd) That'd result in 'sh-cgit am' Maybe you mean something like " ".join(["sh", "-c"] + shellcmd) ? > + > + return runcmd(["sh", "-c", " ".join(shellcmd)], self.dir) > + > > class QuiltTree(PatchSet): > def _runcmd(self, args, run = True): Best wishes. Mario -- http://parenteses.org/mario _______________________________________________ Openembedded-core mailing list [email protected] http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
