diff options
Diffstat (limited to 'meta/classes/package_ipk.bbclass')
-rw-r--r-- | meta/classes/package_ipk.bbclass | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/meta/classes/package_ipk.bbclass b/meta/classes/package_ipk.bbclass index a633cfcc76..d0db9454d1 100644 --- a/meta/classes/package_ipk.bbclass +++ b/meta/classes/package_ipk.bbclass | |||
@@ -234,6 +234,12 @@ python do_package_ipk () { | |||
234 | if os.access(os.path.join(tmpdir, "stamps", "IPK_PACKAGE_INDEX_CLEAN"), os.R_OK): | 234 | if os.access(os.path.join(tmpdir, "stamps", "IPK_PACKAGE_INDEX_CLEAN"), os.R_OK): |
235 | os.unlink(os.path.join(tmpdir, "stamps", "IPK_PACKAGE_INDEX_CLEAN")) | 235 | os.unlink(os.path.join(tmpdir, "stamps", "IPK_PACKAGE_INDEX_CLEAN")) |
236 | 236 | ||
237 | def cleanupcontrol(root): | ||
238 | for p in ['CONTROL', 'DEBIAN']: | ||
239 | p = os.path.join(root, p) | ||
240 | if os.path.exists(p): | ||
241 | bb.utils.prunedir(p) | ||
242 | |||
237 | for pkg in packages.split(): | 243 | for pkg in packages.split(): |
238 | localdata = bb.data.createCopy(d) | 244 | localdata = bb.data.createCopy(d) |
239 | root = "%s/%s" % (pkgdest, pkg) | 245 | root = "%s/%s" % (pkgdest, pkg) |
@@ -255,13 +261,9 @@ python do_package_ipk () { | |||
255 | pkgoutdir = "%s/%s" % (outdir, arch) | 261 | pkgoutdir = "%s/%s" % (outdir, arch) |
256 | bb.utils.mkdirhier(pkgoutdir) | 262 | bb.utils.mkdirhier(pkgoutdir) |
257 | os.chdir(root) | 263 | os.chdir(root) |
264 | cleanupcontrol(root) | ||
258 | from glob import glob | 265 | from glob import glob |
259 | g = glob('*') | 266 | g = glob('*') |
260 | try: | ||
261 | del g[g.index('CONTROL')] | ||
262 | del g[g.index('./CONTROL')] | ||
263 | except ValueError: | ||
264 | pass | ||
265 | if not g and localdata.getVar('ALLOW_EMPTY') != "1": | 267 | if not g and localdata.getVar('ALLOW_EMPTY') != "1": |
266 | bb.note("Not creating empty archive for %s-%s-%s" % (pkg, localdata.getVar('PKGV', True), localdata.getVar('PKGR', True))) | 268 | bb.note("Not creating empty archive for %s-%s-%s" % (pkg, localdata.getVar('PKGV', True), localdata.getVar('PKGR', True))) |
267 | bb.utils.unlockfile(lf) | 269 | bb.utils.unlockfile(lf) |
@@ -407,7 +409,7 @@ python do_package_ipk () { | |||
407 | bb.utils.unlockfile(lf) | 409 | bb.utils.unlockfile(lf) |
408 | raise bb.build.FuncFailed("opkg-build execution failed") | 410 | raise bb.build.FuncFailed("opkg-build execution failed") |
409 | 411 | ||
410 | bb.utils.prunedir(controldir) | 412 | cleanupcontrol(root) |
411 | bb.utils.unlockfile(lf) | 413 | bb.utils.unlockfile(lf) |
412 | 414 | ||
413 | } | 415 | } |