diff options
Diffstat (limited to 'meta/classes/patch.bbclass')
-rw-r--r-- | meta/classes/patch.bbclass | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/meta/classes/patch.bbclass b/meta/classes/patch.bbclass index 86046e1ff8..b2b6d976c5 100644 --- a/meta/classes/patch.bbclass +++ b/meta/classes/patch.bbclass | |||
@@ -10,7 +10,7 @@ inherit terminal | |||
10 | python patch_do_patch() { | 10 | python patch_do_patch() { |
11 | import oe.patch | 11 | import oe.patch |
12 | 12 | ||
13 | src_uri = (bb.data.getVar('SRC_URI', d, 1) or '').split() | 13 | src_uri = (d.getVar('SRC_URI', 1) or '').split() |
14 | if not src_uri: | 14 | if not src_uri: |
15 | return | 15 | return |
16 | 16 | ||
@@ -20,23 +20,23 @@ python patch_do_patch() { | |||
20 | "git": oe.patch.GitApplyTree, | 20 | "git": oe.patch.GitApplyTree, |
21 | } | 21 | } |
22 | 22 | ||
23 | cls = patchsetmap[bb.data.getVar('PATCHTOOL', d, 1) or 'quilt'] | 23 | cls = patchsetmap[d.getVar('PATCHTOOL', 1) or 'quilt'] |
24 | 24 | ||
25 | resolvermap = { | 25 | resolvermap = { |
26 | "noop": oe.patch.NOOPResolver, | 26 | "noop": oe.patch.NOOPResolver, |
27 | "user": oe.patch.UserResolver, | 27 | "user": oe.patch.UserResolver, |
28 | } | 28 | } |
29 | 29 | ||
30 | rcls = resolvermap[bb.data.getVar('PATCHRESOLVE', d, 1) or 'user'] | 30 | rcls = resolvermap[d.getVar('PATCHRESOLVE', 1) or 'user'] |
31 | 31 | ||
32 | s = bb.data.getVar('S', d, 1) | 32 | s = d.getVar('S', 1) |
33 | 33 | ||
34 | path = os.getenv('PATH') | 34 | path = os.getenv('PATH') |
35 | os.putenv('PATH', bb.data.getVar('PATH', d, 1)) | 35 | os.putenv('PATH', d.getVar('PATH', 1)) |
36 | 36 | ||
37 | classes = {} | 37 | classes = {} |
38 | 38 | ||
39 | workdir = bb.data.getVar('WORKDIR', d, 1) | 39 | workdir = d.getVar('WORKDIR', 1) |
40 | for url in src_uri: | 40 | for url in src_uri: |
41 | (type, host, path, user, pswd, parm) = bb.decodeurl(url) | 41 | (type, host, path, user, pswd, parm) = bb.decodeurl(url) |
42 | 42 | ||
@@ -76,13 +76,13 @@ python patch_do_patch() { | |||
76 | pname = os.path.basename(local) | 76 | pname = os.path.basename(local) |
77 | 77 | ||
78 | if "mindate" in parm or "maxdate" in parm: | 78 | if "mindate" in parm or "maxdate" in parm: |
79 | pn = bb.data.getVar('PN', d, 1) | 79 | pn = d.getVar('PN', 1) |
80 | srcdate = bb.data.getVar('SRCDATE_%s' % pn, d, 1) | 80 | srcdate = d.getVar('SRCDATE_%s' % pn, 1) |
81 | if not srcdate: | 81 | if not srcdate: |
82 | srcdate = bb.data.getVar('SRCDATE', d, 1) | 82 | srcdate = d.getVar('SRCDATE', 1) |
83 | 83 | ||
84 | if srcdate == "now": | 84 | if srcdate == "now": |
85 | srcdate = bb.data.getVar('DATE', d, 1) | 85 | srcdate = d.getVar('DATE', 1) |
86 | 86 | ||
87 | if "maxdate" in parm and parm["maxdate"] < srcdate: | 87 | if "maxdate" in parm and parm["maxdate"] < srcdate: |
88 | bb.note("Patch '%s' is outdated" % pname) | 88 | bb.note("Patch '%s' is outdated" % pname) |
@@ -94,25 +94,25 @@ python patch_do_patch() { | |||
94 | 94 | ||
95 | 95 | ||
96 | if "minrev" in parm: | 96 | if "minrev" in parm: |
97 | srcrev = bb.data.getVar('SRCREV', d, 1) | 97 | srcrev = d.getVar('SRCREV', 1) |
98 | if srcrev and srcrev < parm["minrev"]: | 98 | if srcrev and srcrev < parm["minrev"]: |
99 | bb.note("Patch '%s' applies to later revisions" % pname) | 99 | bb.note("Patch '%s' applies to later revisions" % pname) |
100 | continue | 100 | continue |
101 | 101 | ||
102 | if "maxrev" in parm: | 102 | if "maxrev" in parm: |
103 | srcrev = bb.data.getVar('SRCREV', d, 1) | 103 | srcrev = d.getVar('SRCREV', 1) |
104 | if srcrev and srcrev > parm["maxrev"]: | 104 | if srcrev and srcrev > parm["maxrev"]: |
105 | bb.note("Patch '%s' applies to earlier revisions" % pname) | 105 | bb.note("Patch '%s' applies to earlier revisions" % pname) |
106 | continue | 106 | continue |
107 | 107 | ||
108 | if "rev" in parm: | 108 | if "rev" in parm: |
109 | srcrev = bb.data.getVar('SRCREV', d, 1) | 109 | srcrev = d.getVar('SRCREV', 1) |
110 | if srcrev and parm["rev"] not in srcrev: | 110 | if srcrev and parm["rev"] not in srcrev: |
111 | bb.note("Patch '%s' doesn't apply to revision" % pname) | 111 | bb.note("Patch '%s' doesn't apply to revision" % pname) |
112 | continue | 112 | continue |
113 | 113 | ||
114 | if "notrev" in parm: | 114 | if "notrev" in parm: |
115 | srcrev = bb.data.getVar('SRCREV', d, 1) | 115 | srcrev = d.getVar('SRCREV', 1) |
116 | if srcrev and parm["notrev"] in srcrev: | 116 | if srcrev and parm["notrev"] in srcrev: |
117 | bb.note("Patch '%s' doesn't apply to revision" % pname) | 117 | bb.note("Patch '%s' doesn't apply to revision" % pname) |
118 | continue | 118 | continue |