summaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
authorPhil Blundell <philb@gnu.org>2007-01-28 21:15:33 +0000
committerPhil Blundell <philb@gnu.org>2007-01-28 21:15:33 +0000
commitc7dc9b2f4d13489221bf6109520d91e61e9d2586 (patch)
treea2f193eb57fcfbe42bd8954f289339f50c5f5186 /classes
parent61686c66883d161d42df9749e99784a15c834365 (diff)
package.bbclass: remove directories named in FILES from image after file
migration
Diffstat (limited to 'classes')
-rw-r--r--classes/package.bbclass4
1 files changed, 4 insertions, 0 deletions
diff --git a/classes/package.bbclass b/classes/package.bbclass
index a327aa46bd..d328aac63c 100644
--- a/classes/package.bbclass
+++ b/classes/package.bbclass
@@ -387,6 +387,7 @@ python populate_packages () {
bb.mkdirhier(root)
filesvar = bb.data.getVar('FILES', localdata, 1) or ""
files = filesvar.split()
+ cleandirs = []
for file in files:
if os.path.isabs(file):
file = '.' + file
@@ -395,6 +396,7 @@ python populate_packages () {
newfiles = [ os.path.join(file,x) for x in os.listdir(file) ]
if newfiles:
files += newfiles
+ cleandirs = [file] + cleandirs
continue
globbed = glob.glob(file)
if globbed:
@@ -409,6 +411,8 @@ python populate_packages () {
ret = bb.movefile(file,fpath)
if ret is None or ret == 0:
raise bb.build.FuncFailed("File population failed")
+ for dir in cleandirs:
+ os.rmdir(dir)
del localdata
os.chdir(workdir)