diff options
| author | Richard Purdie <rpurdie@linux.intel.com> | 2009-11-08 22:32:43 +0000 |
|---|---|---|
| committer | Richard Purdie <rpurdie@linux.intel.com> | 2009-11-13 12:15:28 +0000 |
| commit | c54117458a19d05d404ec00907a8f3e9c73a416b (patch) | |
| tree | 6cc5695742a1198668b022b35c8b2a456c4f3f4f /meta/classes/package.bbclass | |
| parent | 80d55bbd6ea2ff93510f3b87ea97322b0b02eaa8 (diff) | |
| download | poky-c54117458a19d05d404ec00907a8f3e9c73a416b.tar.gz | |
classes: Remove and sanitise import statements
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'meta/classes/package.bbclass')
| -rw-r--r-- | meta/classes/package.bbclass | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass index 41eeb8d3d1..6d384bebc1 100644 --- a/meta/classes/package.bbclass +++ b/meta/classes/package.bbclass | |||
| @@ -29,7 +29,6 @@ def do_split_packages(d, root, file_regex, output_pattern, description, postinst | |||
| 29 | Used in .bb files to split up dynamically generated subpackages of a | 29 | Used in .bb files to split up dynamically generated subpackages of a |
| 30 | given package, usually plugins or modules. | 30 | given package, usually plugins or modules. |
| 31 | """ | 31 | """ |
| 32 | import os, os.path, bb | ||
| 33 | 32 | ||
| 34 | dvar = bb.data.getVar('PKGD', d, True) | 33 | dvar = bb.data.getVar('PKGD', d, True) |
| 35 | 34 | ||
| @@ -117,7 +116,6 @@ def do_split_packages(d, root, file_regex, output_pattern, description, postinst | |||
| 117 | PACKAGE_DEPENDS += "file-native" | 116 | PACKAGE_DEPENDS += "file-native" |
| 118 | 117 | ||
| 119 | python () { | 118 | python () { |
| 120 | import bb | ||
| 121 | if bb.data.getVar('PACKAGES', d, True) != '': | 119 | if bb.data.getVar('PACKAGES', d, True) != '': |
| 122 | deps = bb.data.getVarFlag('do_package', 'depends', d) or "" | 120 | deps = bb.data.getVarFlag('do_package', 'depends', d) or "" |
| 123 | for dep in (bb.data.getVar('PACKAGE_DEPENDS', d, True) or "").split(): | 121 | for dep in (bb.data.getVar('PACKAGE_DEPENDS', d, True) or "").split(): |
| @@ -135,7 +133,7 @@ def runstrip(file, d): | |||
| 135 | # A working 'file' (one which works on the target architecture) | 133 | # A working 'file' (one which works on the target architecture) |
| 136 | # is necessary for this stuff to work, hence the addition to do_package[depends] | 134 | # is necessary for this stuff to work, hence the addition to do_package[depends] |
| 137 | 135 | ||
| 138 | import bb, os, commands, stat | 136 | import commands, stat |
| 139 | 137 | ||
| 140 | pathprefix = "export PATH=%s; " % bb.data.getVar('PATH', d, True) | 138 | pathprefix = "export PATH=%s; " % bb.data.getVar('PATH', d, True) |
| 141 | 139 | ||
| @@ -192,8 +190,6 @@ def runstrip(file, d): | |||
| 192 | # | 190 | # |
| 193 | 191 | ||
| 194 | def get_package_mapping (pkg, d): | 192 | def get_package_mapping (pkg, d): |
| 195 | import bb, os | ||
| 196 | |||
| 197 | data = read_subpkgdata(pkg, d) | 193 | data = read_subpkgdata(pkg, d) |
| 198 | key = "PKG_%s" % pkg | 194 | key = "PKG_%s" % pkg |
| 199 | 195 | ||
| @@ -203,8 +199,6 @@ def get_package_mapping (pkg, d): | |||
| 203 | return pkg | 199 | return pkg |
| 204 | 200 | ||
| 205 | def runtime_mapping_rename (varname, d): | 201 | def runtime_mapping_rename (varname, d): |
| 206 | import bb, os | ||
| 207 | |||
| 208 | #bb.note("%s before: %s" % (varname, bb.data.getVar(varname, d, True))) | 202 | #bb.note("%s before: %s" % (varname, bb.data.getVar(varname, d, True))) |
| 209 | 203 | ||
| 210 | new_depends = [] | 204 | new_depends = [] |
| @@ -226,8 +220,6 @@ def runtime_mapping_rename (varname, d): | |||
| 226 | # | 220 | # |
| 227 | 221 | ||
| 228 | python package_do_split_locales() { | 222 | python package_do_split_locales() { |
| 229 | import os | ||
| 230 | |||
| 231 | if (bb.data.getVar('PACKAGE_NO_LOCALE', d, True) == '1'): | 223 | if (bb.data.getVar('PACKAGE_NO_LOCALE', d, True) == '1'): |
| 232 | bb.debug(1, "package requested not splitting locales") | 224 | bb.debug(1, "package requested not splitting locales") |
| 233 | return | 225 | return |
| @@ -284,8 +276,6 @@ python package_do_split_locales() { | |||
| 284 | } | 276 | } |
| 285 | 277 | ||
| 286 | python perform_packagecopy () { | 278 | python perform_packagecopy () { |
| 287 | import os | ||
| 288 | |||
| 289 | dest = bb.data.getVar('D', d, True) | 279 | dest = bb.data.getVar('D', d, True) |
| 290 | dvar = bb.data.getVar('PKGD', d, True) | 280 | dvar = bb.data.getVar('PKGD', d, True) |
| 291 | 281 | ||
| @@ -297,7 +287,7 @@ python perform_packagecopy () { | |||
| 297 | } | 287 | } |
| 298 | 288 | ||
| 299 | python populate_packages () { | 289 | python populate_packages () { |
| 300 | import os, glob, stat, errno, re | 290 | import glob, stat, errno, re |
| 301 | 291 | ||
| 302 | workdir = bb.data.getVar('WORKDIR', d, True) | 292 | workdir = bb.data.getVar('WORKDIR', d, True) |
| 303 | outdir = bb.data.getVar('DEPLOY_DIR', d, True) | 293 | outdir = bb.data.getVar('DEPLOY_DIR', d, True) |
| @@ -530,7 +520,7 @@ fi | |||
| 530 | SHLIBSDIR = "${STAGING_DIR_HOST}/shlibs" | 520 | SHLIBSDIR = "${STAGING_DIR_HOST}/shlibs" |
| 531 | 521 | ||
| 532 | python package_do_shlibs() { | 522 | python package_do_shlibs() { |
| 533 | import os, re, os.path | 523 | import re |
| 534 | 524 | ||
| 535 | exclude_shlibs = bb.data.getVar('EXCLUDE_FROM_SHLIBS', d, 0) | 525 | exclude_shlibs = bb.data.getVar('EXCLUDE_FROM_SHLIBS', d, 0) |
| 536 | if exclude_shlibs: | 526 | if exclude_shlibs: |
| @@ -746,7 +736,7 @@ python package_do_shlibs() { | |||
| 746 | } | 736 | } |
| 747 | 737 | ||
| 748 | python package_do_pkgconfig () { | 738 | python package_do_pkgconfig () { |
| 749 | import re, os | 739 | import re |
| 750 | 740 | ||
| 751 | packages = bb.data.getVar('PACKAGES', d, True) | 741 | packages = bb.data.getVar('PACKAGES', d, True) |
| 752 | workdir = bb.data.getVar('WORKDIR', d, True) | 742 | workdir = bb.data.getVar('WORKDIR', d, True) |
