From 2650645237555cc24c532a4c9ccd81d8c01bcaf7 Mon Sep 17 00:00:00 2001 From: "nslu2-linux.adm@bkbits.net" Date: Tue, 18 Jan 2005 01:01:16 +0000 Subject: 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 --- classes/base.bbclass | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'classes') 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: -- cgit v1.2.3