public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Henning Schild <henning.schild@siemens.com>
To: vijai kumar <vijaikumar.kanagarajan@gmail.com>
Cc: Vijai Kumar K <Vijaikumar_Kanagarajan@mentor.com>,
	isar-users <isar-users@googlegroups.com>,
	ibr@radix10.net,
	Silvano Cirujano Cuesta <silvano.cirujano-cuesta@siemens.com>
Subject: Re: [RFC PATCH 1/2] dpkg-base: Handle custom source directory in do_apt_fetch
Date: Wed, 3 Mar 2021 13:49:12 +0100	[thread overview]
Message-ID: <20210303134912.4093145b@md1za8fc.ad001.siemens.net> (raw)
In-Reply-To: <CALLGG_+X9ffG=AyUbyfqY+Syx3DZQ-EKkX1xuj+4mLZ8936khg@mail.gmail.com>

Can we please get this one stand-alone on the fast-path? Just ran into
exactly the problem and now have to work around.

regards,
Henning

Am Mon, 22 Feb 2021 12:41:40 +0530
schrieb vijai kumar <vijaikumar.kanagarajan@gmail.com>:

> On Sat, Feb 20, 2021 at 1:47 PM Henning Schild
> <henning.schild@siemens.com> wrote:
> >
> > Am Sat, 20 Feb 2021 01:27:18 +0530
> > schrieb Vijai Kumar K <Vijaikumar_Kanagarajan@mentor.com>:
> >  
> > > With the current do_apt_fetch implementation, it is not possible
> > > to use a custom source directory(${S}).
> > >
> > > apt-get source by default extracts the contents of the debian
> > > source into folder with name <pkg>_<version>.
> > >
> > > Add provision for specifying a custom source directory.  
> >
> > I think this one is indeed worth being discussed seperately.
> >
> > Could you go into detail why a custom S is required in the first
> > place? My guess is that we might not know PV and need to wait for
> > that apt-unpack to finish so we can find it in the changelog.  
> 
> Exactly. In some cases we might not know PV, we might need to wait
> for apt to see what version it is fetching. Change the APT sources
> and or preferences and you might get a completely new version of the
> package. We cannot effectively know ${S} for manipulating the source
> code from the recipe.
> 
> >  
> > > Signed-off-by: Vijai Kumar K <Vijaikumar_Kanagarajan@mentor.com>
> > > ---
> > >  meta/classes/dpkg-base.bbclass | 7 ++++++-
> > >  1 file changed, 6 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/meta/classes/dpkg-base.bbclass
> > > b/meta/classes/dpkg-base.bbclass index 5c7bddc..1b94b76 100644
> > > --- a/meta/classes/dpkg-base.bbclass
> > > +++ b/meta/classes/dpkg-base.bbclass
> > > @@ -70,7 +70,12 @@ do_apt_fetch() {
> > >          sudo -E chroot --userspec=$( id -u ):$( id -g )
> > > ${BUILDCHROOT_DIR} \ sh -c 'mkdir -p /downloads/deb-src/"$1"/"$2"
> > > && cd /downloads/deb-src/"$1"/"$2" && apt-get -y --download-only
> > > --only-source source "$2"' my_script "${DISTRO}" "${uri}" sudo -E
> > > chroot --userspec=$( id -u ):$( id -g ) ${BUILDCHROOT_DIR} \
> > > -            sh -c 'cp /downloads/deb-src/"$1"/"$2"/* ${PP} && cd
> > > ${PP} && apt-get -y --only-source source "$2"' my_script
> > > "${DISTRO}" "${uri}"
> > > +            sh -c ' \
> > > +                dscfile="$(apt-get -y -qq --print-uris source
> > > "${2}" | cut -d " " -f2 | grep -E "*.dsc")"
> > > +                cd ${PP}
> > > +                cp /downloads/deb-src/"${1}"/"${2}"/* ${PP}
> > > +                dpkg-source -x "${dscfile}" "${PPS}"' \
> > > +                    my_script "${DISTRO}" "${uri}"  
> >
> > You removed the && chaining, please try a "false" in there, i guess
> > that sh might need a -e now  
> 
> Yes. Will add that in v2.
> 
> >
> > I wonder if we can just symlink debians choice to PPS, or mv, or
> > even "cp -a"  
> 
> Wondering whether it brings in any added advantage?
> 
> > And make that a new task we call apt_unpack  
> 
> I thought about this too. We could definitely have something like
> apt_unpack that makes things clear. When I first started looking
> around, I didn't expect the
> unpacking to happen in fetch.
> 
> Thanks,
> Vijai Kumar K
> 
> >
> > Henning
> >  
> > >      done
> > >
> > >      dpkg_undo_mounts  
> >
> > --
> > 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 view this discussion on
> > the web visit
> > https://groups.google.com/d/msgid/isar-users/20210220090734.60a591c2%40md1za8fc.ad001.siemens.net.
> >  
> 


  reply	other threads:[~2021-03-03 12:59 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-19 19:57 [RFC PATCH 0/2] Custom base-files Vijai Kumar K
2021-02-19 19:57 ` [RFC PATCH 1/2] dpkg-base: Handle custom source directory in do_apt_fetch Vijai Kumar K
2021-02-20  8:07   ` Henning Schild
2021-02-22  7:11     ` vijai kumar
2021-03-03 12:49       ` Henning Schild [this message]
2021-03-03 13:49         ` Kanagarajan, Vijaikumar
2021-03-03 14:53           ` Henning Schild
2021-02-19 19:57 ` [RFC PATCH 2/2] recipes-core: Add recipe for base-files Vijai Kumar K
2021-02-20  8:28   ` Henning Schild
2021-02-23  8:38     ` vijai kumar
2021-02-24 12:12       ` Henning Schild
2021-02-25  3:57         ` vijai kumar
2021-02-25  5:08           ` vijaikumar....@gmail.com
2021-02-25  8:20             ` Jan Kiszka
2021-02-25  8:40               ` Jan Kiszka
2021-02-25  9:06               ` vijaikumar....@gmail.com
2021-02-25 16:32                 ` Henning Schild
2021-03-01  5:07                   ` vijaikumar....@gmail.com
2021-03-01  7:35                     ` Henning Schild
2021-03-01  8:04                       ` vijaikumar....@gmail.com
2021-02-25  8:10           ` Henning Schild
2021-02-25  8:26             ` vijaikumar....@gmail.com
2021-02-22 12:39   ` Anton Mikanovich
2021-02-23  8:41     ` vijaikumar....@gmail.com
2021-02-24  9:20       ` vijaikumar....@gmail.com
2021-02-24  9:21         ` Jan Kiszka
2021-02-24 11:40           ` vijaikumar....@gmail.com
2021-02-24 11:54             ` 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=20210303134912.4093145b@md1za8fc.ad001.siemens.net \
    --to=henning.schild@siemens.com \
    --cc=Vijaikumar_Kanagarajan@mentor.com \
    --cc=ibr@radix10.net \
    --cc=isar-users@googlegroups.com \
    --cc=silvano.cirujano-cuesta@siemens.com \
    --cc=vijaikumar.kanagarajan@gmail.com \
    /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