]> code.ossystems Code Review - openembedded-core.git/commitdiff
lib/oe/recipeutils: print just filename in bbappend_recipe() if in temp dir
authorPaul Eggleton <paul.eggleton@linux.intel.com>
Wed, 2 Nov 2016 03:48:24 +0000 (16:48 +1300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sun, 6 Nov 2016 23:35:23 +0000 (23:35 +0000)
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>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/lib/oe/recipeutils.py

index 58e4028aede074bb377dd69d4d095d77dbecca0c..6caae5f7d42359afac33dd36a37e099e915bec44 100644 (file)
@@ -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)