Skip to contentSkip to conversation

archiver.bbclass: Fix archiver for gcc packages using patched sources

PATCH In review Alejandro Hernandez 2 participants 2 messages Sep 29, 2015 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

PATCH 1/1 archiver.bbclass: Fix archiver for gcc packages using patched sources

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.

[YOCTO #8378]

---
 meta/classes/archiver.bbclass | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
meta/classes/archiver.bbclass +3 -1
index eec8024..c3e0f43 100644
@@ -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
#2 lore raw
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