aboutsummaryrefslogtreecommitdiffstats
path: root/classes/package_ipk.bbclass
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2009-11-16 10:45:23 +0000
committerRichard Purdie <rpurdie@linux.intel.com>2009-11-16 10:45:23 +0000
commitbc465d83ad8665211b6f9664b418f4eafcc5ca6c (patch)
tree6e46f3cb3096127f0df9825f1670482da199fc9e /classes/package_ipk.bbclass
parentd762c7504032becb9d05cd48c86dabb1ec764911 (diff)
downloadopenembedded-bc465d83ad8665211b6f9664b418f4eafcc5ca6c.tar.gz
classes: Drop a number of unneeded import calls (from Poky)
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'classes/package_ipk.bbclass')
-rw-r--r--classes/package_ipk.bbclass15
1 files changed, 6 insertions, 9 deletions
diff --git a/classes/package_ipk.bbclass b/classes/package_ipk.bbclass
index b48f8781eb..3582195393 100644
--- a/classes/package_ipk.bbclass
+++ b/classes/package_ipk.bbclass
@@ -17,7 +17,6 @@ python package_ipk_install () {
# Warning - this function is not multimachine safe (see stagingdir reference)!
#
- import os, sys, bb
pkg = bb.data.getVar('PKG', d, 1)
pkgfn = bb.data.getVar('PKGFN', d, 1)
rootfs = bb.data.getVar('IMAGE_ROOTFS', d, 1)
@@ -31,6 +30,7 @@ python package_ipk_install () {
bb.mkdirhier(rootfs)
os.chdir(rootfs)
except OSError:
+ import sys
(type, value, traceback) = sys.exc_info()
print value
raise bb.build.FuncFailed
@@ -135,14 +135,14 @@ package_generate_ipkg_conf () {
}
python do_package_ipk () {
- import sys, re, copy, bb
+ import re, copy
workdir = bb.data.getVar('WORKDIR', d, 1)
if not workdir:
bb.error("WORKDIR not defined, unable to package")
return
- import os # path manipulations
+
outdir = bb.data.getVar('DEPLOY_DIR_IPK', d, 1)
if not outdir:
bb.error("DEPLOY_DIR_IPK not defined, unable to package")
@@ -174,10 +174,9 @@ python do_package_ipk () {
pkgname = pkg
bb.data.setVar('PKG', pkgname, localdata)
- overrides = bb.data.getVar('OVERRIDES', localdata)
+ overrides = bb.data.getVar('OVERRIDES', localdata, True)
if not overrides:
raise bb.build.FuncFailed('OVERRIDES not defined')
- overrides = bb.data.expand(overrides, localdata)
bb.data.setVar('OVERRIDES', overrides + ':' + pkg, localdata)
bb.data.update_data(localdata)
@@ -194,8 +193,7 @@ python do_package_ipk () {
except ValueError:
pass
if not g and bb.data.getVar('ALLOW_EMPTY', localdata) != "1":
- from bb import note
- note("Not creating empty archive for %s-%s" % (pkg, bb.data.expand('${PV}-${PR}${DISTRO_PR}', localdata, True)))
+ bb.note("Not creating empty archive for %s-%s" % (pkg, bb.data.expand('${PV}-${PR}${DISTRO_PR}', localdata, True)))
bb.utils.unlockfile(lf)
continue
@@ -237,6 +235,7 @@ python do_package_ipk () {
raise KeyError(f)
ctrlfile.write(c % tuple(pullData(fs, localdata)))
except KeyError:
+ import sys
(type, value, traceback) = sys.exc_info()
ctrlfile.close()
bb.utils.unlockfile(lf)
@@ -308,7 +307,6 @@ python do_package_ipk () {
}
python () {
- import bb
if bb.data.getVar('PACKAGES', d, True) != '':
deps = (bb.data.getVarFlag('do_package_write_ipk', 'depends', d) or "").split()
deps.append('ipkg-utils-native:do_populate_staging')
@@ -317,7 +315,6 @@ python () {
}
python do_package_write_ipk () {
- import bb
packages = bb.data.getVar('PACKAGES', d, True)
if not packages:
bb.debug(1, "No PACKAGES defined, nothing to package")