diff options
author | Joshua Lock <josh@linux.intel.com> | 2010-09-29 12:10:57 +0100 |
---|---|---|
committer | Joshua Lock <josh@linux.intel.com> | 2010-09-29 17:10:41 +0100 |
commit | 62fe6dc755d83a4d394cb8a3751fc6172715ee37 (patch) | |
tree | cfac3461ad24a93e457820783508bc388b48f064 /meta/classes | |
parent | e88a8951bee39954a42cacea0f5662c2ba9070b9 (diff) | |
download | poky-62fe6dc755d83a4d394cb8a3751fc6172715ee37.tar.gz |
sstate: list directories in child first order in the manifest file
The directory list in the manifest file needs to be sorted such that child
directories are deleted first. Fortunately as the list is generated by walking
the directory tree achieving this is as simple as reversing the directory list.
Fixes [BUGID #269]
Signed-off-by: Joshua Lock <josh@linux.intel.com>
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/sstate.bbclass | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass index c4d548fe2e..bcac3638e1 100644 --- a/meta/classes/sstate.bbclass +++ b/meta/classes/sstate.bbclass | |||
@@ -106,8 +106,10 @@ def sstate_install(ss, d): | |||
106 | # We want to ensure that directories appear at the end of the manifest | 106 | # We want to ensure that directories appear at the end of the manifest |
107 | # so that when we test to see if they should be deleted any contents | 107 | # so that when we test to see if they should be deleted any contents |
108 | # added by the task will have been removed first. | 108 | # added by the task will have been removed first. |
109 | for dir in shareddirs: | 109 | dirs = sorted(shareddirs, key=len) |
110 | f.write(dir + "\n") | 110 | # Must remove children first, which will have a longer path than the parent |
111 | for di in reversed(dirs): | ||
112 | f.write(di + "\n") | ||
111 | f.close() | 113 | f.close() |
112 | 114 | ||
113 | for lock in locks: | 115 | for lock in locks: |