public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Henning Schild <henning.schild@siemens.com>
To: Vijai Kumar K <Vijaikumar_Kanagarajan@mentor.com>
Cc: <isar-users@googlegroups.com>, <ibr@radix10.net>,
	<silvano.cirujano-cuesta@siemens.com>
Subject: Re: [RFC PATCH 1/2] dpkg-base: Handle custom source directory in do_apt_fetch
Date: Sat, 20 Feb 2021 09:07:34 +0100	[thread overview]
Message-ID: <20210220090734.60a591c2@md1za8fc.ad001.siemens.net> (raw)
In-Reply-To: <20210219195719.29037-2-Vijaikumar_Kanagarajan@mentor.com>

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.

> 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

I wonder if we can just symlink debians choice to PPS, or mv, or even
"cp -a"
And make that a new task we call apt_unpack

Henning

>      done
>  
>      dpkg_undo_mounts


  reply	other threads:[~2021-02-20  8:17 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 [this message]
2021-02-22  7:11     ` vijai kumar
2021-03-03 12:49       ` Henning Schild
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=20210220090734.60a591c2@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 \
    /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