diff options
-rw-r--r-- | meta/classes/base.bbclass | 17 |
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 | ||
114 | addtask unpack after do_fetch | 114 | addtask unpack after do_fetch |
115 | do_unpack[dirs] = "${WORKDIR}" | 115 | do_unpack[dirs] = "${WORKDIR}" |
116 | do_unpack[cleandirs] = "${S}/patches" | ||
117 | python base_do_unpack() { | 116 | python 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 | ||
131 | def pkgarch_mapping(d): | 140 | def pkgarch_mapping(d): |
@@ -220,7 +229,7 @@ CONFIGURESTAMPFILE = "${WORKDIR}/configure.sstate" | |||
220 | CLEANBROKEN = "0" | 229 | CLEANBROKEN = "0" |
221 | 230 | ||
222 | addtask configure after do_patch | 231 | addtask configure after do_patch |
223 | do_configure[dirs] = "${S} ${B}" | 232 | do_configure[dirs] = "${B}" |
224 | do_configure[deptask] = "do_populate_sysroot" | 233 | do_configure[deptask] = "do_populate_sysroot" |
225 | base_do_configure() { | 234 | base_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 | ||
240 | addtask compile after do_configure | 249 | addtask compile after do_configure |
241 | do_compile[dirs] = "${S} ${B}" | 250 | do_compile[dirs] = "${B}" |
242 | base_do_compile() { | 251 | base_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 | ||
250 | addtask install after do_compile | 259 | addtask install after do_compile |
251 | do_install[dirs] = "${D} ${S} ${B}" | 260 | do_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 |
253 | do_install[cleandirs] = "${D}" | 262 | do_install[cleandirs] = "${D}" |
254 | 263 | ||