Fixes for devtool update-recipe
cover Fixes for devtool update-recipe
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(-)
Signature · 1 line
2.5.5
PATCH 1/2 devtool: update-recipe: decode output before treating it as a string
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].
--- scripts/lib/devtool/standard.py | 1 + 1 file changed, 1 insertion(+)
scripts/lib/devtool/standard.py +1 -0
@@ -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)
Signature · 1 line
2.5.5
Re: [PATCH 1/2] devtool: update-recipe: decode output before treating it as a string
Quoted 5 lines · 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
Signature · 2 lines
Paul Eggleton Intel Open Source Technology Centre
PATCH 2/2 lib/oe/recipeutils: print just filename in bbappend_recipe() if in temp dir
In reply to Paul EggletonIf 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.
--- meta/lib/oe/recipeutils.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
meta/lib/oe/recipeutils.py +5 -1
@@ -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)
Signature · 1 line
2.5.5