public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: vijai kumar <vijaikumar.kanagarajan@gmail.com>
To: isar-users <isar-users@googlegroups.com>
Subject: Re: [PATCH v5 04/13] deb-dl-dir: Make debsrc_download faster
Date: Wed, 22 Apr 2020 03:11:11 -0700 (PDT)	[thread overview]
Message-ID: <d43b4cd2-3fca-4f81-8ac9-61beaab587f5@googlegroups.com> (raw)
In-Reply-To: <20200422091539.76f52aaf@md1za8fc.ad001.siemens.net>


[-- Attachment #1.1: Type: text/plain, Size: 2524 bytes --]



On Wednesday, April 22, 2020 at 12:45:42 PM UTC+5:30, Henning Schild wrote:
>
> On Fri, 17 Apr 2020 15:00:31 +0530 
> Vijai Kumar K <vijaikumar...@gmail.com <javascript:>> wrote: 
>
> > Eventhough apt-get source skips redownloading of files, it is still 
> > slow and takes a lot of time. Instead, lookup if the dsc file is 
> > already present in the cache and skip based on it. 
> > 
> > Signed-off-by: Vijai Kumar K <Vijaikumar_...@mentor.com <javascript:>> 
> > --- 
> >  meta/classes/deb-dl-dir.bbclass | 3 +++ 
> >  1 file changed, 3 insertions(+) 
> > 
> > diff --git a/meta/classes/deb-dl-dir.bbclass 
> > b/meta/classes/deb-dl-dir.bbclass index 472b9fe..9399741 100644 
> > --- a/meta/classes/deb-dl-dir.bbclass 
> > +++ b/meta/classes/deb-dl-dir.bbclass 
> > @@ -32,6 +32,9 @@ EOSUDO 
> >          if [ -z "${src}" ];then 
> >              src="$( dpkg-deb --show --showformat '${Package}' 
> > "${package}" )" fi 
> > +        # Strip epoch, if any, from version. 
> > +        local dscfile=$(find "${DEBSRCDIR}"/"${rootfs_distro}" -name 
> > "${src}_${version#*:}.dsc") 
>
> Is that reliable, or might you end up exiting too early. You process 
> that "version" quite a bit, it needs to remain a unique identifier. So 
> you do not skip "foo-1.2.3_r1@deb~42" only because "foo-1.2.3" was 
> there. I made that up but such a version is allowed to have all sorts 
> of funny chars. 
>

As per the Debian policy manual,  version format is 
[epoch:]upstream_version[-debian_revision].
While downloading using apt-get source <source pkg>=<version>, I observed 
that epoch is needed
for downloading the source correctly. However the downloaded dsc file does 
not contain epoch. Hence
this stripping while checking for the presence of the corresponding dsc 
file.

Also, Debian policy manual[1] states that . + - ~ (full stop, plus, hyphen, 
tilde) are the valid values
for use in upstream-version part and + . ~ (plus, full stop, tilde) for 
debian-revision part.

So, this epoch stripping should be fine.

[1] 
https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-version


> > +        [ -z "$dscfile" ] || continue 
>
> I personally would say "-n" && continue, might be a matter of taste. 

 
>
Henning 
>
> >          sudo -E chroot --userspec=$( id -u ):$( id -g ) ${rootfs} \ 
> >              sh -c ' mkdir -p "/deb-src/${1}/${2}" && cd 
> > "/deb-src/${1}/${2}" && apt-get -y --download-only --only-source 
> > source "$2"="$3" ' download-src "${rootfs_distro}" "${src}" 
> > "${version}" 
>
>

[-- Attachment #1.2: Type: text/html, Size: 6772 bytes --]

  reply	other threads:[~2020-04-22 10:11 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-17  9:30 [PATCH v5 00/13] Deb-src caching implementation Vijai Kumar K
2020-04-17  9:30 ` [PATCH v5 01/13] rootfs: Make rootfs finalize a separate task Vijai Kumar K
2020-04-17  9:30 ` [PATCH v5 02/13] deb-dl-dir: Cache host distro debs separately Vijai Kumar K
2020-04-22  6:52   ` Henning Schild
2020-04-17  9:30 ` [PATCH v5 03/13] meta: cache deb srcs as part of postprocessing Vijai Kumar K
2020-04-22  7:06   ` Henning Schild
2020-04-22  9:57     ` vijai kumar
2020-04-29  6:19       ` Henning Schild
2020-05-04  8:42         ` vijai kumar
2020-05-08  5:44           ` vijai kumar
2020-06-11 11:44             ` vijai kumar
2020-09-03 11:43               ` vijaikumar....@gmail.com
2020-09-03 18:58                 ` Henning Schild
2020-09-04  5:12                   ` vijaikumar....@gmail.com
2020-04-22  7:28   ` Henning Schild
2020-04-22 10:35     ` vijai kumar
2020-04-17  9:30 ` [PATCH v5 04/13] deb-dl-dir: Make debsrc_download faster Vijai Kumar K
2020-04-22  7:15   ` Henning Schild
2020-04-22 10:11     ` vijai kumar [this message]
2020-04-29  7:05       ` Henning Schild
2020-04-17  9:30 ` [PATCH v5 05/13] deb-dl-dir: Download files only belonging to the current image Vijai Kumar K
2020-04-22  7:25   ` Henning Schild
2020-04-22 10:20     ` vijai kumar
2020-04-17  9:30 ` [PATCH v5 06/13] deb-dl-dir: Factor out the mounting part Vijai Kumar K
2020-04-17  9:30 ` [PATCH v5 07/13] deb-dl-dir: Fix skipping of removed files Vijai Kumar K
2020-04-17  9:30 ` [PATCH v5 08/13] repository: Add a sanity test to check missing sources Vijai Kumar K
2020-04-17  9:30 ` [PATCH v5 09/13] base-apt: Introduce BASE_REPO_FEATURES Vijai Kumar K
2020-04-17  9:30 ` [PATCH v5 10/13] repository: Fix failures due to missing section Vijai Kumar K
2020-04-17  9:30 ` [PATCH v5 11/13] scripts/ci_build.sh: Enable deb-src caching Vijai Kumar K
2020-04-17  9:30 ` [PATCH v5 12/13] rootfs: Fix possible overwrite of existing resolv.conf Vijai Kumar K
2020-04-17  9:30 ` [PATCH v5 13/13] rootfs: Handle failures when postprocess is rerun Vijai Kumar K
2020-04-17 14:21 ` [PATCH v5 00/13] Deb-src caching implementation vijai kumar
2020-04-22  7:41 ` 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=d43b4cd2-3fca-4f81-8ac9-61beaab587f5@googlegroups.com \
    --to=vijaikumar.kanagarajan@gmail.com \
    --cc=isar-users@googlegroups.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