Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 03/14] pkg-infra: move the git download helper to a script
Date: Wed, 2 Jul 2014 22:25:12 +0200	[thread overview]
Message-ID: <20140702202512.GA9383@free.fr> (raw)
In-Reply-To: <87fvijbx17.fsf@dell.be.48ers.dk>

Peter, All,

On 2014-07-02 17:28 +0200, Peter Korsgaard spake thusly:
> >>>>> "Yann" == Yann E MORIN <yann.morin.1998@free.fr> writes:
> 
>  > The git download helper is getting a bit more complex. Fixing it in the
>  > Makefile when it breaks (like the recent breakage with a non-existing
>  > sha1-cset) proves to be challenging, to say the least.
> 
>  > Move it into a shell script in support/download/git, which will make
>  > it much easier to read, maintain, fix and enhance in the future.
> 
>  > Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
>  > Cc: Peter Korsgaard <jacmet@uclibc.org>
>  > Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
>  > Acked-by: Luca Ceresoli <luca@lucaceresoli.net>
>  > Cc: Arnout Vandecappelle <arnout@mind.be>
>  > Reviewed-by: Samuel Martin <s.martin49@gmail.com>
>  > Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
> 
> Thanks. I've verified that the (non-gzip'ed) tarball is identical to
> what we had before, but I noticed that we no longer delete the temporary
> repo in DL_DIR.
> 
> Did you do that change on purpose? I don't think we want to keep it, do
> we?

For sure, that's not on-purpose.

Now, I fail to see how the remporary repository would linger after a
successfull download. Here's what the script does:

    repodir="${BR2_DL_DIR}/${basename}"

    if [ -n "$(${GIT} ls-remote "${repo}" "${cset}" 2>&1)" ]; then
        printf "Doing shallow clone\n"
        ${GIT} clone --depth 1 -b "${cset}" --bare "${repo}" "${repodir}"
    else
        printf "Doing full clone\n"
        ${GIT} clone --bare "${repo}" "${repodir}"
    fi

    pushd "${repodir}"
    ${GIT} archive --prefix="${basename}/" -o "${output}.tmp" --format=tar
    "${cset}"
    gzip -c "${output}.tmp" >"${output}"
    rm -f "${output}.tmp"
    popd

    rm -rf "${repodir}"

So, unless there is something I'm missing, the last statement should get
rid of the temp repo...

Lemme try...

Nope, the repository is properly removed here:

    $ make libllcp-source
    [--SNIP--]
    >>> libllcp cf0c4b3c9df98851c6092c130192130c3f5a46bd Downloading
    Doing full clone
    Cloning into bare repository '/home/ymorin/dev/buildroot/O/test-dl/libllcp-cf0c4b3c9df98851c6092c130192130c3f5a46bd'...
    remote: Counting objects: 1202, done.
    Receiving objects: 100% (1202/1202), 267.40 KiB | 145.00 KiB/s, done.
    Resolving deltas: 100% (812/812), done.
    Checking connectivity... done.
    ~/dev/buildroot/O/test-dl/libllcp-cf0c4b3c9df98851c6092c130192130c3f5a46bd ~/dev/buildroot/buildroot
    ~/dev/buildroot/buildroot

    $ ls -l /home/ymorin/dev/buildroot/O/test-dl/
    -rw-rw-r-- 1 ymorin ymorin 52K Jul  2 22:23 libllcp-cf0c4b3c9df98851c6092c130192130c3f5a46bd.tar.gz

So, no lingering clone...

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

  parent reply	other threads:[~2014-07-02 20:25 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-30 22:26 [Buildroot] [PATCH 0/14 v9] Some download-related changes (branch yem/check-downloads) Yann E. MORIN
2014-06-30 22:26 ` [Buildroot] [PATCH 01/14] Makefile: add BR2_DL_DIR to EXTRA_ENV Yann E. MORIN
2014-07-02 15:24   ` Peter Korsgaard
2014-06-30 22:26 ` [Buildroot] [PATCH 02/14] pkg-infra: also set PKGDIR for the download step Yann E. MORIN
2014-07-02 15:24   ` Peter Korsgaard
2014-06-30 22:26 ` [Buildroot] [PATCH 03/14] pkg-infra: move the git download helper to a script Yann E. MORIN
2014-07-02 15:28   ` Peter Korsgaard
2014-07-02 15:44     ` Thomas Petazzoni
2014-07-02 17:19       ` Thomas De Schampheleire
2014-07-02 17:22         ` Thomas Petazzoni
2014-07-02 17:31           ` Thomas De Schampheleire
2014-07-02 20:29             ` Yann E. MORIN
2014-07-02 20:31             ` Thomas Petazzoni
2014-07-02 20:37               ` Yann E. MORIN
2014-07-02 21:42                 ` Peter Korsgaard
2014-07-02 20:25     ` Yann E. MORIN [this message]
2014-06-30 22:26 ` [Buildroot] [PATCH 04/14] pkg-infra: move the svn " Yann E. MORIN
2014-07-01 14:07   ` Ryan Barnett
2014-06-30 22:26 ` [Buildroot] [PATCH 05/14] pkg-infra: move the cvs " Yann E. MORIN
2014-06-30 22:26 ` [Buildroot] [PATCH 06/14] pkg-infra: move the hg " Yann E. MORIN
2014-06-30 22:26 ` [Buildroot] [PATCH 07/14] pkg-infra: move the wget " Yann E. MORIN
2014-06-30 22:26 ` [Buildroot] [PATCH 08/14] pkg-infra: move the bzr " Yann E. MORIN
2014-06-30 22:26 ` [Buildroot] [PATCH 09/14] pkg-infra: move the scp " Yann E. MORIN
2014-06-30 22:26 ` [Buildroot] [PATCH 10/14] pkg-infra: move the cp (aka localfiles) " Yann E. MORIN
2014-06-30 22:26 ` [Buildroot] [PATCH 11/14] pkg-infra: don't use DL_DIR as scratchpad for temporary downloads Yann E. MORIN
2014-06-30 22:26 ` [Buildroot] [PATCH 12/14] pkg-infra: add possiblity to check downloaded files against known hashes Yann E. MORIN
2014-06-30 22:26 ` [Buildroot] [PATCH 13/14] manual: add documentation about packages' hashes Yann E. MORIN
2014-06-30 22:26 ` [Buildroot] [PATCH 14/14] package/ca-certificates: add tarball's hashes Yann E. MORIN
  -- strict thread matches above, loose matches on Subject: below --
2014-06-13 23:11 [Buildroot] [PATCH 0/14 v8] Some download-related changes (branch yem/check-downloads) Yann E. MORIN
2014-06-13 23:11 ` [Buildroot] [PATCH 03/14] pkg-infra: move the git download helper to a script Yann E. MORIN

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=20140702202512.GA9383@free.fr \
    --to=yann.morin.1998@free.fr \
    --cc=buildroot@busybox.net \
    /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