diff options
author | Frans Meulenbroeks <fransmeulenbroeks@gmail.com> | 2010-06-12 22:21:07 +0200 |
---|---|---|
committer | Frans Meulenbroeks <fransmeulenbroeks@gmail.com> | 2010-06-12 22:21:07 +0200 |
commit | c326ad5a1960df22c5efd71bd815b9b12688556e (patch) | |
tree | 09bd868c4446f3510a070ed601e7b67c6b791cde /lib | |
parent | dd0fdfe9ed922189f4251c688b7a16faa76cd904 (diff) | |
parent | 2bca6bd1a15123af28ff5ef8fd6ebb417a3a4dee (diff) |
Merge branch 'org.openembedded.dev' of git.openembedded.org:openembedded into org.openembedded.dev
Conflicts:
recipes/tgt/tgt_1.0.5.bb
Diffstat (limited to 'lib')
-rw-r--r-- | lib/oe/patch.py | 13 | ||||
-rw-r--r-- | lib/oe/path.py | 11 |
2 files changed, 15 insertions, 9 deletions
diff --git a/lib/oe/patch.py b/lib/oe/patch.py index 7f6b0fe8de..607ad44321 100644 --- a/lib/oe/patch.py +++ b/lib/oe/patch.py @@ -230,15 +230,10 @@ class QuiltTree(PatchSet): if not self.initialized: self.InitFromDir() PatchSet.Import(self, patch, force) - - args = ["import", "-p", patch["strippath"]] - if force: - args.append("-f") - args.append("-dn") - args.append(patch["file"]) - - self._runcmd(args) - + os.symlink(patch["file"], self._quiltpatchpath(patch["file"])) + f = open(os.path.join(self.dir, "patches","series"), "a"); + f.write(os.path.basename(patch["file"]) + " -p" + patch["strippath"]+"\n") + f.close() patch["quiltfile"] = self._quiltpatchpath(patch["file"]) patch["quiltfilemd5"] = bb.utils.md5_file(patch["quiltfile"]) diff --git a/lib/oe/path.py b/lib/oe/path.py index 8902951581..a145456659 100644 --- a/lib/oe/path.py +++ b/lib/oe/path.py @@ -42,3 +42,14 @@ def format_display(path, metadata): return path else: return rel + +def remove(path): + """Equivalent to rm -f or rm -rf""" + import os, errno, shutil + try: + os.unlink(path) + except OSError, exc: + if exc.errno == errno.EISDIR: + shutil.rmtree(path) + elif exc.errno != errno.ENOENT: + raise |