summaryrefslogtreecommitdiffstats
path: root/meta/classes/package.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes/package.bbclass')
-rw-r--r--meta/classes/package.bbclass11
1 files changed, 8 insertions, 3 deletions
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index 894b7294a2..76b9f86491 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -775,9 +775,13 @@ python fixup_perms () {
775 entry = fs_perms_entry(d.expand(line)) 775 entry = fs_perms_entry(d.expand(line))
776 if entry and entry.path: 776 if entry and entry.path:
777 if entry.link: 777 if entry.link:
778 fs_link_table[entry.link] = entry 778 fs_link_table[entry.path] = entry
779 if entry.path in fs_perms_table:
780 fs_perms_table.pop(entry.path)
779 else: 781 else:
780 fs_perms_table[entry.path] = entry 782 fs_perms_table[entry.path] = entry
783 if entry.path in fs_link_table:
784 fs_link_table.pop(entry.path)
781 f.close() 785 f.close()
782 786
783 # Debug -- list out in-memory table 787 # Debug -- list out in-memory table
@@ -789,8 +793,9 @@ python fixup_perms () {
789 # We process links first, so we can go back and fixup directory ownership 793 # We process links first, so we can go back and fixup directory ownership
790 # for any newly created directories 794 # for any newly created directories
791 # Process in sorted order so /run gets created before /run/lock, etc. 795 # Process in sorted order so /run gets created before /run/lock, etc.
792 for link in sorted(fs_link_table): 796 for entry in sorted(fs_link_table.values(), key=lambda x: x.link):
793 dir = fs_link_table[link].path 797 link = entry.link
798 dir = entry.path
794 origin = dvar + dir 799 origin = dvar + dir
795 if not (cpath.exists(origin) and cpath.isdir(origin) and not cpath.islink(origin)): 800 if not (cpath.exists(origin) and cpath.isdir(origin) and not cpath.islink(origin)):
796 continue 801 continue