|
@@ -183,23 +183,16 @@ python base_do_unpack() {
|
|
|
|
|
|
basedir = None
|
|
|
unpackdir = d.getVar('UNPACKDIR')
|
|
|
- workdir = d.getVar('WORKDIR')
|
|
|
- if sourcedir.startswith(workdir) and not sourcedir.startswith(unpackdir):
|
|
|
- basedir = sourcedir.replace(workdir, '').strip("/").split('/')[0]
|
|
|
+ if sourcedir.startswith(unpackdir):
|
|
|
+ basedir = sourcedir.replace(unpackdir, '').strip("/").split('/')[0]
|
|
|
if basedir:
|
|
|
- bb.utils.remove(workdir + '/' + basedir, True)
|
|
|
- d.setVar("SOURCE_BASEDIR", workdir + '/' + basedir)
|
|
|
+ d.setVar("SOURCE_BASEDIR", unpackdir + '/' + basedir)
|
|
|
|
|
|
try:
|
|
|
fetcher = bb.fetch2.Fetch(src_uri, d)
|
|
|
fetcher.unpack(d.getVar('UNPACKDIR'))
|
|
|
except bb.fetch2.BBFetchException as e:
|
|
|
bb.fatal("Bitbake Fetcher Error: " + repr(e))
|
|
|
-
|
|
|
- if basedir and os.path.exists(unpackdir + '/' + basedir):
|
|
|
- # Compatibility magic to ensure ${WORKDIR}/git and ${WORKDIR}/${BP}
|
|
|
- # as often used in S work as expected.
|
|
|
- shutil.move(unpackdir + '/' + basedir, workdir + '/' + basedir)
|
|
|
}
|
|
|
|
|
|
SSTATETASKS += "do_deploy_source_date_epoch"
|