public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Henning Schild <henning.schild@siemens.com>
To: "[ext] Jan Kiszka" <jan.kiszka@siemens.com>
Cc: "Maxim Yu. Osipov" <mosipov@ilbers.de>, <isar-users@googlegroups.com>
Subject: Re: [PATCH v2 2/6] dpkg-base: introduce an "apt-get source" fetch/unpack step
Date: Wed, 30 Jan 2019 15:41:50 +0100	[thread overview]
Message-ID: <20190130154150.478a43ce@md1za8fc.ad001.siemens.net> (raw)
In-Reply-To: <a7ed4c91-3f85-d6d0-6afe-a0201a646e83@siemens.com>

On Wed, 30 Jan 2019 08:38:34 +0100
"[ext] Jan Kiszka" <jan.kiszka@siemens.com> wrote:

> On 30.01.19 07:54, Maxim Yu. Osipov wrote:
> > From: Henning Schild <henning.schild@siemens.com>
> > 
> > This creates a new task to fetch/unpack debian sources from debian
> > source mirrors. This is done using "apt-get source" and the new
> > variable APT_SRC to control the arguments.
> > 
> > An example where a original debian package gets rebuild will follow
> > in a later commit.
> > 
> > Signed-off-by: Cedric Hombourger <Cedric_Hombourger@mentor.com>  
> 
> This SOB is still wrong.
> 
> > Signed-off-by: Henning Schild <henning.schild@siemens.com>
> > ---
> >   meta/classes/dpkg-base.bbclass | 19 +++++++++++++++++++
> >   1 file changed, 19 insertions(+)
> > 
> > diff --git a/meta/classes/dpkg-base.bbclass
> > b/meta/classes/dpkg-base.bbclass index f1b127c..2f324f9 100644
> > --- a/meta/classes/dpkg-base.bbclass
> > +++ b/meta/classes/dpkg-base.bbclass
> > @@ -20,6 +20,25 @@ do_adjust_git[stamp-extra-info] =
> > "${DISTRO}-${DISTRO_ARCH}" inherit patch
> >   addtask patch after do_adjust_git before do_build
> >   
> > +SRC_APT ?= ""
> > +
> > +do_apt_fetch[depends] = "buildchroot-target:do_build"
> > +
> > +do_apt_fetch() {
> > +	if [ -z "${@d.getVar("SRC_APT", True).strip()}" ]; then
> > +		exit
> > +	fi
> > +	dpkg_do_mounts
> > +	E="${@ bb.utils.export_proxies(d)}"
> > +	sudo -E chroot --userspec=$( id -u ):$( id -g )
> > ${BUILDCHROOT_DIR} \
> > +		sh -c 'cd ${PP} && apt-get -y source ${SRC_APT}'
> > +	dpkg_undo_mounts
> > +}
> > +
> > +addtask apt_fetch after do_unpack before do_patch
> > +do_apt_fetch[lockfiles] += "${REPO_ISAR_DIR}/isar.lock"
> > +do_apt_fetch[stamp-extra-info] = "${DISTRO}-${DISTRO_ARCH}"
> > +
> >   def get_package_srcdir(d):
> >       s = d.getVar("S", True)
> >       workdir = d.getVar("WORKDIR", True)
> >   
> 
> ...and I'm still wondering if we cannot extend bitbake (without
> patching it) instead.

I have one more trick in mind to at least get the interface right and
keep the implementation that relies on another task instead of do_fetch.

In fact the debian fetcher is an unpacker as well and has funny
buildchroot dependencies ... not a "simple" bb fetcher.

Henning

> Jan
> 


  reply	other threads:[~2019-01-30 14:41 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-30  6:54 [PATCH v2 0/6] "apt-get source" fetch/unpack support Maxim Yu. Osipov
2019-01-30  6:54 ` [PATCH v2 1/6] conf: add deb-src entries to all our distro configs Maxim Yu. Osipov
2019-01-30  6:54 ` [PATCH v2 2/6] dpkg-base: introduce an "apt-get source" fetch/unpack step Maxim Yu. Osipov
2019-01-30  7:38   ` Jan Kiszka
2019-01-30 14:41     ` Henning Schild [this message]
2019-01-30  6:54 ` [PATCH v2 3/6] meta: move debianization code into a class and into dpkg-base Maxim Yu. Osipov
2019-01-30  6:54 ` [PATCH v2 4/6] debianize: allow changlog version change Maxim Yu. Osipov
2019-01-30  6:54 ` [PATCH v2 5/6] meta-isar/recipes-app: add upstream hello rebuild example Maxim Yu. Osipov
2019-01-30  6:54 ` [PATCH v2 6/6] local.conf: enable rebuilding "hello" for all distros Maxim Yu. Osipov
2019-01-30 14:43 ` [PATCH v2 0/6] "apt-get source" fetch/unpack support Henning Schild

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190130154150.478a43ce@md1za8fc.ad001.siemens.net \
    --to=henning.schild@siemens.com \
    --cc=isar-users@googlegroups.com \
    --cc=jan.kiszka@siemens.com \
    --cc=mosipov@ilbers.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox