Remove build path from patchdir, file name will change from
series.subdir._master_build_tmp_work_corei7-64-wrs-linux_thin-provisioning-tools_1.1.0_sources_cargo_home_bitbake_libc-0.2.155
to
series.subdir._sources_cargo_home_bitbake_libc-0.2.155.
This can also avoid the following error when the build path is long:
File: '/layers/oe-core/meta/classes/archiver.bbclass', lineno: 262, function: do_ar_original
0258: series = os.path.join(ar_outdir, 'series')
*** 0262: with open(series, 'a') as s:
0263: s.write('%s -p%s\n' % (os.path.basename(local), parm['striplevel']))
Exception: OSError: [Errno 36] File name too long: '/path/to/series.subdir._path_to_tmp_work_x86-64-v3-wrs-linux_thin-provisioning-tools_1.1.0_sources_cargo_home_bitbake_libc-0.2.155'
Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
_, _, local, _, _, parm = bb.fetch.decodeurl(patch)
patchdir = parm.get('patchdir')
if patchdir:
- series = os.path.join(ar_outdir, 'series.subdir.%s' % patchdir.replace('/', '_'))
+ series = os.path.join(ar_outdir, 'series.subdir.%s' % patchdir.replace(d.getVar('WORKDIR'), '').replace('/', '_'))
else:
series = os.path.join(ar_outdir, 'series')