2017-08-01 13:17 GMT+03:00 Henning Schild : > Signed-off-by: Henning Schild > --- > meta/classes/dpkg.bbclass | 15 ++++++--------- > 1 file changed, 6 insertions(+), 9 deletions(-) > > diff --git a/meta/classes/dpkg.bbclass b/meta/classes/dpkg.bbclass > index 3d7aafb..1d0132b 100644 > --- a/meta/classes/dpkg.bbclass > +++ b/meta/classes/dpkg.bbclass > @@ -10,9 +10,7 @@ do_unpack[deptask] = "do_build" > # Each package should have its own unique build folder, so use > # recipe name as identifier > PP = "/home/builder/${PN}" > -BUILDROOT = "${BUILDCHROOT_DIR}/${PP}" > - > -do_fetch[dirs] = "${DL_DIR}" > +WORKDIR = "${BUILDCHROOT_DIR}/${PP}" > WORKDIR is no the only folder to fetch sources to. This folder represents workspace for all operation with folder, for example $WORKDIR/temp contails log files. Initially Isar designed to follow OE/Yocto style where it's possible. Traditionally tmp/work folder contains all the packages workspaces with: build atifacts, patches, bitbake logs etc... So in general it looks like (roughly speaking): tmp/work/toolchain/package/* This conception ideally works with cross-compilation, when you can compile packages out of the rootfs tree. Isar implements native compilation, so we can't build package within current workspace. So the decision was to keep workspace as it is but relocate build folder to buildchroot. The main benefit of this approach, that there is a single package workspace for bitbake metadata, while there may be many buildchroots (different Debian distros and machines/architectures). In my opinion this change is another step away from OE/Yocto style. @Henning: could you please describe the motivation of this change? @All: any opinions are highly appreciated. > > # Fetch package from the source link > python do_fetch() { > @@ -28,10 +26,10 @@ python do_fetch() { > } > > addtask fetch before do_build > +do_fetch[dirs] = "${DL_DIR}" > > -do_unpack[dirs] = "${BUILDROOT}" > do_unpack[stamp-extra-info] = "${DISTRO}" > -S ?= "${BUILDROOT}" > +S ?= "${WORKDIR}" > S folder is used for unpacking sources. WORKDIR - is whole package workspace. S should not equal to WORKDIR, otherwise this will lead to mess between package sources and bitbake metadata. For example Also artifacts from FILESDIR are usually installed to the root of WORKDIR. > > # Unpack package and put it into working directory in buildchroot > python do_unpack() { > @@ -39,16 +37,15 @@ python do_unpack() { > if len(src_uri) == 0: > return > > - rootdir = d.getVar('BUILDROOT', True) > - > try: > fetcher = bb.fetch2.Fetch(src_uri, d) > - fetcher.unpack(rootdir) > + fetcher.unpack(d.getVar('WORKDIR', True)) > except bb.fetch2.BBFetchException as e: > raise bb.build.FuncFailed(e) > } > > addtask unpack after do_fetch before do_build > +do_unpack[dirs] = "${WORKDIR}" > > do_build[stamp-extra-info] = "${DISTRO}" > > @@ -62,7 +59,7 @@ do_install[stamp-extra-info] = "${MACHINE}" > # Install package to dedicated deploy directory > do_install() { > install -d ${DEPLOY_DIR_DEB} > - install -m 755 ${BUILDROOT}/*.deb ${DEPLOY_DIR_DEB}/ > + install -m 755 ${WORKDIR}/*.deb ${DEPLOY_DIR_DEB}/ > } > > addtask do_install after do_build > -- > 2.13.0 > > -- > You received this message because you are subscribed to the Google Groups > "isar-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to isar-users+unsubscribe@googlegroups.com. > To post to this group, send email to isar-users@googlegroups.com. > To view this discussion on the web visit https://groups.google.com/d/ > msgid/isar-users/048e88d5072fc038c8bd6207334e9967d5a29e0c.1501582237.git. > henning.schild%40siemens.com. > For more options, visit https://groups.google.com/d/optout. >