diff options
author | nslu2-linux.adm@bkbits.net <nslu2-linux.adm@bkbits.net> | 2005-01-18 01:01:16 +0000 |
---|---|---|
committer | nslu2-linux.adm@bkbits.net <nslu2-linux.adm@bkbits.net> | 2005-01-18 01:01:16 +0000 |
commit | 2650645237555cc24c532a4c9ccd81d8c01bcaf7 (patch) | |
tree | 297cb8213bb881f96893b6246a623718af50a8e1 /classes | |
parent | 6e012296c2dc513ae301654b3d4d3eb826068c81 (diff) |
Merge bk://oe-devel.bkbits.net/openembedded
into bkbits.net:/repos/n/nslu2-linux/openembedded
2005/01/17 19:01:15-06:00 ti.com!kergoth
Move 'patcher-native' into a PATCH_DEPENDS variable.
2005/01/17 18:35:01-06:00 ti.com!kergoth
Teach base_do_patch to unapply all the patches before it starts applying things. This ensures that a patch being 'already applied' isn't a problem.
BKrev: 41ec5fdcZyPXKe57f5FM3PpA19zcww
Diffstat (limited to 'classes')
-rw-r--r-- | classes/base.bbclass | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/classes/base.bbclass b/classes/base.bbclass index 47720464f9..886f25664b 100644 --- a/classes/base.bbclass +++ b/classes/base.bbclass @@ -8,8 +8,15 @@ def base_dep_prepend(d): # that case though. # deps = "" + + # INHIBIT_DEFAULT_DEPS doesn't apply to the patch command. Whether or not + # we need that built is the responsibility of the patch function / class, not + # the application. + patchdeps = bb.data.getVar("PATCH_DEPENDS", d, 1) + if patchdeps and not patchdeps in bb.data.getVar("PROVIDES", d, 1): + deps = patchdeps + if not bb.data.getVar('INHIBIT_DEFAULT_DEPS', d): - deps += "patcher-native" if (bb.data.getVar('HOST_SYS', d, 1) != bb.data.getVar('BUILD_SYS', d, 1)): deps += " virtual/${TARGET_PREFIX}gcc virtual/libc " @@ -408,6 +415,15 @@ python base_do_patch() { import bb.fetch src_uri = (bb.data.getVar('SRC_URI', d, 1) or '').split() + if not src_uri: + return + + patchcleancmd = bb.data.getVar('PATCHCLEANCMD', d, 1) + if patchcleancmd: + bb.data.setVar("do_patchcleancmd", patchcleancmd, d) + bb.data.setVarFlag("do_patchcleancmd", "func", 1, d) + bb.build.exec_func("do_patchcleancmd", d) + workdir = bb.data.getVar('WORKDIR', d, 1) for url in src_uri: |