summaryrefslogtreecommitdiff
path: root/classes/patch.bbclass
diff options
context:
space:
mode:
authorGraeme Gregory <dp@xora.org.uk>2009-11-18 09:15:55 +0000
committerGraeme Gregory <dp@xora.org.uk>2009-11-18 09:15:55 +0000
commit15387c72d5cf1a77a5a0afa6750dae73a8dbc12f (patch)
treeab55e077002322c8f245c79c87c6a6f2f7b0ed2e /classes/patch.bbclass
parent7f3d2b172af63fc894f80eece075434b2c5fbbc5 (diff)
parente4e52ba358c094952ec868d32524a26dfa4bae89 (diff)
Merge branch 'org.openembedded.dev' of git+ssh://git@git.openembedded.org/openembedded into org.openembedded.dev
Diffstat (limited to 'classes/patch.bbclass')
-rw-r--r--classes/patch.bbclass7
1 files changed, 2 insertions, 5 deletions
diff --git a/classes/patch.bbclass b/classes/patch.bbclass
index bb49fed7a1..33184df0d0 100644
--- a/classes/patch.bbclass
+++ b/classes/patch.bbclass
@@ -4,8 +4,6 @@
QUILTRCFILE ?= "${STAGING_BINDIR_NATIVE}/quiltrc"
def patch_init(d):
- import os, sys
-
class NotFoundError(Exception):
def __init__(self, path):
self.path = path
@@ -13,8 +11,6 @@ def patch_init(d):
return "Error: %s not found." % self.path
def md5sum(fname):
- import sys
-
# when we move to Python 2.5 as minimal supported
# we can kill that try/except as hashlib is 2.5+
try:
@@ -251,6 +247,7 @@ def patch_init(d):
try:
output = runcmd(["quilt", "applied"], self.dir)
except CmdError:
+ import sys
if sys.exc_value.output.strip() == "No patches applied":
return
else:
@@ -364,6 +361,7 @@ def patch_init(d):
try:
self.patchset.Push()
except Exception:
+ import sys
os.chdir(olddir)
raise sys.exc_value
@@ -454,7 +452,6 @@ PATCHDEPENDENCY = "${PATCHTOOL}-native:do_populate_staging"
do_patch[depends] = "${PATCHDEPENDENCY}"
python patch_do_patch() {
- import re
patch_init(d)
src_uri = (bb.data.getVar('SRC_URI', d, 1) or '').split()