2017-08-01 13:17 GMT+03:00 Henning Schild : > create a new base-class for images > > Signed-off-by: Henning Schild > --- > meta/classes/dpkg.bbclass | 34 ------------------------------ > ---- > meta/classes/ext4-img.bbclass | 2 +- > meta/classes/isar-base-image.bbclass | 1 + > meta/classes/isar-base.bbclass | 33 ++++++++++++++++++++++++++++++ > +++ > 4 files changed, 35 insertions(+), 35 deletions(-) > create mode 100644 meta/classes/isar-base-image.bbclass > > diff --git a/meta/classes/dpkg.bbclass b/meta/classes/dpkg.bbclass > index 1d0132b..58cee6e 100644 > --- a/meta/classes/dpkg.bbclass > +++ b/meta/classes/dpkg.bbclass > @@ -11,42 +11,8 @@ do_unpack[deptask] = "do_build" > # recipe name as identifier > PP = "/home/builder/${PN}" > WORKDIR = "${BUILDCHROOT_DIR}/${PP}" > - > -# Fetch package from the source link > -python do_fetch() { > - src_uri = (d.getVar('SRC_URI', True) or "").split() > - if len(src_uri) == 0: > - return > - > - try: > - fetcher = bb.fetch2.Fetch(src_uri, d) > - fetcher.download() > - except bb.fetch2.BBFetchException as e: > - raise bb.build.FuncFailed(e) > -} > - > -addtask fetch before do_build > -do_fetch[dirs] = "${DL_DIR}" > - > -do_unpack[stamp-extra-info] = "${DISTRO}" > S ?= "${WORKDIR}" > > -# Unpack package and put it into working directory in buildchroot > -python do_unpack() { > - src_uri = (d.getVar('SRC_URI', True) or "").split() > - if len(src_uri) == 0: > - return > - > - try: > - fetcher = bb.fetch2.Fetch(src_uri, d) > - 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}" > > # Build package from sources using build script > diff --git a/meta/classes/ext4-img.bbclass b/meta/classes/ext4-img.bbclass > index eb23d06..5125d8e 100644 > --- a/meta/classes/ext4-img.bbclass > +++ b/meta/classes/ext4-img.bbclass > @@ -1,7 +1,7 @@ > # This software is a part of ISAR. > # Copyright (C) 2015-2016 ilbers GmbH > > -inherit isar-base > +inherit isar-base-image > > # Extra space for rootfs in MB > ROOTFS_EXTRA ?= "64" > diff --git a/meta/classes/isar-base-image.bbclass > b/meta/classes/isar-base-image.bbclass > new file mode 100644 > index 0000000..33b0369 > --- /dev/null > +++ b/meta/classes/isar-base-image.bbclass > @@ -0,0 +1 @@ > +do_build[nostamp] = "0" > >From patch description it's not clear, why we need separate empty class here with *-image name. > diff --git a/meta/classes/isar-base.bbclass b/meta/classes/isar-base. > bbclass > index 33b0369..3df6572 100644 > --- a/meta/classes/isar-base.bbclass > +++ b/meta/classes/isar-base.bbclass > @@ -1 +1,34 @@ > do_build[nostamp] = "0" > + > +# Fetch package from the source link > +python do_fetch() { > + src_uri = (d.getVar('SRC_URI', True) or "").split() > + if len(src_uri) == 0: > + return > + > + try: > + fetcher = bb.fetch2.Fetch(src_uri, d) > + fetcher.download() > + except bb.fetch2.BBFetchException as e: > + raise bb.build.FuncFailed(e) > +} > + > +addtask fetch before do_build > +do_fetch[dirs] = "${DL_DIR}" > + > +# Unpack package and put it into working directory in buildchroot > +python do_unpack() { > + src_uri = (d.getVar('SRC_URI', True) or "").split() > + if len(src_uri) == 0: > + return > + > + try: > + fetcher = bb.fetch2.Fetch(src_uri, d) > + 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_unpack[stamp-extra-info] = "${DISTRO}" > -- > 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/ef97842f18e67eb7140790542c0d88a04490421f.1501582237.git. > henning.schild%40siemens.com. > For more options, visit https://groups.google.com/d/optout. >