aboutsummaryrefslogtreecommitdiffstats
path: root/classes
diff options
context:
space:
mode:
authorMichael Smith <msmith@cbnco.com>2010-09-24 12:50:00 -0400
committerMichael Smith <msmith@cbnco.com>2010-10-12 15:47:34 -0400
commit5fc5e69f026bccc43cb5e5a46da63e3dd148be3d (patch)
tree5c443a7462df8e4bde619df47c6f2d0c801d8bdc /classes
parentdaafb3282c24493925d1b2531cd9fdc5f8b7f0c6 (diff)
downloadopenembedded-5fc5e69f026bccc43cb5e5a46da63e3dd148be3d.tar.gz
package.bbclass: copy dotfiles in root D to PKGD
Use shutil.copytree() to copy D ("image") to PKGD ("package"). The previous system("cp %s/* ...") missed dotfiles/dirs at the top-level. Signed-off-by: Michael Smith <msmith@cbnco.com> Acked-by: Chris Larson <chris_larson@mentor.com>
Diffstat (limited to 'classes')
-rw-r--r--classes/package.bbclass19
1 files changed, 12 insertions, 7 deletions
diff --git a/classes/package.bbclass b/classes/package.bbclass
index e2a61bf3a7..6a290eea5e 100644
--- a/classes/package.bbclass
+++ b/classes/package.bbclass
@@ -356,15 +356,20 @@ python package_do_split_locales() {
}
python perform_packagecopy () {
- dest = bb.data.getVar('D', d, True)
- dvar = bb.data.getVar('PKGD', d, True)
+ import shutil
+
+ installdest = bb.data.getVar('D', d, True)
+ pkgcopy = bb.data.getVar('PKGD', d, True)
- bb.mkdirhier(dvar)
+ # Start package population by taking a copy of the installed
+ # files to operate on. Create missing parent directories of
+ # pkgcopy first (shutil.copytree() does this automatically but only
+ # in Python 2.5+).
+ bb.mkdirhier(pkgcopy)
+ shutil.rmtree(pkgcopy, True)
- # Start by package population by taking a copy of the installed
- # files to operate on
- os.system('rm -rf %s/*' % (dvar))
- os.system('cp -pPR %s/* %s/' % (dest, dvar))
+ # Preserve symlinks.
+ shutil.copytree(installdest, pkgcopy, symlinks=True)
}
python populate_packages () {