Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 1/1] archiver.bbclass: Fix archiver for gcc packages using patched sources
       [not found] <cover.1443548707.git.alejandro.hernandez@linux.intel.com>
@ 2015-09-29 17:45 ` Alejandro Hernandez
  2015-09-29 22:55   ` Richard Purdie
  0 siblings, 1 reply; 2+ messages in thread
From: Alejandro Hernandez @ 2015-09-29 17:45 UTC (permalink / raw)
  To: openembedded-core

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]

Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
---
 meta/classes/archiver.bbclass | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/meta/classes/archiver.bbclass b/meta/classes/archiver.bbclass
index eec8024..c3e0f43 100644
--- a/meta/classes/archiver.bbclass
+++ b/meta/classes/archiver.bbclass
@@ -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...')
-- 
1.8.4.5



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 1/1] archiver.bbclass: Fix archiver for gcc packages using patched sources
  2015-09-29 17:45 ` [PATCH 1/1] archiver.bbclass: Fix archiver for gcc packages using patched sources Alejandro Hernandez
@ 2015-09-29 22:55   ` Richard Purdie
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Purdie @ 2015-09-29 22:55 UTC (permalink / raw)
  To: Alejandro Hernandez; +Cc: openembedded-core

On Tue, 2015-09-29 at 17:45 +0000, Alejandro Hernandez wrote:
> 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



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-09-29 22:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <cover.1443548707.git.alejandro.hernandez@linux.intel.com>
2015-09-29 17:45 ` [PATCH 1/1] archiver.bbclass: Fix archiver for gcc packages using patched sources Alejandro Hernandez
2015-09-29 22:55   ` Richard Purdie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox