def _get_srctree(tmpdir):
srctree = tmpdir
- dirs = scriptutils.filter_src_subdirs(tmpdir)
+ dirs = os.listdir(tmpdir)
if len(dirs) == 1:
srctree = os.path.join(tmpdir, dirs[0])
else:
if ftmpdir and args.keep_temp:
logger.info('Fetch temp directory is %s' % ftmpdir)
- dirlist = scriptutils.filter_src_subdirs(srctree)
+ dirlist = os.listdir(srctree)
logger.debug('Directory listing (excluding filtered out):\n %s' % '\n '.join(dirlist))
if len(dirlist) == 1:
singleitem = os.path.join(srctree, dirlist[0])
f.write('SRCREV = "%s"\n' % srcrev)
f.write('PV = "0.0+"\n')
f.write('WORKDIR = "%s"\n' % tmpworkdir)
+ f.write('UNPACKDIR = "%s"\n' % destdir)
+
# Set S out of the way so it doesn't get created under the workdir
f.write('S = "%s"\n' % os.path.join(tmpdir, 'emptysrc'))
if not mirrors:
if e.errno != errno.ENOTEMPTY:
raise
- bb.utils.mkdirhier(destdir)
- for fn in os.listdir(tmpworkdir):
- shutil.move(os.path.join(tmpworkdir, fn), destdir)
-
finally:
if not preserve_tmp:
shutil.rmtree(tmpdir)
return True
return False
-def filter_src_subdirs(pth):
- """
- Filter out subdirectories of initial unpacked source trees that we do not care about.
- Used by devtool and recipetool.
- """
- dirlist = os.listdir(pth)
- filterout = ['git.indirectionsymlink', 'source-date-epoch', 'sstate-install-recipe_qa']
- dirlist = [x for x in dirlist if x not in filterout]
- return dirlist