diff options
Diffstat (limited to 'meta/classes/packaged-staging.bbclass')
-rw-r--r-- | meta/classes/packaged-staging.bbclass | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/meta/classes/packaged-staging.bbclass b/meta/classes/packaged-staging.bbclass index b9d59bbd8a..82a4450bc3 100644 --- a/meta/classes/packaged-staging.bbclass +++ b/meta/classes/packaged-staging.bbclass | |||
@@ -27,7 +27,6 @@ PSTAGE_NATIVEDEPENDS = "\ | |||
27 | BB_STAMP_WHITELIST = "${PSTAGE_NATIVEDEPENDS}" | 27 | BB_STAMP_WHITELIST = "${PSTAGE_NATIVEDEPENDS}" |
28 | 28 | ||
29 | python () { | 29 | python () { |
30 | import bb | ||
31 | pstage_allowed = True | 30 | pstage_allowed = True |
32 | 31 | ||
33 | # These classes encode staging paths into the binary data so can only be | 32 | # These classes encode staging paths into the binary data so can only be |
@@ -81,8 +80,6 @@ PSTAGE_LIST_CMD = "${PSTAGE_PKGMANAGER} -f ${PSTAGE_MACHCONFIG} -o ${TMP | |||
81 | PSTAGE_TMPDIR_STAGE = "${WORKDIR}/staging-pkg" | 80 | PSTAGE_TMPDIR_STAGE = "${WORKDIR}/staging-pkg" |
82 | 81 | ||
83 | def pstage_manualclean(srcname, destvarname, d): | 82 | def pstage_manualclean(srcname, destvarname, d): |
84 | import os, bb | ||
85 | |||
86 | src = os.path.join(bb.data.getVar('PSTAGE_TMPDIR_STAGE', d, True), srcname) | 83 | src = os.path.join(bb.data.getVar('PSTAGE_TMPDIR_STAGE', d, True), srcname) |
87 | dest = bb.data.getVar(destvarname, d, True) | 84 | dest = bb.data.getVar(destvarname, d, True) |
88 | 85 | ||
@@ -95,7 +92,6 @@ def pstage_manualclean(srcname, destvarname, d): | |||
95 | os.system("rm %s 2> /dev/null" % filepath) | 92 | os.system("rm %s 2> /dev/null" % filepath) |
96 | 93 | ||
97 | def pstage_set_pkgmanager(d): | 94 | def pstage_set_pkgmanager(d): |
98 | import bb | ||
99 | path = bb.data.getVar("PATH", d, 1) | 95 | path = bb.data.getVar("PATH", d, 1) |
100 | pkgmanager = bb.which(path, 'opkg-cl') | 96 | pkgmanager = bb.which(path, 'opkg-cl') |
101 | if pkgmanager == "": | 97 | if pkgmanager == "": |
@@ -105,8 +101,6 @@ def pstage_set_pkgmanager(d): | |||
105 | 101 | ||
106 | 102 | ||
107 | def pstage_cleanpackage(pkgname, d): | 103 | def pstage_cleanpackage(pkgname, d): |
108 | import os, bb | ||
109 | |||
110 | path = bb.data.getVar("PATH", d, 1) | 104 | path = bb.data.getVar("PATH", d, 1) |
111 | pstage_set_pkgmanager(d) | 105 | pstage_set_pkgmanager(d) |
112 | list_cmd = bb.data.getVar("PSTAGE_LIST_CMD", d, True) | 106 | list_cmd = bb.data.getVar("PSTAGE_LIST_CMD", d, True) |
@@ -168,8 +162,6 @@ PSTAGE_TASKS_COVERED = "fetch unpack munge patch configure qa_configure rig_loca | |||
168 | SCENEFUNCS += "packagestage_scenefunc" | 162 | SCENEFUNCS += "packagestage_scenefunc" |
169 | 163 | ||
170 | python packagestage_scenefunc () { | 164 | python packagestage_scenefunc () { |
171 | import os | ||
172 | |||
173 | if bb.data.getVar("PSTAGING_ACTIVE", d, 1) == "0": | 165 | if bb.data.getVar("PSTAGING_ACTIVE", d, 1) == "0": |
174 | return | 166 | return |
175 | 167 | ||
@@ -249,10 +241,7 @@ packagestage_scenefunc[dirs] = "${STAGING_DIR}" | |||
249 | 241 | ||
250 | addhandler packagedstage_stampfixing_eventhandler | 242 | addhandler packagedstage_stampfixing_eventhandler |
251 | python packagedstage_stampfixing_eventhandler() { | 243 | python packagedstage_stampfixing_eventhandler() { |
252 | from bb.event import getName | 244 | if bb.event.getName(e) == "StampUpdate": |
253 | import os | ||
254 | |||
255 | if getName(e) == "StampUpdate": | ||
256 | taskscovered = bb.data.getVar("PSTAGE_TASKS_COVERED", e.data, 1).split() | 245 | taskscovered = bb.data.getVar("PSTAGE_TASKS_COVERED", e.data, 1).split() |
257 | for (fn, task) in e.targets: | 246 | for (fn, task) in e.targets: |
258 | # strip off 'do_' | 247 | # strip off 'do_' |