diff options
Diffstat (limited to 'bitbake/lib/bb/ui')
-rw-r--r-- | bitbake/lib/bb/ui/buildinfohelper.py | 31 |
1 files changed, 17 insertions, 14 deletions
diff --git a/bitbake/lib/bb/ui/buildinfohelper.py b/bitbake/lib/bb/ui/buildinfohelper.py index e5f1e09978..5098448c97 100644 --- a/bitbake/lib/bb/ui/buildinfohelper.py +++ b/bitbake/lib/bb/ui/buildinfohelper.py | |||
@@ -338,26 +338,29 @@ class ORMWrapper(object): | |||
338 | files = filedata['files'] | 338 | files = filedata['files'] |
339 | syms = filedata['syms'] | 339 | syms = filedata['syms'] |
340 | 340 | ||
341 | # we insert directories, ordered by name depth | 341 | # always create the root directory as a special case; |
342 | # note that this is never displayed, so the owner, group, | ||
343 | # size, permission are irrelevant | ||
344 | tf_obj = Target_File.objects.create(target = target_obj, | ||
345 | path = '/', | ||
346 | size = 0, | ||
347 | owner = '', | ||
348 | group = '', | ||
349 | permission = '', | ||
350 | inodetype = Target_File.ITYPE_DIRECTORY) | ||
351 | tf_obj.save() | ||
352 | |||
353 | # insert directories, ordered by name depth | ||
342 | for d in sorted(dirs, key=lambda x:len(x[-1].split("/"))): | 354 | for d in sorted(dirs, key=lambda x:len(x[-1].split("/"))): |
343 | (user, group, size) = d[1:4] | 355 | (user, group, size) = d[1:4] |
344 | permission = d[0][1:] | 356 | permission = d[0][1:] |
345 | path = d[4].lstrip(".") | 357 | path = d[4].lstrip(".") |
358 | |||
359 | # we already created the root directory, so ignore any | ||
360 | # entry for it | ||
346 | if len(path) == 0: | 361 | if len(path) == 0: |
347 | # we create the root directory as a special case | ||
348 | path = "/" | ||
349 | tf_obj = Target_File.objects.create( | ||
350 | target = target_obj, | ||
351 | path = path, | ||
352 | size = size, | ||
353 | inodetype = Target_File.ITYPE_DIRECTORY, | ||
354 | permission = permission, | ||
355 | owner = user, | ||
356 | group = group, | ||
357 | ) | ||
358 | tf_obj.directory = tf_obj | ||
359 | tf_obj.save() | ||
360 | continue | 362 | continue |
363 | |||
361 | parent_path = "/".join(path.split("/")[:len(path.split("/")) - 1]) | 364 | parent_path = "/".join(path.split("/")[:len(path.split("/")) - 1]) |
362 | if len(parent_path) == 0: | 365 | if len(parent_path) == 0: |
363 | parent_path = "/" | 366 | parent_path = "/" |