From 73aecdc2451b2fc990204192bee1626f1149a4ee Mon Sep 17 00:00:00 2001 From: Holger Freyther Date: Mon, 10 Mar 2008 08:21:54 +0000 Subject: Qt: The suffix for the staging libdir was omitted, remove it from the libs --- classes/qmake2.bbclass | 2 +- classes/qtopia4core.bbclass | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'classes') diff --git a/classes/qmake2.bbclass b/classes/qmake2.bbclass index cf3419f824..9ac4945ab4 100644 --- a/classes/qmake2.bbclass +++ b/classes/qmake2.bbclass @@ -14,6 +14,6 @@ export OE_QMAKE_QMAKE = "${STAGING_BINDIR_NATIVE}/qmake2" export OE_QMAKE_LINK = "${CXX}" export OE_QMAKE_CXXFLAGS = "${CXXFLAGS}" export OE_QMAKE_INCDIR_QT = "${STAGING_INCDIR}/qt4" -export OE_QMAKE_LIBDIR_QT = "${STAGING_LIBDIR}/qt4" +export OE_QMAKE_LIBDIR_QT = "${STAGING_LIBDIR}" export OE_QMAKE_LIBS_QT = "qt" export OE_QMAKE_LIBS_X11 = "-lXext -lX11 -lm" diff --git a/classes/qtopia4core.bbclass b/classes/qtopia4core.bbclass index fd8939a23f..c6a05488ef 100644 --- a/classes/qtopia4core.bbclass +++ b/classes/qtopia4core.bbclass @@ -5,7 +5,7 @@ inherit qmake2 # override variables set by qmake-base to compile QtopiaCore apps # export OE_QMAKE_INCDIR_QT = "${STAGING_INCDIR}/qtopia" -export OE_QMAKE_LIBDIR_QT = "${STAGING_LIBDIR}/qtopia" +export OE_QMAKE_LIBDIR_QT = "${STAGING_LIBDIR}" export OE_QMAKE_LIBS_QT = "qt" export OE_QMAKE_LIBS_X11 = "" export OE_QMAKE_EXTRA_MODULES = "network" -- cgit v1.2.3 From 27b9bc946eeb3faa7b10d92689ab527af42727bd Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Mon, 10 Mar 2008 14:24:34 +0000 Subject: package_ipk/deb.bbclass: Make the PACKAGES check earlier so if there is nothing to package we don't read potentially stale pkgdata from staging. Fixes the strange ncurses-native issue after ncurses packaging was fixed --- classes/package_deb.bbclass | 14 ++++++++------ classes/package_ipk.bbclass | 15 ++++++--------- 2 files changed, 14 insertions(+), 15 deletions(-) (limited to 'classes') diff --git a/classes/package_deb.bbclass b/classes/package_deb.bbclass index 22b6166685..82a2d53312 100644 --- a/classes/package_deb.bbclass +++ b/classes/package_deb.bbclass @@ -88,10 +88,6 @@ python do_package_deb () { return bb.mkdirhier(dvar) - packages = bb.data.getVar('PACKAGES', d, 1) - if not packages: - bb.debug(1, "PACKAGES not defined, nothing to package") - return tmpdir = bb.data.getVar('TMPDIR', d, 1) @@ -102,6 +98,7 @@ python do_package_deb () { bb.debug(1, "No packages; nothing to do") return + packages = bb.data.getVar('PACKAGES', d, 1) for pkg in packages.split(): localdata = bb.data.createCopy(d) pkgdest = bb.data.getVar('PKGDEST', d, 1) @@ -273,8 +270,13 @@ python () { } python do_package_write_deb () { - bb.build.exec_func("read_subpackage_metadata", d) - bb.build.exec_func("do_package_deb", d) + packages = bb.data.getVar('PACKAGES', d, True) + if not packages: + bb.debug(1, "No PACKAGES defined, nothing to package") + return + + bb.build.exec_func("read_subpackage_metadata", d) + bb.build.exec_func("do_package_deb", d) } do_package_write_deb[dirs] = "${D}" addtask package_write_deb before do_package_write after do_package diff --git a/classes/package_ipk.bbclass b/classes/package_ipk.bbclass index 2feaeba3b3..e47bc6a880 100644 --- a/classes/package_ipk.bbclass +++ b/classes/package_ipk.bbclass @@ -137,20 +137,12 @@ python do_package_ipk () { return bb.mkdirhier(dvar) - packages = bb.data.getVar('PACKAGES', d, 1) - if not packages: - bb.debug(1, "PACKAGES not defined, nothing to package") - return - tmpdir = bb.data.getVar('TMPDIR', d, 1) if os.access(os.path.join(tmpdir, "stamps", "IPK_PACKAGE_INDEX_CLEAN"), os.R_OK): os.unlink(os.path.join(tmpdir, "stamps", "IPK_PACKAGE_INDEX_CLEAN")) - if packages == []: - bb.debug(1, "No packages; nothing to do") - return - + packages = bb.data.getVar('PACKAGES', d, True) for pkg in packages.split(): localdata = bb.data.createCopy(d) pkgdest = bb.data.getVar('PKGDEST', d, 1) @@ -313,6 +305,11 @@ python () { } python do_package_write_ipk () { + packages = bb.data.getVar('PACKAGES', d, True) + if not packages: + bb.debug(1, "No PACKAGES defined, nothing to package") + return + bb.build.exec_func("read_subpackage_metadata", d) bb.build.exec_func("do_package_ipk", d) } -- cgit v1.2.3 From fc1c7cd9a659ccf3eeaa728dec2bc9bc128e1658 Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Mon, 10 Mar 2008 16:33:51 +0000 Subject: sepukku bbclass: change 'bugname' far so bugreports get grouped by PN-PV instead of PN-PV-PR-task * mentions failed task now in bug comment --- classes/seppuku.bbclass | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'classes') diff --git a/classes/seppuku.bbclass b/classes/seppuku.bbclass index 2e097a812e..02f4b9a925 100644 --- a/classes/seppuku.bbclass +++ b/classes/seppuku.bbclass @@ -329,12 +329,11 @@ python seppuku_eventhandler() { file = None if name == "TaskFailed": - bugname = "%(package)s-%(pv)s-%(pr)s-%(task)s" % { "package" : bb.data.getVar("PN", data, True), + bugname = "%(package)s-%(pv)s-autobuild" % { "package" : bb.data.getVar("PN", data, True), "pv" : bb.data.getVar("PV", data, True), - "pr" : bb.data.getVar("PR", data, True), - "task" : e.task } + } log_file = glob.glob("%s/log.%s.*" % (bb.data.getVar('T', event.data, True), event.task)) - text = "The package failed to build at %s for machine %s" % (bb.data.getVar('DATETIME', data, True), bb.data.getVar( 'MACHINE', data, True ) ) + text = "The %s step failed at %s for machine %s" % (e.task, bb.data.getVar('DATETIME', data, True), bb.data.getVar( 'MACHINE', data, True ) ) if len(log_file) != 0: print >> debug_file, "Adding log file %s" % log_file[0] file = open(log_file[0], 'r') -- cgit v1.2.3 From 2477626fdbe8e70c201e58b47fbd40b1e9b27478 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Tue, 11 Mar 2008 11:17:58 +0000 Subject: siteinfo.bbclass: Add common-linux file --- classes/siteinfo.bbclass | 62 ++++++++++++++++++++++++------------------------ 1 file changed, 31 insertions(+), 31 deletions(-) (limited to 'classes') diff --git a/classes/siteinfo.bbclass b/classes/siteinfo.bbclass index a3b67b5798..701777bbcc 100644 --- a/classes/siteinfo.bbclass +++ b/classes/siteinfo.bbclass @@ -21,40 +21,40 @@ def get_siteinfo_list(d): target = bb.data.getVar('HOST_ARCH', d, 1) + "-" + bb.data.getVar('HOST_OS', d, 1) targetinfo = {\ - "armeb-linux": "endian-big bit-32 common-glibc arm-common",\ - "armeb-linux-gnueabi": "endian-big bit-32 common-glibc arm-common armeb-linux",\ - "armeb-linux-uclibc": "endian-big bit-32 common-uclibc arm-common",\ - "armeb-linux-uclibcgnueabi": "endian-big bit-32 common-uclibc arm-common armeb-linux-uclibc",\ + "armeb-linux": "endian-big bit-32 common-linux common-glibc arm-common",\ + "armeb-linux-gnueabi": "endian-big bit-32 common-linux common-glibc arm-common armeb-linux",\ + "armeb-linux-uclibc": "endian-big bit-32 common-linux common-uclibc arm-common",\ + "armeb-linux-uclibcgnueabi": "endian-big bit-32 common-linux common-uclibc arm-common armeb-linux-uclibc",\ "arm-darwin": "endian-little bit-32 common-darwin",\ - "arm-linux": "endian-little bit-32 common-glibc arm-common",\ - "arm-linux-gnueabi": "endian-little bit-32 common-glibc arm-common arm-linux",\ - "arm-linux-uclibc": "endian-little bit-32 common-uclibc arm-common",\ - "arm-linux-uclibcgnueabi": "endian-little bit-32 common-uclibc arm-common arm-linux-uclibc",\ - "avr32-linux": "endian-big bit-32 common-glibc avr32-common",\ - "avr32-linux-uclibc": "endian-big bit-32 common-uclibc avr32-common",\ + "arm-linux": "endian-little bit-32 common-linux common-glibc arm-common",\ + "arm-linux-gnueabi": "endian-little bit-32 common-linux common-glibc arm-common arm-linux",\ + "arm-linux-uclibc": "endian-little bit-32 common-linux common-uclibc arm-common",\ + "arm-linux-uclibcgnueabi": "endian-little bit-32 common-linux common-uclibc arm-common arm-linux-uclibc",\ + "avr32-linux": "endian-big bit-32 common-linux common-glibc avr32-common",\ + "avr32-linux-uclibc": "endian-big bit-32 common-linux common-uclibc avr32-common",\ "bfin-uclinux-uclibc": "endian-little bit-32 common-uclibc bfin-common",\ - "i386-linux": "endian-little bit-32 common-glibc ix86-common",\ - "i486-linux": "endian-little bit-32 common-glibc ix86-common",\ - "i586-linux": "endian-little bit-32 common-glibc ix86-common",\ - "i686-linux": "endian-little bit-32 common-glibc ix86-common",\ - "i386-linux-uclibc": "endian-little bit-32 common-uclibc ix86-common",\ - "i486-linux-uclibc": "endian-little bit-32 common-uclibc ix86-common",\ - "i586-linux-uclibc": "endian-little bit-32 common-uclibc ix86-common",\ - "i686-linux-uclibc": "endian-little bit-32 common-uclibc ix86-common",\ - "mipsel-linux": "endian-little bit-32 common-glibc",\ - "mipsel-linux-uclibc": "endian-little bit-32 common-uclibc",\ - "mips-linux": "endian-big bit-32 common-glibc",\ - "mips-linux-uclibc": "endian-big bit-32 common-uclibc",\ + "i386-linux": "endian-little bit-32 common-linux common-glibc ix86-common",\ + "i486-linux": "endian-little bit-32 common-linux common-glibc ix86-common",\ + "i586-linux": "endian-little bit-32 common-linux common-glibc ix86-common",\ + "i686-linux": "endian-little bit-32 common-linux common-glibc ix86-common",\ + "i386-linux-uclibc": "endian-little bit-32 common-linux common-uclibc ix86-common",\ + "i486-linux-uclibc": "endian-little bit-32 common-linux common-uclibc ix86-common",\ + "i586-linux-uclibc": "endian-little bit-32 common-linux common-uclibc ix86-common",\ + "i686-linux-uclibc": "endian-little bit-32 common-linux common-uclibc ix86-common",\ + "mipsel-linux": "endian-little bit-32 common-linux common-glibc",\ + "mipsel-linux-uclibc": "endian-little bit-32 common-linux common-uclibc",\ + "mips-linux": "endian-big bit-32 common-linux common-glibc",\ + "mips-linux-uclibc": "endian-big bit-32 common-linux common-uclibc",\ "powerpc-darwin": "endian-big bit-32 common-darwin",\ - "ppc-linux": "endian-big bit-32 common-glibc powerpc-common",\ - "powerpc-linux": "endian-big bit-32 common-glibc powerpc-common",\ - "powerpc-linux-uclibc": "endian-big bit-32 common-uclibc powerpc-common",\ - "sh3-linux": "endian-little bit-32 common-glibc sh-common",\ - "sh4-linux": "endian-little bit-32 common-glibc sh-common",\ - "sh4-linux-uclibc": "endian-little bit-32 common-uclibc sh-common",\ - "sparc-linux": "endian-big bit-32 common-glibc",\ - "x86_64-linux": "endian-little bit-64 common-glibc",\ - "x86_64-linux-uclibc": "endian-little bit-64 common-uclibc"} + "ppc-linux": "endian-big bit-32 common-linux common-glibc powerpc-common",\ + "powerpc-linux": "endian-big bit-32 common-linux common-glibc powerpc-common",\ + "powerpc-linux-uclibc": "endian-big bit-32 common-linux common-uclibc powerpc-common",\ + "sh3-linux": "endian-little bit-32 common-linux common-glibc sh-common",\ + "sh4-linux": "endian-little bit-32 common-linux common-glibc sh-common",\ + "sh4-linux-uclibc": "endian-little bit-32 common-linux common-uclibc sh-common",\ + "sparc-linux": "endian-big bit-32 common-linux common-glibc",\ + "x86_64-linux": "endian-little bit-64 common-linux common-glibc",\ + "x86_64-linux-uclibc": "endian-little bit-64 common-linux common-uclibc"} if target in targetinfo: info = targetinfo[target].split() info.append(target) -- cgit v1.2.3 From 6b6cf4dab96836c4c814ffc79a05fc12ff113a62 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Tue, 11 Mar 2008 12:28:55 +0000 Subject: rm_work: Use the completion bitbake scheduler by default --- classes/rm_work.bbclass | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'classes') diff --git a/classes/rm_work.bbclass b/classes/rm_work.bbclass index 97de5e2774..917fadd750 100644 --- a/classes/rm_work.bbclass +++ b/classes/rm_work.bbclass @@ -6,6 +6,10 @@ # INHERIT += "rm_work" # +# Use the completion scheulder by default when rm_work is active +# to try and reduce disk usage +BB_SCHEDULER ?= "completion" + RMWORK_ORIG_TASK := "${BB_DEFAULT_TASK}" BB_DEFAULT_TASK = "rm_work_all" -- cgit v1.2.3 From ae8af81c1b29c57dccb9fe369ddf2399fc21be2c Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Tue, 11 Mar 2008 22:17:10 +0000 Subject: package_deb.bbclass: Remove some unneeded lines --- classes/package_deb.bbclass | 4 ---- 1 file changed, 4 deletions(-) (limited to 'classes') diff --git a/classes/package_deb.bbclass b/classes/package_deb.bbclass index 82a2d53312..e59d194aeb 100644 --- a/classes/package_deb.bbclass +++ b/classes/package_deb.bbclass @@ -94,10 +94,6 @@ python do_package_deb () { if os.access(os.path.join(tmpdir, "stamps", "DEB_PACKAGE_INDEX_CLEAN"),os.R_OK): os.unlink(os.path.join(tmpdir, "stamps", "DEB_PACKAGE_INDEX_CLEAN")) - if packages == []: - bb.debug(1, "No packages; nothing to do") - return - packages = bb.data.getVar('PACKAGES', d, 1) for pkg in packages.split(): localdata = bb.data.createCopy(d) -- cgit v1.2.3 From 9af66ec4a2156df8a05cfd3c56c0b88e7bac3eff Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Fri, 14 Mar 2008 09:49:19 +0000 Subject: siteinfo bbclass: remove avr32/glibc entries - there never will be avr32 support in glibc --- classes/siteinfo.bbclass | 1 - 1 file changed, 1 deletion(-) (limited to 'classes') diff --git a/classes/siteinfo.bbclass b/classes/siteinfo.bbclass index 701777bbcc..0d31be4dc4 100644 --- a/classes/siteinfo.bbclass +++ b/classes/siteinfo.bbclass @@ -30,7 +30,6 @@ def get_siteinfo_list(d): "arm-linux-gnueabi": "endian-little bit-32 common-linux common-glibc arm-common arm-linux",\ "arm-linux-uclibc": "endian-little bit-32 common-linux common-uclibc arm-common",\ "arm-linux-uclibcgnueabi": "endian-little bit-32 common-linux common-uclibc arm-common arm-linux-uclibc",\ - "avr32-linux": "endian-big bit-32 common-linux common-glibc avr32-common",\ "avr32-linux-uclibc": "endian-big bit-32 common-linux common-uclibc avr32-common",\ "bfin-uclinux-uclibc": "endian-little bit-32 common-uclibc bfin-common",\ "i386-linux": "endian-little bit-32 common-linux common-glibc ix86-common",\ -- cgit v1.2.3 From 91ec5f43eb68a3bfca7161d9a6929453659dce9d Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Fri, 14 Mar 2008 11:34:44 +0000 Subject: package.bbclass: Add in hooks for packaged staging in the shlibs and pkgconfig code. --- classes/package.bbclass | 52 ++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 47 insertions(+), 5 deletions(-) (limited to 'classes') diff --git a/classes/package.bbclass b/classes/package.bbclass index 325c0b52f5..f9d9193c32 100644 --- a/classes/package.bbclass +++ b/classes/package.bbclass @@ -459,6 +459,18 @@ python populate_packages () { } populate_packages[dirs] = "${D}" +def package_stagefile(file, d): + import bb, os + + pstageactive = bb.data.getVar('PSTAGING_ACTIVE', d, True) + + if pstageactive == "1": + destfile = file.replace(bb.data.getVar("TMPDIR", d, 1), bb.data.getVar("PSTAGE_TMPDIR_STAGE", d, 1)) + bb.mkdirhier(os.path.dirname(destfile)) + #print "%s to %s" % (file, destfile) + bb.copyfile(file, destfile) + + python emit_pkgdata() { from glob import glob @@ -472,24 +484,29 @@ python emit_pkgdata() { if val: f.write('%s_%s: %s\n' % (var, pkg, encode(val))) - packages = bb.data.getVar('PACKAGES', d, 1) + packages = bb.data.getVar('PACKAGES', d, True) + pkgdatadir = bb.data.getVar('PKGDATA_DIR', d, True) + + pstageactive = bb.data.getVar('PSTAGING_ACTIVE', d, True) + if pstageactive == "1": + lf = bb.utils.lockfile(bb.data.expand("${STAGING_DIR}/staging.lock", d)) - data_file = bb.data.expand("${PKGDATA_DIR}/${PN}", d) + data_file = pkgdatadir + bb.data.expand("/${PN}" , d) f = open(data_file, 'w') f.write("PACKAGES: %s\n" % packages) f.close() + package_stagefile(data_file, d) workdir = bb.data.getVar('WORKDIR', d, 1) for pkg in packages.split(): - subdata_file = bb.data.expand("${PKGDATA_DIR}/runtime/%s" % pkg, d) + subdata_file = pkgdatadir + "/runtime/%s" % pkg sf = open(subdata_file, 'w') write_if_exists(sf, pkg, 'DESCRIPTION') write_if_exists(sf, pkg, 'RDEPENDS') write_if_exists(sf, pkg, 'RPROVIDES') write_if_exists(sf, pkg, 'RRECOMMENDS') write_if_exists(sf, pkg, 'RSUGGESTS') - write_if_exists(sf, pkg, 'RPROVIDES') write_if_exists(sf, pkg, 'RREPLACES') write_if_exists(sf, pkg, 'RCONFLICTS') write_if_exists(sf, pkg, 'PKG') @@ -501,6 +518,10 @@ python emit_pkgdata() { write_if_exists(sf, pkg, 'pkg_prerm') sf.close() + package_stagefile(subdata_file, d) + #if pkgdatadir2: + # bb.copyfile(subdata_file, pkgdatadir2 + "/runtime/%s" % pkg) + allow_empty = bb.data.getVar('ALLOW_EMPTY_%s' % pkg, d, 1) if not allow_empty: allow_empty = bb.data.getVar('ALLOW_EMPTY', d, 1) @@ -508,8 +529,11 @@ python emit_pkgdata() { os.chdir(root) g = glob('*') if g or allow_empty == "1": - packagedfile = bb.data.expand('${PKGDATA_DIR}/runtime/%s.packaged' % pkg, d) + packagedfile = pkgdatadir + '/runtime/%s.packaged' % pkg file(packagedfile, 'w').close() + package_stagefile(packagedfile, d) + if pstageactive == "1": + bb.utils.unlockfile(lf) } emit_pkgdata[dirs] = "${PKGDATA_DIR}/runtime" @@ -549,6 +573,10 @@ python package_do_shlibs() { shlibs_dir = bb.data.getVar('SHLIBSDIR', d, 1) bb.mkdirhier(shlibs_dir) + pstageactive = bb.data.getVar('PSTAGING_ACTIVE', d, True) + if pstageactive == "1": + lf = bb.utils.lockfile(bb.data.expand("${STAGING_DIR}/staging.lock", d)) + needed = {} private_libs = bb.data.getVar('PRIVATE_LIBS', d, 1) for pkg in packages.split(): @@ -590,9 +618,11 @@ python package_do_shlibs() { for s in sonames: fd.write(s + '\n') fd.close() + package_stagefile(shlibs_file, d) fd = open(shver_file, 'w') fd.write(ver + '\n') fd.close() + package_stagefile(shver_file, d) if needs_ldconfig: bb.debug(1, 'adding ldconfig call to postinst for %s' % pkg) postinst = bb.data.getVar('pkg_postinst_%s' % pkg, d, 1) or bb.data.getVar('pkg_postinst', d, 1) @@ -601,6 +631,9 @@ python package_do_shlibs() { postinst += bb.data.getVar('ldconfig_postinst_fragment', d, 1) bb.data.setVar('pkg_postinst_%s' % pkg, postinst, d) + if pstageactive == "1": + bb.utils.unlockfile(lf) + shlib_provider = {} list_re = re.compile('^(.*)\.list$') for dir in [shlibs_dir]: @@ -715,6 +748,10 @@ python package_do_pkgconfig () { if hdr == 'Requires': pkgconfig_needed[pkg] += exp.replace(',', ' ').split() + pstageactive = bb.data.getVar('PSTAGING_ACTIVE', d, True) + if pstageactive == "1": + lf = bb.utils.lockfile(bb.data.expand("${STAGING_DIR}/staging.lock", d)) + for pkg in packages.split(): pkgs_file = os.path.join(shlibs_dir, pkg + ".pclist") if os.path.exists(pkgs_file): @@ -724,6 +761,7 @@ python package_do_pkgconfig () { for p in pkgconfig_provided[pkg]: f.write('%s\n' % p) f.close() + package_stagefile(pkgs_file, d) for dir in [shlibs_dir]: if not os.path.exists(dir): @@ -758,6 +796,10 @@ python package_do_pkgconfig () { for dep in deps: fd.write(dep + '\n') fd.close() + package_stagefile(deps_file, d) + + if pstageactive == "1": + bb.utils.unlockfile(lf) } python read_shlibdeps () { -- cgit v1.2.3 From 38f043287062cea233c11755c111b4a7dfb28d79 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Fri, 14 Mar 2008 11:38:00 +0000 Subject: packaged-staging.bbclass: Various improvements. Add handling for -native and -cross packages, add event handler so 'accelerated' tasks work with later execution of skipped tasks, drop feed index creation since we don't need it, abstract package naming and package path handling. --- classes/packaged-staging.bbclass | 175 ++++++++++++++++++++++++++------------- 1 file changed, 116 insertions(+), 59 deletions(-) (limited to 'classes') diff --git a/classes/packaged-staging.bbclass b/classes/packaged-staging.bbclass index b564136e3f..c807e4210f 100644 --- a/classes/packaged-staging.bbclass +++ b/classes/packaged-staging.bbclass @@ -4,11 +4,66 @@ # # To use it add that line to conf/local.conf: # -# INHERIT = "packaged-staging" +# INHERIT += "packaged-staging" +# + + +# +# bitbake.conf set PSTAGING_ACTIVE = "0", this class sets to "1" if we're active +# +PSTAGE_PKGVERSION = "${PV}-${PR}" +PSTAGE_PKGARCH = "${MULTIMACH_ARCH}" +PSTAGE_EXTRAPATH = "" +PSTAGE_PKGPATH = "${DISTRO}${PSTAGE_EXTRAPATH}" +PSTAGE_PKGNAME = "staging-${PN}_${PSTAGE_PKGVERSION}_${PSTAGE_PKGARCH}.ipk" +PSTAGE_PKG = "${DEPLOY_DIR_PSTAGE}/${PSTAGE_PKGPATH}/${PSTAGE_PKGNAME}" + +# multimachine.bbclass will override this but add a default in case we're not using it +MULTIMACH_ARCH ?= "${PACKAGE_ARCH}" + +PSTAGE_NATIVEDEPENDS = "\ + pkgconfig-native \ + autoconf-native \ + automake-native \ + libtool-native \ + gnu-config-native \ + shasum-native \ + libtool-native \ + automake-native \ + update-alternatives-cworth-native \ + ipkg-utils-native \ + ipkg-native \ + m4-native \ + quilt-native \ + stagemanager-native \ + " python () { import bb - if not bb.data.inherits_class('native', d) and not bb.data.inherits_class('image', d) and not bb.data.inherits_class('cross', d) and not bb.data.inherits_class('sdk', d): + pstage_allowed = True + + # These classes encode staging paths into the binary data so can only be + # reused if the path doesn't change/ + if bb.data.inherits_class('native', d) or bb.data.inherits_class('cross', d) or bb.data.inherits_class('sdk', d): + path = bb.data.getVar('PSTAGE_PKGPATH', d, 1) + path = path + bb.data.getVar('TMPDIR', d, 1).replace('/', '-') + bb.data.setVar('PSTAGE_PKGPATH', path, d) + + # PSTAGE_NATIVEDEPENDS lists the packages we need before we can use packaged + # staging. There will always be some packages we depend on. + if bb.data.inherits_class('native', d): + pn = bb.data.getVar('PN', d, True) + nativedeps = bb.data.getVar('PSTAGE_NATIVEDEPENDS', d, True).split() + if pn in nativedeps: + pstage_allowed = False + + # Images aren't of interest to us + if bb.data.inherits_class('image', d): + pstage_allowed = False + + # Add task dependencies if we're active, otherwise mark packaged staging + # as inactive. + if pstage_allowed: deps = bb.data.getVarFlag('do_populate_staging', 'depends', d) or "" deps += " stagemanager-native:do_populate_staging" bb.data.setVarFlag('do_populate_staging', 'depends', deps, d) @@ -16,23 +71,19 @@ python () { deps = bb.data.getVarFlag('do_prepackaged_stage', 'depends', d) or "" deps += " ipkg-native:do_populate_staging ipkg-utils-native:do_populate_staging" bb.data.setVarFlag('do_prepackaged_stage', 'depends', deps, d) + bb.data.setVar("PSTAGING_ACTIVE", "1", d) else: - bb.data.setVar("PSTAGING_DISABLED", "1", d) + bb.data.setVar("PSTAGING_ACTIVE", "0", d) } -# multimachine.bbclass will override this -MULTIMACH_ARCH ?= "${PACKAGE_ARCH}" - -export PSTAGING_DISABLED = "0" - -DEPLOY_DIR_PSTAGE = "${DEPLOY_DIR}/pstage" +DEPLOY_DIR_PSTAGE = "${DEPLOY_DIR}/pstage" +PSTAGE_MACHCONFIG = "${DEPLOY_DIR_PSTAGE}/ipkg-${MACHINE}.conf" PSTAGE_BUILD_CMD = "${IPKGBUILDCMD}" -PSTAGE_INSTALL_CMD = "ipkg-cl install -force-depends -f ${DEPLOY_DIR_PSTAGE}/ipkg-${MACHINE}.conf -o ${TMPDIR}" -PSTAGE_UPDATE_CMD = "ipkg-cl update -f ${DEPLOY_DIR_PSTAGE}/ipkg-${MACHINE}.conf -o ${TMPDIR}" -PSTAGE_REMOVE_CMD = "ipkg-cl remove -force-depends -f ${DEPLOY_DIR_PSTAGE}/ipkg-${MACHINE}.conf -o ${TMPDIR}" -PSTAGE_LIST_CMD = "ipkg-cl list_installed -f ${DEPLOY_DIR_PSTAGE}/ipkg-${MACHINE}.conf -o ${TMPDIR}" -PSTAGE_PKGNAME = "staging-${PN}_${PV}-${PR}_${MULTIMACH_ARCH}.ipk" +PSTAGE_INSTALL_CMD = "ipkg-cl install -force-depends -f ${PSTAGE_MACHCONFIG} -o ${TMPDIR}" +PSTAGE_UPDATE_CMD = "ipkg-cl update -f ${PSTAGE_MACHCONFIG} -o ${TMPDIR}" +PSTAGE_REMOVE_CMD = "ipkg-cl remove -force-depends -f ${PSTAGE_MACHCONFIG} -o ${TMPDIR}" +PSTAGE_LIST_CMD = "ipkg-cl list_installed -f ${PSTAGE_MACHCONFIG} -o ${TMPDIR}" PSTAGE_TMPDIR_STAGE = "${WORKDIR}/staging-pkg" @@ -48,14 +99,14 @@ do_clean_append() { if ret != 0: bb.note("Failure removing staging package") - stagepkg = bb.data.expand("${DEPLOY_DIR_PSTAGE}/${PSTAGE_PKGNAME}", d) + stagepkg = bb.data.expand("${PSTAGE_PKG}", d) bb.note("Removing staging package %s" % stagepkg) - #os.system('rm -rf ' + stagepkg) + os.system('rm -rf ' + stagepkg) } staging_helper () { - #assemble appropriate ipkg.conf - conffile=${DEPLOY_DIR_PSTAGE}/ipkg-${MACHINE}.conf + # Assemble appropriate ipkg.conf + conffile=${PSTAGE_MACHCONFIG} mkdir -p ${DEPLOY_DIR_PSTAGE}/pstaging_lists if [ ! -e $conffile ]; then ipkgarchs="${BUILD_ARCH} all any noarch ${TARGET_ARCH} ${PACKAGE_ARCHS} ${PACKAGE_EXTRA_ARCHS} ${MACHINE}" @@ -64,21 +115,15 @@ staging_helper () { echo "arch $arch $priority" >> $conffile priority=$(expr $priority + 5) done - echo "src oe-staging file:${DEPLOY_DIR_PSTAGE}" >> $conffile - - OLD_PWD=`pwd` - cd ${DEPLOY_DIR_PSTAGE} - ipkg-make-index -p Packages . - cd ${OLD_PWD} - - ${PSTAGE_UPDATE_CMD} fi } +PSTAGE_TASKS_COVERED = "fetch unpack munge patch configure qa_configure rig_locales compile sizecheck install deploy package populate_staging package_write_deb package_write_ipk package_write package_stage qa_staging" + python do_prepackaged_stage () { import os - if bb.data.getVar("PSTAGING_DISABLED", d, 1) == "1": + if bb.data.getVar("PSTAGING_ACTIVE", d, 1) == "0": bb.build.make_stamp("do_prepackaged_stage", d) return @@ -92,7 +137,7 @@ python do_prepackaged_stage () { if ret != 0: bb.note("Failure attempting to remove staging package") - stagepkg = bb.data.expand("${DEPLOY_DIR_PSTAGE}/${PSTAGE_PKGNAME}", d) + stagepkg = bb.data.expand("${PSTAGE_PKG}", d) if os.path.exists(stagepkg): bb.note("Following speedup\n") @@ -109,23 +154,9 @@ python do_prepackaged_stage () { bb.note("Failure installing prestage package") bb.build.make_stamp("do_prepackaged_stage", d) - bb.build.make_stamp("do_fetch", d) - bb.build.make_stamp("do_unpack", d) - bb.build.make_stamp("do_munge", d) - bb.build.make_stamp("do_patch", d) - bb.build.make_stamp("do_configure", d) - bb.build.make_stamp("do_qa_configure", d) - bb.build.make_stamp("do_rig_locales", d) - bb.build.make_stamp("do_compile", d) - bb.build.make_stamp("do_install", d) - bb.build.make_stamp("do_deploy", d) - bb.build.make_stamp("do_package", d) - bb.build.make_stamp("do_populate_staging", d) - bb.build.make_stamp("do_package_write_deb", d) - bb.build.make_stamp("do_package_write_ipk", d) - bb.build.make_stamp("do_package_write", d) - bb.build.make_stamp("do_package_stage", d) - bb.build.make_stamp("do_qa_staging", d) + for task in bb.data.getVar("PSTAGE_TASKS_COVERED", d, 1).split(): + bb.build.make_stamp("do_" + task, d) + bb.build.make_stamp("do_stage_package_populated", d) else: bb.build.make_stamp("do_prepackaged_stage", d) @@ -134,17 +165,38 @@ do_prepackaged_stage[cleandirs] = "${PSTAGE_TMPDIR_STAGE}" do_prepackaged_stage[selfstamp] = "1" addtask prepackaged_stage before do_fetch -populate_staging_preamble () { - if [ "$PSTAGING_DISABLED" != "1" ]; then - #mkdir -p ${DEPLOY_DIR_PSTAGE} +addhandler packagedstage_stampfixing_eventhandler +python packagedstage_stampfixing_eventhandler() { + from bb.event import getName + import os - stage-manager -p ${STAGING_DIR} -c ${DEPLOY_DIR_PSTAGE}/stamp-cache-staging -u - stage-manager -p ${CROSS_DIR} -c ${DEPLOY_DIR_PSTAGE}/stamp-cache-cross -u + if getName(e) == "StampUpdate": + taskscovered = bb.data.getVar("PSTAGE_TASKS_COVERED", e.data, 1).split() + for (fn, task) in e.targets: + # strip off 'do_' + task = task[3:] + if task in taskscovered: + stamp = "%s.do_stage_package_populated" % e.stampPrefix[fn] + if os.path.exists(stamp): + # We're targetting a task which was skipped with packaged staging + # so we need to remove the autogenerated stamps. + for task in taskscovered: + dir = "%s.do_%s" % (e.stampPrefix[fn], task) + os.system('rm -f ' + dir) + os.system('rm -f ' + stamp) + + return NotHandled +} + +populate_staging_preamble () { + if [ "$PSTAGING_ACTIVE" = "1" ]; then + stage-manager -p ${STAGING_DIR} -c ${DEPLOY_DIR_PSTAGE}/stamp-cache-staging -u || true + stage-manager -p ${CROSS_DIR} -c ${DEPLOY_DIR_PSTAGE}/stamp-cache-cross -u || true fi } populate_staging_postamble () { - if [ "$PSTAGING_DISABLED" != "1" ]; then + if [ "$PSTAGING_ACTIVE" = "1" ]; then # list the packages currently installed in staging ${PSTAGE_LIST_CMD} | awk '{print $1}' > ${DEPLOY_DIR_PSTAGE}/installed-list @@ -169,22 +221,27 @@ python do_populate_staging_append() { staging_packager () { mkdir -p ${PSTAGE_TMPDIR_STAGE}/CONTROL + mkdir -p ${DEPLOY_DIR_PSTAGE}/${PSTAGE_PKGPATH} echo "Package: staging-${PN}" > ${PSTAGE_TMPDIR_STAGE}/CONTROL/control - echo "Version: ${PV}-${PR}" >> ${PSTAGE_TMPDIR_STAGE}/CONTROL/control + echo "Version: ${PSTAGE_PKGVERSION}" >> ${PSTAGE_TMPDIR_STAGE}/CONTROL/control echo "Description: ${DESCRIPTION}" >> ${PSTAGE_TMPDIR_STAGE}/CONTROL/control echo "Section: ${SECTION}" >> ${PSTAGE_TMPDIR_STAGE}/CONTROL/control echo "Priority: Optional" >> ${PSTAGE_TMPDIR_STAGE}/CONTROL/control echo "Maintainer: ${MAINTAINER}" >> ${PSTAGE_TMPDIR_STAGE}/CONTROL/control - echo "Architecture: ${MULTIMACH_ARCH}" >> ${PSTAGE_TMPDIR_STAGE}/CONTROL/control + echo "Architecture: ${PSTAGE_PKGARCH}" >> ${PSTAGE_TMPDIR_STAGE}/CONTROL/control echo "Source: ${SRC_URI}" >> ${PSTAGE_TMPDIR_STAGE}/CONTROL/control - ${PSTAGE_BUILD_CMD} ${PSTAGE_TMPDIR_STAGE} ${DEPLOY_DIR_PSTAGE} - ${PSTAGE_INSTALL_CMD} ${DEPLOY_DIR_PSTAGE}/${PSTAGE_PKGNAME} + ${PSTAGE_BUILD_CMD} ${PSTAGE_TMPDIR_STAGE} ${DEPLOY_DIR_PSTAGE}/${PSTAGE_PKGPATH} + ${PSTAGE_INSTALL_CMD} ${PSTAGE_PKG} +} + +staging_package_installer () { + ${PSTAGE_INSTALL_CMD} ${PSTAGE_PKG} } python do_package_stage () { - if bb.data.getVar("PSTAGING_DISABLED", d, 1) == "1": + if bb.data.getVar("PSTAGING_ACTIVE", d, 1) != "1": return bb.build.exec_func("read_subpackage_metadata", d) @@ -216,17 +273,17 @@ python do_package_stage () { if bb.data.inherits_class('package_deb', d): if arch == 'all': srcname = bb.data.expand(pkgname + "_${PV}-${PR}_all.deb", d) - else: + else: srcname = bb.data.expand(pkgname + "_${PV}-${PR}_${DPKG_ARCH}.deb", d) srcfile = bb.data.expand("${DEPLOY_DIR_DEB}/" + arch + "/" + srcname, d) if not os.path.exists(srcfile): bb.fatal("Package %s does not exist yet it should" % srcfile) bb.copyfile(srcfile, debpath + "/" + srcname) bb.build.exec_func("staging_helper", d) - lf = bb.utils.lockfile(bb.data.expand("${STAGING_DIR}/staging.lock", d)) bb.build.exec_func("staging_packager", d) + lf = bb.utils.lockfile(bb.data.expand("${STAGING_DIR}/staging.lock", d)) + bb.build.exec_func("staging_package_installer", d) bb.utils.unlockfile(lf) } addtask package_stage after do_package_write do_populate_staging before do_build - -- cgit v1.2.3 From 03a901e57995815742c3faa71c1a7ba9ba64b732 Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Fri, 14 Mar 2008 12:06:32 +0000 Subject: packaged-staging bbclass: make PSTAGE_EXTRAPATH overridable --- classes/packaged-staging.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'classes') diff --git a/classes/packaged-staging.bbclass b/classes/packaged-staging.bbclass index c807e4210f..6f8f84ddee 100644 --- a/classes/packaged-staging.bbclass +++ b/classes/packaged-staging.bbclass @@ -13,7 +13,7 @@ # PSTAGE_PKGVERSION = "${PV}-${PR}" PSTAGE_PKGARCH = "${MULTIMACH_ARCH}" -PSTAGE_EXTRAPATH = "" +PSTAGE_EXTRAPATH ?= "" PSTAGE_PKGPATH = "${DISTRO}${PSTAGE_EXTRAPATH}" PSTAGE_PKGNAME = "staging-${PN}_${PSTAGE_PKGVERSION}_${PSTAGE_PKGARCH}.ipk" PSTAGE_PKG = "${DEPLOY_DIR_PSTAGE}/${PSTAGE_PKGPATH}/${PSTAGE_PKGNAME}" -- cgit v1.2.3 From e3e0ec29e303e833aef71d1653d6743257433182 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Fri, 14 Mar 2008 16:26:33 +0000 Subject: base.bbclass: Add .la file brute force sed enhancement from poky --- classes/base.bbclass | 1 + 1 file changed, 1 insertion(+) (limited to 'classes') diff --git a/classes/base.bbclass b/classes/base.bbclass index 615d02d07e..cfdcaf9c3e 100644 --- a/classes/base.bbclass +++ b/classes/base.bbclass @@ -325,6 +325,7 @@ oe_libinstall() { __runcmd rm -f $destpath/$libname.la __runcmd sed -e 's/^installed=yes$/installed=no/' \ -e '/^dependency_libs=/s,${WORKDIR}[[:alnum:]/\._+-]*/\([[:alnum:]\._+-]*\),${STAGING_LIBDIR}/\1,g' \ + -e "/^dependency_libs=/s,\([[:space:]']+\)${libdir},\1${STAGING_LIBDIR},g" \ $dotlai >$destpath/$libname.la else __runcmd install -m 0644 $dotlai $destpath/$libname.la -- cgit v1.2.3 From 53d4e93052b2cbefe1e2175f1183f8821f3109f5 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Fri, 14 Mar 2008 16:28:12 +0000 Subject: base.bbclass, package.bbclass: Move package_stagefile function to base.bbclass and add shell version --- classes/base.bbclass | 19 +++++++++++++++++++ classes/package.bbclass | 12 ------------ 2 files changed, 19 insertions(+), 12 deletions(-) (limited to 'classes') diff --git a/classes/base.bbclass b/classes/base.bbclass index cfdcaf9c3e..c2ce508538 100644 --- a/classes/base.bbclass +++ b/classes/base.bbclass @@ -368,6 +368,25 @@ oe_libinstall() { __runcmd cd "$olddir" } +def package_stagefile(file, d): + import bb, os + + if bb.data.getVar('PSTAGING_ACTIVE', d, True) == "1": + destfile = file.replace(bb.data.getVar("TMPDIR", d, 1), bb.data.getVar("PSTAGE_TMPDIR_STAGE", d, 1)) + bb.mkdirhier(os.path.dirname(destfile)) + #print "%s to %s" % (file, destfile) + bb.copyfile(file, destfile) + +package_stagefile_shell() { + if [ "$PSTAGING_ACTIVE" = "1" ]; then + srcfile=$1 + destfile=`echo $srcfile | sed s#${TMPDIR}#${PSTAGE_TMPDIR_STAGE}#` + destdir=`dirname $destfile` + mkdir -p $destdir + cp -dp $srcfile $destfile + fi +} + oe_machinstall() { # Purpose: Install machine dependent files, if available # If not available, check if there is a default diff --git a/classes/package.bbclass b/classes/package.bbclass index f9d9193c32..9fc4df0b98 100644 --- a/classes/package.bbclass +++ b/classes/package.bbclass @@ -459,18 +459,6 @@ python populate_packages () { } populate_packages[dirs] = "${D}" -def package_stagefile(file, d): - import bb, os - - pstageactive = bb.data.getVar('PSTAGING_ACTIVE', d, True) - - if pstageactive == "1": - destfile = file.replace(bb.data.getVar("TMPDIR", d, 1), bb.data.getVar("PSTAGE_TMPDIR_STAGE", d, 1)) - bb.mkdirhier(os.path.dirname(destfile)) - #print "%s to %s" % (file, destfile) - bb.copyfile(file, destfile) - - python emit_pkgdata() { from glob import glob -- cgit v1.2.3 From 20b23c1d880ad52c14e80544c3a1c9ccec98641c Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Fri, 14 Mar 2008 17:03:48 +0000 Subject: packaged-staging.bbclass: Switch to including stamps files in the staging package so the timestamps are preserved exactly --- classes/packaged-staging.bbclass | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) (limited to 'classes') diff --git a/classes/packaged-staging.bbclass b/classes/packaged-staging.bbclass index 6f8f84ddee..7fb136afce 100644 --- a/classes/packaged-staging.bbclass +++ b/classes/packaged-staging.bbclass @@ -153,9 +153,9 @@ python do_prepackaged_stage () { if ret != 0: bb.note("Failure installing prestage package") - bb.build.make_stamp("do_prepackaged_stage", d) - for task in bb.data.getVar("PSTAGE_TASKS_COVERED", d, 1).split(): - bb.build.make_stamp("do_" + task, d) + #bb.build.make_stamp("do_prepackaged_stage", d) + #for task in bb.data.getVar("PSTAGE_TASKS_COVERED", d, 1).split(): + # bb.build.make_stamp("do_" + task, d) bb.build.make_stamp("do_stage_package_populated", d) else: @@ -244,10 +244,13 @@ python do_package_stage () { if bb.data.getVar("PSTAGING_ACTIVE", d, 1) != "1": return + # + # Handle deploy/ packages + # bb.build.exec_func("read_subpackage_metadata", d) + stagepath = bb.data.getVar("PSTAGE_TMPDIR_STAGE", d, 1) packages = (bb.data.getVar('PACKAGES', d, 1) or "").split() if len(packages) > 0: - stagepath = bb.data.getVar("PSTAGE_TMPDIR_STAGE", d, 1) if bb.data.inherits_class('package_ipk', d): ipkpath = os.path.join(stagepath, "deploy", "ipk") bb.mkdirhier(ipkpath) @@ -279,6 +282,18 @@ python do_package_stage () { if not os.path.exists(srcfile): bb.fatal("Package %s does not exist yet it should" % srcfile) bb.copyfile(srcfile, debpath + "/" + srcname) + + # + # Handle stamps/ files + # + stampfn = bb.data.getVar("STAMP", d, True) + tmpdir = bb.data.getVar("TMPDIR", d, True) + destdir = os.path.dirname(stampfn.replace(tmpdir, stagepath)) + bb.mkdirhier(destdir) + # We need to include the package_stage stamp in the staging package so create one + bb.build.make_stamp("do_package_stage", d) + os.system("cp %s.do_* %s/" % (stampfn, destdir)) + bb.build.exec_func("staging_helper", d) bb.build.exec_func("staging_packager", d) lf = bb.utils.lockfile(bb.data.expand("${STAGING_DIR}/staging.lock", d)) @@ -286,4 +301,7 @@ python do_package_stage () { bb.utils.unlockfile(lf) } +# +# Note an assumption here is that do_deploy runs before do_package_write/do_populate_staging +# addtask package_stage after do_package_write do_populate_staging before do_build -- cgit v1.2.3 From 96502b190d236f38574a88f947e5ba57956642cb Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Sat, 15 Mar 2008 14:01:55 +0000 Subject: gcc: Some futher .bb -> .inc changes --- classes/cpan.bbclass | 13 +++++++++++-- classes/insane.bbclass | 2 +- 2 files changed, 12 insertions(+), 3 deletions(-) (limited to 'classes') diff --git a/classes/cpan.bbclass b/classes/cpan.bbclass index 5a0b4a5c92..506d4c4c81 100644 --- a/classes/cpan.bbclass +++ b/classes/cpan.bbclass @@ -50,7 +50,16 @@ cpan_do_compile () { } cpan_do_install () { - oe_runmake install_vendor + if [ ${@is_target(d)} == "yes" ]; then + oe_runmake install_vendor + fi +} + +cpan_do_stage () { + if [ ${@is_target(d)} == "no" ]; then + oe_runmake install_vendor + fi } + -EXPORT_FUNCTIONS do_configure do_compile do_install +EXPORT_FUNCTIONS do_configure do_compile do_install do_stage diff --git a/classes/insane.bbclass b/classes/insane.bbclass index 5ff49cd65e..52264e44b5 100644 --- a/classes/insane.bbclass +++ b/classes/insane.bbclass @@ -341,7 +341,7 @@ def package_qa_check_staged(path,d): pkgconfigcheck = workdir else: installed = "installed=yes" - pkgconfigcheck = tmpdir + pkgconfigcheck = workdir # find all .la and .pc files # read the content -- cgit v1.2.3 From f4b9a60d4df924a24e1e6efe938eb2ddf4692c2f Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Sat, 15 Mar 2008 16:17:31 +0000 Subject: Reverse accidental changes in dc0f5b4ef4b836d72bf43dffa503ab86e6f7de54 --- classes/cpan.bbclass | 13 ++----------- classes/insane.bbclass | 2 +- 2 files changed, 3 insertions(+), 12 deletions(-) (limited to 'classes') diff --git a/classes/cpan.bbclass b/classes/cpan.bbclass index 506d4c4c81..5a0b4a5c92 100644 --- a/classes/cpan.bbclass +++ b/classes/cpan.bbclass @@ -50,16 +50,7 @@ cpan_do_compile () { } cpan_do_install () { - if [ ${@is_target(d)} == "yes" ]; then - oe_runmake install_vendor - fi -} - -cpan_do_stage () { - if [ ${@is_target(d)} == "no" ]; then - oe_runmake install_vendor - fi + oe_runmake install_vendor } - -EXPORT_FUNCTIONS do_configure do_compile do_install do_stage +EXPORT_FUNCTIONS do_configure do_compile do_install diff --git a/classes/insane.bbclass b/classes/insane.bbclass index 52264e44b5..5ff49cd65e 100644 --- a/classes/insane.bbclass +++ b/classes/insane.bbclass @@ -341,7 +341,7 @@ def package_qa_check_staged(path,d): pkgconfigcheck = workdir else: installed = "installed=yes" - pkgconfigcheck = workdir + pkgconfigcheck = tmpdir # find all .la and .pc files # read the content -- cgit v1.2.3 From 5263c836a2381d4dee6a64f2da05e7b6231e6e77 Mon Sep 17 00:00:00 2001 From: Rolf Leggewie Date: Sun, 16 Mar 2008 10:31:30 +0000 Subject: seppuku: have the name of the MACHINE in the attachment's description (as discussed on the ml) --- classes/seppuku.bbclass | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'classes') diff --git a/classes/seppuku.bbclass b/classes/seppuku.bbclass index 02f4b9a925..c6cde6e4d4 100644 --- a/classes/seppuku.bbclass +++ b/classes/seppuku.bbclass @@ -246,9 +246,10 @@ def seppuku_create_attachment(debug, poster, attach_query, product, component, b print >> debug, "Can't create an attachment, no attach_query passed to method" return False + logdescription = "Build log for machine %s" % (bb.data.getVar('MACHINE', data, True)) import urllib2 - param = { "bugid" : bug_number, "action" : "insert", "data" : file, "description" : "Build log", "ispatch" : "0", "contenttypemethod" : "list", "contenttypeselection" : "text/plain", "comment" : text } + param = { "bugid" : bug_number, "action" : "insert", "data" : file, "description" : logdescription, "ispatch" : "0", "contenttypemethod" : "list", "contenttypeselection" : "text/plain", "comment" : text } try: result = poster.open( attach_query, param ) -- cgit v1.2.3 From 4bc98b67904cb6c401ff22e42f3009c5d8e1c0f2 Mon Sep 17 00:00:00 2001 From: Rolf Leggewie Date: Sun, 16 Mar 2008 10:38:54 +0000 Subject: seppuku: add PN to comment line for attachment (as discussed on ml) --- classes/seppuku.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'classes') diff --git a/classes/seppuku.bbclass b/classes/seppuku.bbclass index c6cde6e4d4..e158339ad8 100644 --- a/classes/seppuku.bbclass +++ b/classes/seppuku.bbclass @@ -334,7 +334,7 @@ python seppuku_eventhandler() { "pv" : bb.data.getVar("PV", data, True), } log_file = glob.glob("%s/log.%s.*" % (bb.data.getVar('T', event.data, True), event.task)) - text = "The %s step failed at %s for machine %s" % (e.task, bb.data.getVar('DATETIME', data, True), bb.data.getVar( 'MACHINE', data, True ) ) + text = "The %s step in %s failed at %s for machine %s" % (e.task, bb.data.getVar("PN", data, True), bb.data.getVar('DATETIME', data, True), bb.data.getVar( 'MACHINE', data, True ) ) if len(log_file) != 0: print >> debug_file, "Adding log file %s" % log_file[0] file = open(log_file[0], 'r') -- cgit v1.2.3 From d7a340f33bf69a1d3fff48092a7d59367b71b769 Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Mon, 17 Mar 2008 12:30:03 +0000 Subject: sepukku: make attachments work again by importing bb and passing in e.data, based on a patch by RP --- classes/seppuku.bbclass | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'classes') diff --git a/classes/seppuku.bbclass b/classes/seppuku.bbclass index e158339ad8..b7aa3e20f1 100644 --- a/classes/seppuku.bbclass +++ b/classes/seppuku.bbclass @@ -228,7 +228,7 @@ def seppuku_file_bug(poster, file, product, component, bugname, text): else: return res[0] -def seppuku_create_attachment(debug, poster, attach_query, product, component, bug_number, text, file): +def seppuku_create_attachment(data, debug, poster, attach_query, product, component, bug_number, text, file): """ Create a new attachment for the failed report @@ -246,6 +246,7 @@ def seppuku_create_attachment(debug, poster, attach_query, product, component, b print >> debug, "Can't create an attachment, no attach_query passed to method" return False + import bb logdescription = "Build log for machine %s" % (bb.data.getVar('MACHINE', data, True)) import urllib2 @@ -351,7 +352,7 @@ python seppuku_eventhandler() { if bug_number and bug_open: print >> debug_file, "The bug is known as '%s'" % bug_number if file: - if not seppuku_create_attachment(debug_file, poster, attach, product, component, bug_number, text, file): + if not seppuku_create_attachment(data, debug_file, poster, attach, product, component, bug_number, text, file): print >> debug_file, "Failed to attach the build log for bug #%s" % bug_number else: print >> debug_file, "Created an attachment for '%s' '%s' '%s'" % (product, component, bug_number) @@ -372,7 +373,7 @@ python seppuku_eventhandler() { print >> debug_file, "The new bug_number: '%s'" % bug_number if bug_number and file: - if not seppuku_create_attachment(debug_file, poster, attach, product, component, bug_number, text, file): + if not seppuku_create_attachment(data, debug_file, poster, attach, product, component, bug_number, text, file): print >> debug_file, "Failed to attach the build log for bug #%s" % bug_number else: print >> debug_file, "Created an attachment for '%s' '%s' '%s'" % (product, component, bug_number) -- cgit v1.2.3 From 4ad83f919cff72b95ab00122a24d11381724e2f1 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Mon, 17 Mar 2008 20:38:12 +0000 Subject: packaged-staging.bbclass: Switch architecture to BUILD_SYS, inject the target triplet into the package name so staging remains multimachine compatible, fix problems with packages with split PR, use DEPLOY_DIR_IPK and DEPLOY_DIR_DEB variables --- classes/packaged-staging.bbclass | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) (limited to 'classes') diff --git a/classes/packaged-staging.bbclass b/classes/packaged-staging.bbclass index 7fb136afce..bd7255d610 100644 --- a/classes/packaged-staging.bbclass +++ b/classes/packaged-staging.bbclass @@ -12,10 +12,11 @@ # bitbake.conf set PSTAGING_ACTIVE = "0", this class sets to "1" if we're active # PSTAGE_PKGVERSION = "${PV}-${PR}" -PSTAGE_PKGARCH = "${MULTIMACH_ARCH}" +PSTAGE_PKGARCH = "${BUILD_SYS}" PSTAGE_EXTRAPATH ?= "" PSTAGE_PKGPATH = "${DISTRO}${PSTAGE_EXTRAPATH}" -PSTAGE_PKGNAME = "staging-${PN}_${PSTAGE_PKGVERSION}_${PSTAGE_PKGARCH}.ipk" +PSTAGE_PKGPN = "${@bb.data.expand('staging-${PN}-${MULTIMACH_ARCH}${TARGET_VENDOR}-${TARGET_OS}', d).replace('_', '-')}" +PSTAGE_PKGNAME = "${PSTAGE_PKGPN}_${PSTAGE_PKGVERSION}_${PSTAGE_PKGARCH}.ipk" PSTAGE_PKG = "${DEPLOY_DIR_PSTAGE}/${PSTAGE_PKGPATH}/${PSTAGE_PKGNAME}" # multimachine.bbclass will override this but add a default in case we're not using it @@ -77,7 +78,7 @@ python () { } DEPLOY_DIR_PSTAGE = "${DEPLOY_DIR}/pstage" -PSTAGE_MACHCONFIG = "${DEPLOY_DIR_PSTAGE}/ipkg-${MACHINE}.conf" +PSTAGE_MACHCONFIG = "${DEPLOY_DIR_PSTAGE}/ipkg.conf" PSTAGE_BUILD_CMD = "${IPKGBUILDCMD}" PSTAGE_INSTALL_CMD = "ipkg-cl install -force-depends -f ${PSTAGE_MACHCONFIG} -o ${TMPDIR}" @@ -94,7 +95,7 @@ do_clean_append() { bb.note("Uninstalling package from staging...") path = bb.data.getVar("PATH", d, 1) removecmd = bb.data.getVar("PSTAGE_REMOVE_CMD", d, 1) - removepkg = bb.data.expand("staging-${PN}", d) + removepkg = bb.data.expand("${PSTAGE_PKGPN}", d) ret = os.system("PATH=\"%s\" %s %s" % (path, removecmd, removepkg)) if ret != 0: bb.note("Failure removing staging package") @@ -109,7 +110,7 @@ staging_helper () { conffile=${PSTAGE_MACHCONFIG} mkdir -p ${DEPLOY_DIR_PSTAGE}/pstaging_lists if [ ! -e $conffile ]; then - ipkgarchs="${BUILD_ARCH} all any noarch ${TARGET_ARCH} ${PACKAGE_ARCHS} ${PACKAGE_EXTRA_ARCHS} ${MACHINE}" + ipkgarchs="${BUILD_SYS}" priority=1 for arch in $ipkgarchs; do echo "arch $arch $priority" >> $conffile @@ -130,7 +131,7 @@ python do_prepackaged_stage () { bb.note("Uninstalling any existing package from staging...") path = bb.data.getVar("PATH", d, 1) removecmd = bb.data.getVar("PSTAGE_REMOVE_CMD", d, 1) - removepkg = bb.data.expand("staging-${PN}", d) + removepkg = bb.data.expand("${PSTAGE_PKGPN}", d) lf = bb.utils.lockfile(bb.data.expand("${STAGING_DIR}/staging.lock", d)) ret = os.system("PATH=\"%s\" %s %s" % (path, removecmd, removepkg)) bb.utils.unlockfile(lf) @@ -223,7 +224,7 @@ staging_packager () { mkdir -p ${PSTAGE_TMPDIR_STAGE}/CONTROL mkdir -p ${DEPLOY_DIR_PSTAGE}/${PSTAGE_PKGPATH} - echo "Package: staging-${PN}" > ${PSTAGE_TMPDIR_STAGE}/CONTROL/control + echo "Package: ${PSTAGE_PKGPN}" > ${PSTAGE_TMPDIR_STAGE}/CONTROL/control echo "Version: ${PSTAGE_PKGVERSION}" >> ${PSTAGE_TMPDIR_STAGE}/CONTROL/control echo "Description: ${DESCRIPTION}" >> ${PSTAGE_TMPDIR_STAGE}/CONTROL/control echo "Section: ${SECTION}" >> ${PSTAGE_TMPDIR_STAGE}/CONTROL/control @@ -249,13 +250,14 @@ python do_package_stage () { # bb.build.exec_func("read_subpackage_metadata", d) stagepath = bb.data.getVar("PSTAGE_TMPDIR_STAGE", d, 1) + tmpdir = bb.data.getVar("TMPDIR", d, True) packages = (bb.data.getVar('PACKAGES', d, 1) or "").split() if len(packages) > 0: if bb.data.inherits_class('package_ipk', d): - ipkpath = os.path.join(stagepath, "deploy", "ipk") + ipkpath = bb.data.getVar('DEPLOY_DIR_IPK', d, True).replace(tmpdir, stagepath) bb.mkdirhier(ipkpath) if bb.data.inherits_class('package_deb', d): - debpath = os.path.join(stagepath, "deploy", "deb") + debpath = bb.data.getVar('DEPLOY_DIR_DEB', d, True).replace(tmpdir, stagepath) bb.mkdirhier(debpath) for pkg in packages: @@ -265,19 +267,22 @@ python do_package_stage () { arch = bb.data.getVar('PACKAGE_ARCH_%s' % pkg, d, 1) if not arch: arch = bb.data.getVar('PACKAGE_ARCH', d, 1) + pr = bb.data.getVar('PR_%s' % pkg, d, 1) + if not pr: + pr = bb.data.getVar('PR', d, 1) if not packaged(pkg, d): continue if bb.data.inherits_class('package_ipk', d): - srcname = bb.data.expand(pkgname + "_${PV}-${PR}_" + arch + ".ipk", d) + srcname = bb.data.expand(pkgname + "_${PV}-" + pr + "_" + arch + ".ipk", d) srcfile = bb.data.expand("${DEPLOY_DIR_IPK}/" + arch + "/" + srcname, d) if not os.path.exists(srcfile): bb.fatal("Package %s does not exist yet it should" % srcfile) bb.copyfile(srcfile, ipkpath + "/" + srcname) if bb.data.inherits_class('package_deb', d): if arch == 'all': - srcname = bb.data.expand(pkgname + "_${PV}-${PR}_all.deb", d) + srcname = bb.data.expand(pkgname + "_${PV}-" + pr + "_all.deb", d) else: - srcname = bb.data.expand(pkgname + "_${PV}-${PR}_${DPKG_ARCH}.deb", d) + srcname = bb.data.expand(pkgname + "_${PV}-" + pr + "_${DPKG_ARCH}.deb", d) srcfile = bb.data.expand("${DEPLOY_DIR_DEB}/" + arch + "/" + srcname, d) if not os.path.exists(srcfile): bb.fatal("Package %s does not exist yet it should" % srcfile) @@ -287,7 +292,6 @@ python do_package_stage () { # Handle stamps/ files # stampfn = bb.data.getVar("STAMP", d, True) - tmpdir = bb.data.getVar("TMPDIR", d, True) destdir = os.path.dirname(stampfn.replace(tmpdir, stagepath)) bb.mkdirhier(destdir) # We need to include the package_stage stamp in the staging package so create one -- cgit v1.2.3 From 1a8b1be8bc30c90a2f888450aceec53d4b281466 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Mon, 17 Mar 2008 20:41:23 +0000 Subject: package.bbclass: Write out PR into pkgdata since some packages override it --- classes/package.bbclass | 1 + 1 file changed, 1 insertion(+) (limited to 'classes') diff --git a/classes/package.bbclass b/classes/package.bbclass index 9fc4df0b98..6c3d70d4b7 100644 --- a/classes/package.bbclass +++ b/classes/package.bbclass @@ -497,6 +497,7 @@ python emit_pkgdata() { write_if_exists(sf, pkg, 'RSUGGESTS') write_if_exists(sf, pkg, 'RREPLACES') write_if_exists(sf, pkg, 'RCONFLICTS') + write_if_exists(sf, pkg, 'PR') write_if_exists(sf, pkg, 'PKG') write_if_exists(sf, pkg, 'ALLOW_EMPTY') write_if_exists(sf, pkg, 'FILES') -- cgit v1.2.3 From 6cc27ed49193fa0314d1f7b7ba0463a46f7dbc81 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Mon, 17 Mar 2008 20:43:12 +0000 Subject: cpan.bbclass: Run the install routine as the staging task instead of install when run as part of a native build --- classes/cpan.bbclass | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'classes') diff --git a/classes/cpan.bbclass b/classes/cpan.bbclass index 5a0b4a5c92..506d4c4c81 100644 --- a/classes/cpan.bbclass +++ b/classes/cpan.bbclass @@ -50,7 +50,16 @@ cpan_do_compile () { } cpan_do_install () { - oe_runmake install_vendor + if [ ${@is_target(d)} == "yes" ]; then + oe_runmake install_vendor + fi +} + +cpan_do_stage () { + if [ ${@is_target(d)} == "no" ]; then + oe_runmake install_vendor + fi } + -EXPORT_FUNCTIONS do_configure do_compile do_install +EXPORT_FUNCTIONS do_configure do_compile do_install do_stage -- cgit v1.2.3 From 2d6a5aa1ace8f7a7a4de76fa8ae23e048ddda2b9 Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Tue, 18 Mar 2008 21:58:41 +0000 Subject: various: move over to opkg, as discussed on the mailinglist * death to ipkg! --- classes/image.bbclass | 6 ++---- classes/package_ipk.bbclass | 14 +++++++------- classes/packaged-staging.bbclass | 18 ++++++++++-------- classes/rootfs_deb.bbclass | 18 +++++++++--------- classes/rootfs_ipk.bbclass | 28 +++++++++++++++------------- classes/testlab.bbclass | 12 ++++++------ 6 files changed, 49 insertions(+), 47 deletions(-) (limited to 'classes') diff --git a/classes/image.bbclass b/classes/image.bbclass index 67a3a4fa10..f8d896d813 100644 --- a/classes/image.bbclass +++ b/classes/image.bbclass @@ -85,8 +85,6 @@ fakeroot do_rootfs () { insert_feed_uris - rm -f ${IMAGE_ROOTFS}${libdir}/ipkg/lists/* - ${IMAGE_PREPROCESS_COMMAND} export TOPDIR=${TOPDIR} @@ -132,7 +130,7 @@ insert_feed_uris () { echo "Added $feed_name feed with URL $feed_uri" # insert new feed-sources - echo "src/gz $feed_name $feed_uri" >> ${IMAGE_ROOTFS}/etc/ipkg/${feed_name}-feed.conf + echo "src/gz $feed_name $feed_uri" >> ${IMAGE_ROOTFS}/etc/opkg/${feed_name}-feed.conf done # Allow to use package deploy directory contents as quick devel-testing @@ -142,7 +140,7 @@ insert_feed_uris () { if [ -n "${FEED_DEPLOYDIR_BASE_URI}" ]; then for arch in ${PACKAGE_ARCHS} do - echo "src/gz local-$arch ${FEED_DEPLOYDIR_BASE_URI}/$arch" >> ${IMAGE_ROOTFS}/etc/ipkg/local-$arch-feed.conf + echo "src/gz local-$arch ${FEED_DEPLOYDIR_BASE_URI}/$arch" >> ${IMAGE_ROOTFS}/etc/opkg/local-$arch-feed.conf done fi } diff --git a/classes/package_ipk.bbclass b/classes/package_ipk.bbclass index e47bc6a880..f05b7449cf 100644 --- a/classes/package_ipk.bbclass +++ b/classes/package_ipk.bbclass @@ -1,17 +1,17 @@ inherit package -BOOTSTRAP_EXTRA_RDEPENDS += "ipkg-collateral ipkg" +BOOTSTRAP_EXTRA_RDEPENDS += "opkg-collateral opkg" IMAGE_PKGTYPE ?= "ipk" -IPKGCONF_TARGET = "${STAGING_ETCDIR_NATIVE}/ipkg.conf" -IPKGCONF_SDK = "${STAGING_ETCDIR_NATIVE}/ipkg-sdk.conf" +IPKGCONF_TARGET = "${STAGING_ETCDIR_NATIVE}/opkg.conf" +IPKGCONF_SDK = "${STAGING_ETCDIR_NATIVE}/opkg-sdk.conf" python package_ipk_fn () { from bb import data bb.data.setVar('PKGFN', bb.data.getVar('PKG',d), d) } -python package_ipk_install () { +python package_ipk_install () { # # Warning - this function is not multimachine safe (see stagingdir reference)! # @@ -35,7 +35,7 @@ python package_ipk_install () { raise bb.build.FuncFailed # Generate ipk.conf if it or the stamp doesnt exist - conffile = os.path.join(stagingdir,"ipkg.conf") + conffile = os.path.join(stagingdir,"opkg.conf") if not os.access(conffile, os.R_OK): ipkg_archs = bb.data.getVar('PACKAGE_ARCHS',d) if ipkg_archs is None: @@ -60,8 +60,8 @@ python package_ipk_install () { f = open(os.path.join(tmpdir, "stamps", "IPK_PACKAGE_INDEX_CLEAN"),"w") f.close() - ret = os.system('ipkg-cl -o %s -f %s update' % (rootfs, conffile)) - ret = os.system('ipkg-cl -o %s -f %s install %s' % (rootfs, conffile, pkgfn)) + ret = os.system('opkg-cl -o %s -f %s update' % (rootfs, conffile)) + ret = os.system('opkg-cl -o %s -f %s install %s' % (rootfs, conffile, pkgfn)) if (ret != 0 ): raise bb.build.FuncFailed } diff --git a/classes/packaged-staging.bbclass b/classes/packaged-staging.bbclass index bd7255d610..1c717b415e 100644 --- a/classes/packaged-staging.bbclass +++ b/classes/packaged-staging.bbclass @@ -26,6 +26,8 @@ PSTAGE_NATIVEDEPENDS = "\ pkgconfig-native \ autoconf-native \ automake-native \ + curl-native \ + zlib-native \ libtool-native \ gnu-config-native \ shasum-native \ @@ -33,7 +35,7 @@ PSTAGE_NATIVEDEPENDS = "\ automake-native \ update-alternatives-cworth-native \ ipkg-utils-native \ - ipkg-native \ + opkg-native \ m4-native \ quilt-native \ stagemanager-native \ @@ -70,7 +72,7 @@ python () { bb.data.setVarFlag('do_populate_staging', 'depends', deps, d) deps = bb.data.getVarFlag('do_prepackaged_stage', 'depends', d) or "" - deps += " ipkg-native:do_populate_staging ipkg-utils-native:do_populate_staging" + deps += " opkg-native:do_populate_staging ipkg-utils-native:do_populate_staging" bb.data.setVarFlag('do_prepackaged_stage', 'depends', deps, d) bb.data.setVar("PSTAGING_ACTIVE", "1", d) else: @@ -78,13 +80,13 @@ python () { } DEPLOY_DIR_PSTAGE = "${DEPLOY_DIR}/pstage" -PSTAGE_MACHCONFIG = "${DEPLOY_DIR_PSTAGE}/ipkg.conf" +PSTAGE_MACHCONFIG = "${DEPLOY_DIR_PSTAGE}/opkg.conf" PSTAGE_BUILD_CMD = "${IPKGBUILDCMD}" -PSTAGE_INSTALL_CMD = "ipkg-cl install -force-depends -f ${PSTAGE_MACHCONFIG} -o ${TMPDIR}" -PSTAGE_UPDATE_CMD = "ipkg-cl update -f ${PSTAGE_MACHCONFIG} -o ${TMPDIR}" -PSTAGE_REMOVE_CMD = "ipkg-cl remove -force-depends -f ${PSTAGE_MACHCONFIG} -o ${TMPDIR}" -PSTAGE_LIST_CMD = "ipkg-cl list_installed -f ${PSTAGE_MACHCONFIG} -o ${TMPDIR}" +PSTAGE_INSTALL_CMD = "opkg-cl install -force-depends -f ${PSTAGE_MACHCONFIG} -o ${TMPDIR}" +PSTAGE_UPDATE_CMD = "opkg-cl update -f ${PSTAGE_MACHCONFIG} -o ${TMPDIR}" +PSTAGE_REMOVE_CMD = "opkg-cl remove -force-depends -f ${PSTAGE_MACHCONFIG} -o ${TMPDIR}" +PSTAGE_LIST_CMD = "opkg-cl list_installed -f ${PSTAGE_MACHCONFIG} -o ${TMPDIR}" PSTAGE_TMPDIR_STAGE = "${WORKDIR}/staging-pkg" @@ -106,7 +108,7 @@ do_clean_append() { } staging_helper () { - # Assemble appropriate ipkg.conf + # Assemble appropriate opkg.conf conffile=${PSTAGE_MACHCONFIG} mkdir -p ${DEPLOY_DIR_PSTAGE}/pstaging_lists if [ ! -e $conffile ]; then diff --git a/classes/rootfs_deb.bbclass b/classes/rootfs_deb.bbclass index 5237285e4c..c59c75e1e5 100644 --- a/classes/rootfs_deb.bbclass +++ b/classes/rootfs_deb.bbclass @@ -109,22 +109,22 @@ fakeroot rootfs_deb_do_rootfs () { set -e - # Hacks to make dpkg/ipkg coexist for now + # Hacks to make dpkg/opkg coexist for now mv ${IMAGE_ROOTFS}/var/dpkg ${IMAGE_ROOTFS}/usr/ if [ -e ${IMAGE_ROOTFS}/usr/dpkg/alternatives ]; then rmdir ${IMAGE_ROOTFS}/usr/dpkg/alternatives fi - if [ ! -e ${IMAGE_ROOTFS}${libdir}/ipkg ] ; then - mkdir -p ${IMAGE_ROOTFS}${libdir}/ipkg + if [ ! -e ${IMAGE_ROOTFS}${libdir}/opkg ] ; then + mkdir -p ${IMAGE_ROOTFS}${libdir}/opkg fi - if [ ! -e ${IMAGE_ROOTFS}${sysconfdir}/ipkg ] ; then - mkdir -p ${IMAGE_ROOTFS}${sysconfdir}/ipkg + if [ ! -e ${IMAGE_ROOTFS}${sysconfdir}/opkg ] ; then + mkdir -p ${IMAGE_ROOTFS}${sysconfdir}/opkg fi - ln -sf ${libdir}/ipkg/alternatives ${IMAGE_ROOTFS}/usr/dpkg/alternatives - ln -sf /usr/dpkg/info ${IMAGE_ROOTFS}${libdir}/ipkg/info - ln -sf /usr/dpkg/status ${IMAGE_ROOTFS}${libdir}/ipkg/status + ln -sf ${libdir}/opkg/alternatives ${IMAGE_ROOTFS}/usr/dpkg/alternatives + ln -sf /usr/dpkg/info ${IMAGE_ROOTFS}${libdir}/opkg/info + ln -sf /usr/dpkg/status ${IMAGE_ROOTFS}${libdir}/opkg/status ${ROOTFS_POSTPROCESS_COMMAND} @@ -152,6 +152,6 @@ rootfs_deb_log_check() { } remove_packaging_data_files() { - rm -rf ${IMAGE_ROOTFS}${libdir}/ipkg/ + rm -rf ${IMAGE_ROOTFS}${libdir}/opkg/ rm -rf ${IMAGE_ROOTFS}/usr/dpkg/ } diff --git a/classes/rootfs_ipk.bbclass b/classes/rootfs_ipk.bbclass index 28ba03d675..4954fb2c44 100644 --- a/classes/rootfs_ipk.bbclass +