archiver.bbclass: Fix archiver for gcc packages using patched sources
PATCH 1/1 archiver.bbclass: Fix archiver for gcc packages using patched sources
In reply to a message not in the archivegcc packages use a shared source directory, this causes an issue since the archiver will try to patch the same source several times (one for each gcc package), producing an error, the archiver class used stamp-base to check this, nonetheless our gcc packages no longer use stamp-base, they use gcc-shared instead, which is what broke this functionality this patch adds a check to see whether or not the source should be patched, avoiding patching the source when it shouldnt.
[YOCTO #8378]
--- meta/classes/archiver.bbclass | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
meta/classes/archiver.bbclass +3 -1
@@ -270,7 +270,9 @@ python do_unpack_and_patch() { src = d.getVar('S', True).rstrip('/') src_orig = '%s.orig' % src oe.path.copytree(src, src_orig) - bb.build.exec_func('do_patch', d) + # Special case for gcc-shared packages + if d.getVar('SRC_URI', True) != "": + bb.build.exec_func('do_patch', d) # Create the patches if d.getVarFlag('ARCHIVER_MODE', 'diff', True) == '1': bb.note('Creating diff gz...')
Signature · 1 line
1.8.4.5
Quoted 7 lines · Alejandro Hernandez
gcc packages use a shared source directory, this causes an issue since the archiver will try to patch the same source several times (one for each gcc package), producing an error, the archiver class used stamp-base to check this, nonetheless our gcc packages no longer use stamp-base, they use gcc-shared instead, which is what broke this functionality this patch adds a check to see whether or not the source should be patched, avoiding patching the source when it shouldnt.
Surely the source archiver shouldn't be doing *anything* if SRC_URI is empty?
We don't need 20 copies of the gcc source code.
Cheers,
Richard