All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/1] gen-lockedsig-cache: catch os.link error V2
@ 2017-03-17 12:49 brian avery
  2017-03-17 12:49 ` [PATCH 1/1] " brian avery
  2017-03-17 21:32 ` [PATCH 0/1] " Peter Kjellerstedt
  0 siblings, 2 replies; 4+ messages in thread
From: brian avery @ 2017-03-17 12:49 UTC (permalink / raw)
  To: openembedded-core

If your sstate-cache directory is on a different filesystem from the one your build is on, gen-lockedsig-cache fails which causes the esdk creation to fail. This catches the hard link failure and does a copy in those cases.

This is a V2 because I took a copy/paste shortcut when I sent in the last one and that went as well as I should have expected. This one is sent from the machine it was tested on... My bad :(.

-brian


The following changes since commit 7e0985bab68547f946163828a16beab7542fca2e:

  nativesdk-packagegroup-sdk-host.bb: add cmake (2017-03-17 16:53:06 +0000)

are available in the git repository at:

  git://git.yoctoproject.org/poky-contrib bavery/gen-sigs-linkfix
  http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=bavery/gen-sigs-linkfix

brian avery (1):
  gen-lockedsig-cache: catch os.link error

 scripts/gen-lockedsig-cache | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

--
2.7.4


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

* [PATCH 1/1] gen-lockedsig-cache: catch os.link error V2
  2017-03-17 12:49 [PATCH 0/1] gen-lockedsig-cache: catch os.link error V2 brian avery
@ 2017-03-17 12:49 ` brian avery
  2017-03-17 21:32 ` [PATCH 0/1] " Peter Kjellerstedt
  1 sibling, 0 replies; 4+ messages in thread
From: brian avery @ 2017-03-17 12:49 UTC (permalink / raw)
  To: openembedded-core

We do a hard link to speed up sdk creation but if your sstate-cache is
across a file system boundary, this tries and fails. This patch catches
that error and does a copy instead.

Signed-off-by: brian avery <brian.avery@intel.com>
---
 scripts/gen-lockedsig-cache | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/scripts/gen-lockedsig-cache b/scripts/gen-lockedsig-cache
index 49de74ed..6765891 100755
--- a/scripts/gen-lockedsig-cache
+++ b/scripts/gen-lockedsig-cache
@@ -62,7 +62,11 @@ for f in files:
         os.remove(dst)
     if (os.stat(src).st_dev == os.stat(destdir).st_dev):
         print('linking')
-        os.link(src, dst)
+        try:
+            os.link(src, dst)
+        except OSError as e:
+            print('hard linking failed, copying')
+            shutil.copyfile(src, dst)
     else:
         print('copying')
         shutil.copyfile(src, dst)
--
2.7.4


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

* Re: [PATCH 0/1] gen-lockedsig-cache: catch os.link error V2
  2017-03-17 12:49 [PATCH 0/1] gen-lockedsig-cache: catch os.link error V2 brian avery
  2017-03-17 12:49 ` [PATCH 1/1] " brian avery
@ 2017-03-17 21:32 ` Peter Kjellerstedt
  2017-03-19 17:32   ` Brian Avery
  1 sibling, 1 reply; 4+ messages in thread
From: Peter Kjellerstedt @ 2017-03-17 21:32 UTC (permalink / raw)
  To: brian avery, openembedded-core

> -----Original Message-----
> From: openembedded-core-bounces@lists.openembedded.org
> [mailto:openembedded-core-bounces@lists.openembedded.org] On Behalf Of
> brian avery
> Sent: den 17 mars 2017 13:50
> To: openembedded-core@lists.openembedded.org
> Subject: [OE-core] [PATCH 0/1] gen-lockedsig-cache: catch os.link error V2
> 
> If your sstate-cache directory is on a different filesystem from the
> one your build is on, gen-lockedsig-cache fails which causes the esdk
> creation to fail. This catches the hard link failure and does a copy in
> those cases.
> 
> This is a V2 because I took a copy/paste shortcut when I sent in the
> last one and that went as well as I should have expected. This one is
> sent from the machine it was tested on... My bad :(.

Do not make the "V2" part of the subject, make it part of the PATCH 
prefix, e.g.:

  [PATCH v2 0/1] gen-lockedsig-cache: catch os.link error

Otherwise it will become part of the commit message where it does not 
make any sense (since there obviously is no V1 committed...)

> -brian

//Peter



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

* Re: [PATCH 0/1] gen-lockedsig-cache: catch os.link error V2
  2017-03-17 21:32 ` [PATCH 0/1] " Peter Kjellerstedt
@ 2017-03-19 17:32   ` Brian Avery
  0 siblings, 0 replies; 4+ messages in thread
From: Brian Avery @ 2017-03-19 17:32 UTC (permalink / raw)
  To: Peter Kjellerstedt; +Cc: openembedded-core

[-- Attachment #1: Type: text/plain, Size: 1507 bytes --]

Thanks!
resubmitted as [PATCH V3 x/y] .
-b
an intel employee

On Fri, Mar 17, 2017 at 2:32 PM, Peter Kjellerstedt <
peter.kjellerstedt@axis.com> wrote:

> > -----Original Message-----
> > From: openembedded-core-bounces@lists.openembedded.org
> > [mailto:openembedded-core-bounces@lists.openembedded.org] On Behalf Of
> > brian avery
> > Sent: den 17 mars 2017 13:50
> > To: openembedded-core@lists.openembedded.org
> > Subject: [OE-core] [PATCH 0/1] gen-lockedsig-cache: catch os.link error
> V2
> >
> > If your sstate-cache directory is on a different filesystem from the
> > one your build is on, gen-lockedsig-cache fails which causes the esdk
> > creation to fail. This catches the hard link failure and does a copy in
> > those cases.
> >
> > This is a V2 because I took a copy/paste shortcut when I sent in the
> > last one and that went as well as I should have expected. This one is
> > sent from the machine it was tested on... My bad :(.
>
> Do not make the "V2" part of the subject, make it part of the PATCH
> prefix, e.g.:
>
>   [PATCH v2 0/1] gen-lockedsig-cache: catch os.link error
>
> Otherwise it will become part of the commit message where it does not
> make any sense (since there obviously is no V1 committed...)
>
> > -brian
>
> //Peter
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>

[-- Attachment #2: Type: text/html, Size: 2503 bytes --]

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

end of thread, other threads:[~2017-03-19 17:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-17 12:49 [PATCH 0/1] gen-lockedsig-cache: catch os.link error V2 brian avery
2017-03-17 12:49 ` [PATCH 1/1] " brian avery
2017-03-17 21:32 ` [PATCH 0/1] " Peter Kjellerstedt
2017-03-19 17:32   ` Brian Avery

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.