* [PATCH 0/2] Fixes for devtool update-recipe
@ 2016-11-03 2:53 Paul Eggleton
2016-11-03 2:53 ` [PATCH 1/2] devtool: update-recipe: decode output before treating it as a string Paul Eggleton
2016-11-03 2:53 ` [PATCH 2/2] lib/oe/recipeutils: print just filename in bbappend_recipe() if in temp dir Paul Eggleton
0 siblings, 2 replies; 4+ messages in thread
From: Paul Eggleton @ 2016-11-03 2:53 UTC (permalink / raw)
To: openembedded-core
The following changes since commit 98c6ebf1e05158c689e01b785d32757847cdb10c:
oeqa/selftest/kernel.py: Add new file destined for kernel related tests (2016-11-01 10:05:40 +0000)
are available in the git repository at:
git://git.openembedded.org/openembedded-core-contrib paule/devtool-update-recipe
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=paule/devtool-update-recipe
Paul Eggleton (2):
devtool: update-recipe: decode output before treating it as a string
lib/oe/recipeutils: print just filename in bbappend_recipe() if in temp dir
meta/lib/oe/recipeutils.py | 6 +++++-
scripts/lib/devtool/standard.py | 1 +
2 files changed, 6 insertions(+), 1 deletion(-)
--
2.5.5
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/2] devtool: update-recipe: decode output before treating it as a string
2016-11-03 2:53 [PATCH 0/2] Fixes for devtool update-recipe Paul Eggleton
@ 2016-11-03 2:53 ` Paul Eggleton
2016-11-03 8:18 ` Paul Eggleton
2016-11-03 2:53 ` [PATCH 2/2] lib/oe/recipeutils: print just filename in bbappend_recipe() if in temp dir Paul Eggleton
1 sibling, 1 reply; 4+ messages in thread
From: Paul Eggleton @ 2016-11-03 2:53 UTC (permalink / raw)
To: openembedded-core
When you receive output from subprocess, with Python 3 it's a stream of
bytes so you need to decode it before you can start treating it as a
string.
Fixes [YOCTO #10447].
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
scripts/lib/devtool/standard.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py
index 4eff6f8..32eac23 100644
--- a/scripts/lib/devtool/standard.py
+++ b/scripts/lib/devtool/standard.py
@@ -331,6 +331,7 @@ def _git_ls_tree(repodir, treeish='HEAD', recursive=False):
cmd.append('-r')
out, _ = bb.process.run(cmd, cwd=repodir)
ret = {}
+ out = out.decode('utf-8')
for line in out.split('\0'):
if line:
split = line.split(None, 4)
--
2.5.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] lib/oe/recipeutils: print just filename in bbappend_recipe() if in temp dir
2016-11-03 2:53 [PATCH 0/2] Fixes for devtool update-recipe Paul Eggleton
2016-11-03 2:53 ` [PATCH 1/2] devtool: update-recipe: decode output before treating it as a string Paul Eggleton
@ 2016-11-03 2:53 ` Paul Eggleton
1 sibling, 0 replies; 4+ messages in thread
From: Paul Eggleton @ 2016-11-03 2:53 UTC (permalink / raw)
To: openembedded-core
If you use devtool update-recipe with the --append option, and a "local"
(in oe-local-files) has been modified we copy it into the specified
destination layer. With the way the devtool update-recipe code works now
the source is always a temp directory, and printing paths from within
that is just confusing, so if the path starts with the temp directory
then just print the file name alone.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
meta/lib/oe/recipeutils.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/meta/lib/oe/recipeutils.py b/meta/lib/oe/recipeutils.py
index 58e4028..6caae5f 100644
--- a/meta/lib/oe/recipeutils.py
+++ b/meta/lib/oe/recipeutils.py
@@ -786,7 +786,11 @@ def bbappend_recipe(rd, destlayerdir, srcfiles, install=None, wildcardver=False,
for newfile, srcfile in copyfiles.items():
filedest = os.path.join(appenddir, destsubdir, os.path.basename(srcfile))
if os.path.abspath(newfile) != os.path.abspath(filedest):
- bb.note('Copying %s to %s' % (newfile, filedest))
+ if newfile.startswith(tempfile.gettempdir()):
+ newfiledisp = os.path.basename(newfile)
+ else:
+ newfiledisp = newfile
+ bb.note('Copying %s to %s' % (newfiledisp, filedest))
bb.utils.mkdirhier(os.path.dirname(filedest))
shutil.copyfile(newfile, filedest)
--
2.5.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] devtool: update-recipe: decode output before treating it as a string
2016-11-03 2:53 ` [PATCH 1/2] devtool: update-recipe: decode output before treating it as a string Paul Eggleton
@ 2016-11-03 8:18 ` Paul Eggleton
0 siblings, 0 replies; 4+ messages in thread
From: Paul Eggleton @ 2016-11-03 8:18 UTC (permalink / raw)
To: openembedded-core
On Thu, 03 Nov 2016 15:53:53 Paul Eggleton wrote:
> When you receive output from subprocess, with Python 3 it's a stream of
> bytes so you need to decode it before you can start treating it as a
> string.
>
> Fixes [YOCTO #10447].
Oops, that should have been 10563. I've corrected the branch.
Cheers,
Paul
--
Paul Eggleton
Intel Open Source Technology Centre
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-11-03 8:18 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-03 2:53 [PATCH 0/2] Fixes for devtool update-recipe Paul Eggleton
2016-11-03 2:53 ` [PATCH 1/2] devtool: update-recipe: decode output before treating it as a string Paul Eggleton
2016-11-03 8:18 ` Paul Eggleton
2016-11-03 2:53 ` [PATCH 2/2] lib/oe/recipeutils: print just filename in bbappend_recipe() if in temp dir Paul Eggleton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox