Revert "package.bbclass: copy dotfiles in root D to PKGD"
authorMichael Smith <msmith@cbnco.com>
Mon, 18 Oct 2010 12:05:42 +0000 (08:05 -0400)
committerMichael Smith <msmith@cbnco.com>
Mon, 18 Oct 2010 12:05:42 +0000 (08:05 -0400)
This reverts commit 5fc5e69f026bccc43cb5e5a46da63e3dd148be3d.

lirc do_package was hanging because shutil.copytree() doesn't handle
named pipes.

Thread:

http://news.gmane.org/find-root.php?message_id=%3cAANLkTikYuii4mEWxWh7HahgFVzYgaUz%2dDADyUyibqa4d%40mail.gmail.com%3e

http://bugs.python.org/issue3002

classes/package.bbclass

index 6a290ee..e2a61bf 100644 (file)
@@ -356,20 +356,15 @@ python package_do_split_locales() {
 }
 
 python perform_packagecopy () {
-       import shutil
-
-       installdest = bb.data.getVar('D', d, True)
-       pkgcopy = bb.data.getVar('PKGD', d, True)
+       dest = bb.data.getVar('D', d, True)
+       dvar = bb.data.getVar('PKGD', d, True)
 
-       # 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)
+       bb.mkdirhier(dvar)
 
-       # Preserve symlinks.
-       shutil.copytree(installdest, pkgcopy, symlinks=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))
 }
 
 python populate_packages () {