Browse Source

toaster: keep layer name in variable history path

When converting variable history file names to relative
paths, keep the layer directory's name so that the user
can distinguish between conf files with the same name.

[YOCTO #8188]

Signed-off-by: David Reyna <david.reyna@windriver.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
David Reyna 7 years ago
parent
commit
59561d652a
1 changed files with 2 additions and 1 deletions
  1. 2 1
      lib/bb/ui/buildinfohelper.py

+ 2 - 1
lib/bb/ui/buildinfohelper.py

@@ -1127,7 +1127,8 @@ class BuildInfoHelper(object):
                         abs_file_name = vh['file']
                         for pp in path_prefixes:
                             if abs_file_name.startswith(pp + "/"):
-                                vh['file']=abs_file_name[len(pp + "/"):]
+                                # preserve layer name in relative path
+                                vh['file']=abs_file_name[pp.rfind("/")+1:]
                                 break
 
         # save the variables