summaryrefslogtreecommitdiffstats
path: root/meta/classes/base.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes/base.bbclass')
-rw-r--r--meta/classes/base.bbclass17
1 files changed, 13 insertions, 4 deletions
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index de50be1d5b..789af3b10b 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -113,7 +113,6 @@ python base_do_fetch() {
113 113
114addtask unpack after do_fetch 114addtask unpack after do_fetch
115do_unpack[dirs] = "${WORKDIR}" 115do_unpack[dirs] = "${WORKDIR}"
116do_unpack[cleandirs] = "${S}/patches"
117python base_do_unpack() { 116python base_do_unpack() {
118 src_uri = (d.getVar('SRC_URI', True) or "").split() 117 src_uri = (d.getVar('SRC_URI', True) or "").split()
119 if len(src_uri) == 0: 118 if len(src_uri) == 0:
@@ -121,11 +120,21 @@ python base_do_unpack() {
121 120
122 rootdir = d.getVar('WORKDIR', True) 121 rootdir = d.getVar('WORKDIR', True)
123 122
123 # Ensure that we cleanup ${S}/patches
124 # TODO: Investigate if we can remove
125 # the entire ${S} in this case.
126 s_dir = d.getVar('S', True)
127 p_dir = os.path.join(s_dir, 'patches')
128 bb.utils.remove(p_dir, True)
129
124 try: 130 try:
125 fetcher = bb.fetch2.Fetch(src_uri, d) 131 fetcher = bb.fetch2.Fetch(src_uri, d)
126 fetcher.unpack(rootdir) 132 fetcher.unpack(rootdir)
127 except bb.fetch2.BBFetchException as e: 133 except bb.fetch2.BBFetchException as e:
128 raise bb.build.FuncFailed(e) 134 raise bb.build.FuncFailed(e)
135
136 if not os.path.exists(s_dir):
137 bb.warn("%s ('S') don't exist, you must set 'S' to a proper value" % s_dir)
129} 138}
130 139
131def pkgarch_mapping(d): 140def pkgarch_mapping(d):
@@ -220,7 +229,7 @@ CONFIGURESTAMPFILE = "${WORKDIR}/configure.sstate"
220CLEANBROKEN = "0" 229CLEANBROKEN = "0"
221 230
222addtask configure after do_patch 231addtask configure after do_patch
223do_configure[dirs] = "${S} ${B}" 232do_configure[dirs] = "${B}"
224do_configure[deptask] = "do_populate_sysroot" 233do_configure[deptask] = "do_populate_sysroot"
225base_do_configure() { 234base_do_configure() {
226 if [ -n "${CONFIGURESTAMPFILE}" -a -e "${CONFIGURESTAMPFILE}" ]; then 235 if [ -n "${CONFIGURESTAMPFILE}" -a -e "${CONFIGURESTAMPFILE}" ]; then
@@ -238,7 +247,7 @@ base_do_configure() {
238} 247}
239 248
240addtask compile after do_configure 249addtask compile after do_configure
241do_compile[dirs] = "${S} ${B}" 250do_compile[dirs] = "${B}"
242base_do_compile() { 251base_do_compile() {
243 if [ -e Makefile -o -e makefile -o -e GNUmakefile ]; then 252 if [ -e Makefile -o -e makefile -o -e GNUmakefile ]; then
244 oe_runmake || die "make failed" 253 oe_runmake || die "make failed"
@@ -248,7 +257,7 @@ base_do_compile() {
248} 257}
249 258
250addtask install after do_compile 259addtask install after do_compile
251do_install[dirs] = "${D} ${S} ${B}" 260do_install[dirs] = "${D} ${B}"
252# Remove and re-create ${D} so that is it guaranteed to be empty 261# Remove and re-create ${D} so that is it guaranteed to be empty
253do_install[cleandirs] = "${D}" 262do_install[cleandirs] = "${D}"
254 263