diff options
| -rw-r--r-- | meta/classes/buildhistory.bbclass | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/meta/classes/buildhistory.bbclass b/meta/classes/buildhistory.bbclass index 190c38e114..57dc1e9336 100644 --- a/meta/classes/buildhistory.bbclass +++ b/meta/classes/buildhistory.bbclass | |||
| @@ -172,10 +172,13 @@ python buildhistory_emit_pkghistory() { | |||
| 172 | for item in os.listdir(pkghistdir): | 172 | for item in os.listdir(pkghistdir): |
| 173 | if item != "latest" and item != "latest_srcrev": | 173 | if item != "latest" and item != "latest_srcrev": |
| 174 | if item not in packagelist: | 174 | if item not in packagelist: |
| 175 | subdir = os.path.join(pkghistdir, item) | 175 | itempath = os.path.join(pkghistdir, item) |
| 176 | for subfile in os.listdir(subdir): | 176 | if os.path.isdir(itempath): |
| 177 | os.unlink(os.path.join(subdir, subfile)) | 177 | for subfile in os.listdir(itempath): |
| 178 | os.rmdir(subdir) | 178 | os.unlink(os.path.join(itempath, subfile)) |
| 179 | os.rmdir(itempath) | ||
| 180 | else: | ||
| 181 | os.unlink(itempath) | ||
| 179 | 182 | ||
| 180 | rcpinfo = RecipeInfo(pn) | 183 | rcpinfo = RecipeInfo(pn) |
| 181 | rcpinfo.pe = pe | 184 | rcpinfo.pe = pe |
