Patchwork [bitbake-devel,01/19] toaster: fix target file inode type information

login
register
mail settings
Submitter Alexandru DAMIAN
Date March 14, 2014, 5:58 p.m.
Message ID <9f34a1c5e94d73cdba1def7059c60211514e054c.1394819783.git.alexandru.damian@intel.com>
Download mbox | patch
Permalink /patch/68629/
State New
Headers show

Comments

Alexandru DAMIAN - March 14, 2014, 5:58 p.m.
From: Alexandru DAMIAN <alexandru.damian@intel.com>

This patches fixes the inode type saved when writing the
target file list information.

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
---
 lib/bb/ui/buildinfohelper.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Patch

diff --git a/lib/bb/ui/buildinfohelper.py b/lib/bb/ui/buildinfohelper.py
index 8f091e8..b5e75d9 100644
--- a/lib/bb/ui/buildinfohelper.py
+++ b/lib/bb/ui/buildinfohelper.py
@@ -235,11 +235,11 @@  class ORMWrapper(object):
             path = d[4].lstrip(".")
             parent_path = "/".join(path.split("/")[:len(path.split("/")) - 1])
             inodetype = Target_File.ITYPE_REGULAR
-            if permission.startswith('b'):
+            if d[0].startswith('b'):
                 inodetype = Target_File.ITYPE_BLOCK
-            if permission.startswith('c'):
+            if d[0].startswith('c'):
                 inodetype = Target_File.ITYPE_CHARACTER
-            if permission.startswith('p'):
+            if d[0].startswith('p'):
                 inodetype = Target_File.ITYPE_FIFO
 
             tf_obj = Target_File.objects.create(
@@ -286,7 +286,7 @@  class ORMWrapper(object):
                         target = target_obj,
                         path = path,
                         size = size,
-                        inodetype = Target_File.ITYPE_REGULAR,
+                        inodetype = Target_File.ITYPE_SYMLINK,
                         permission = permission,
                         owner = user,
                         group = group,