From fe7f68a8201ffd272cb2abd9bf6b6c2a8cf0e172 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Tue, 19 Feb 2008 12:21:57 +0000 Subject: package_deb.bbclass: Tweaks from poky - use PKGDEST, don't clobber any existing do_package_write_deb depends and only set when PACKAGES isn't empty --- classes/package_deb.bbclass | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'classes/package_deb.bbclass') diff --git a/classes/package_deb.bbclass b/classes/package_deb.bbclass index c550c2fbff..1a3622c3bb 100644 --- a/classes/package_deb.bbclass +++ b/classes/package_deb.bbclass @@ -54,7 +54,7 @@ python do_package_deb_install () { # env of the fork+execve'd processs # Set up environment - apt_config = os.getenv('APT_CONFIG') + apt_config_backup = os.getenv('APT_CONFIG') os.putenv('APT_CONFIG', os.path.join(stagingdir, 'etc', 'apt', 'apt.conf')) path = os.getenv('PATH') os.putenv('PATH', '%s:%s' % (stagingbindir, os.getenv('PATH'))) @@ -64,7 +64,7 @@ python do_package_deb_install () { commands.getstatusoutput('apt-get install -y %s' % pkgfn) # revert environment - os.putenv('APT_CONFIG', apt_config) + os.putenv('APT_CONFIG', apt_config_backup) os.putenv('PATH', path) } @@ -104,7 +104,8 @@ python do_package_deb () { for pkg in packages.split(): localdata = bb.data.createCopy(d) - root = "%s/install/%s" % (workdir, pkg) + pkgdest = bb.data.getVar('PKGDEST', d, 1) + root = "%s/%s" % (pkgdest, pkg) lf = bb.utils.lockfile(root + ".lock") @@ -265,7 +266,10 @@ python do_package_deb () { python () { import bb if bb.data.getVar('PACKAGES', d, True) != '': - bb.data.setVarFlag('do_package_write_deb', 'depends', 'dpkg-native:do_populate_staging fakeroot-native:do_populate_staging', d) + deps = (bb.data.getVarFlag('do_package_write_deb', 'depends', d) or "").split() + deps.append('dpkg-native:do_populate_staging') + deps.append('fakeroot-native:do_populate_staging') + bb.data.setVarFlag('do_package_write_deb', 'depends', " ".join(deps), d) } python do_package_write_deb () { -- cgit v1.2.3