* [PATCH 0/1] license.bbclass: hardlink requires write permission
@ 2014-11-13 7:55 Robert Yang
2014-11-13 7:55 ` [PATCH 1/1] " Robert Yang
2014-12-19 7:53 ` [PATCH 0/1] " Robert Yang
0 siblings, 2 replies; 3+ messages in thread
From: Robert Yang @ 2014-11-13 7:55 UTC (permalink / raw)
To: openembedded-core
The following changes since commit e7b731a1a358e0007dba1038ad504888bec5916e:
docbook-xsl-stylesheets: fix do_configure typo (2014-11-12 15:36:14 +0000)
are available in the git repository at:
git://git.openembedded.org/openembedded-core-contrib rbt/license
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=rbt/license
Robert Yang (1):
license.bbclass: hardlink requires write permission
meta/classes/license.bbclass | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--
1.7.9.5
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 1/1] license.bbclass: hardlink requires write permission
2014-11-13 7:55 [PATCH 0/1] license.bbclass: hardlink requires write permission Robert Yang
@ 2014-11-13 7:55 ` Robert Yang
2014-12-19 7:53 ` [PATCH 0/1] " Robert Yang
1 sibling, 0 replies; 3+ messages in thread
From: Robert Yang @ 2014-11-13 7:55 UTC (permalink / raw)
To: openembedded-core
Fixed:
* The os.link() reqiures write permission on the src file (suppose the
src file belongs to another user, then you need write permission to harlink to
it since the link count would change)
* Print more info when failed to copy
The warning was like:
WARNING: Could not copy license file COPYING: [Errno 1] Operation not permitted
We couldn't know which recipe print the warning from this message.
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
meta/classes/license.bbclass | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/meta/classes/license.bbclass b/meta/classes/license.bbclass
index 14d3107..1f42fd3 100644
--- a/meta/classes/license.bbclass
+++ b/meta/classes/license.bbclass
@@ -149,12 +149,12 @@ def copy_license_files(lic_files_paths, destdir):
dst = os.path.join(destdir, basename)
if os.path.exists(dst):
os.remove(dst)
- if (os.stat(src).st_dev == os.stat(destdir).st_dev):
+ if os.access(src, os.W_OK) and (os.stat(src).st_dev == os.stat(destdir).st_dev):
os.link(src, dst)
else:
shutil.copyfile(src, dst)
except Exception as e:
- bb.warn("Could not copy license file %s: %s" % (basename, e))
+ bb.warn("Could not copy license file %s to %s: %s" % (src, dst, e))
def find_license_files(d):
"""
--
1.7.9.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 0/1] license.bbclass: hardlink requires write permission
2014-11-13 7:55 [PATCH 0/1] license.bbclass: hardlink requires write permission Robert Yang
2014-11-13 7:55 ` [PATCH 1/1] " Robert Yang
@ 2014-12-19 7:53 ` Robert Yang
1 sibling, 0 replies; 3+ messages in thread
From: Robert Yang @ 2014-12-19 7:53 UTC (permalink / raw)
To: openembedded-core
Ping.
// Robert
On 11/13/2014 03:55 PM, Robert Yang wrote:
> The following changes since commit e7b731a1a358e0007dba1038ad504888bec5916e:
>
> docbook-xsl-stylesheets: fix do_configure typo (2014-11-12 15:36:14 +0000)
>
> are available in the git repository at:
>
> git://git.openembedded.org/openembedded-core-contrib rbt/license
> http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=rbt/license
>
> Robert Yang (1):
> license.bbclass: hardlink requires write permission
>
> meta/classes/license.bbclass | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-12-19 7:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-13 7:55 [PATCH 0/1] license.bbclass: hardlink requires write permission Robert Yang
2014-11-13 7:55 ` [PATCH 1/1] " Robert Yang
2014-12-19 7:53 ` [PATCH 0/1] " Robert Yang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox