Subject: bug#70878: closed (Re: [bug#70878] [PATCH 0/4] Reduce download builder duplication.)

From: [email-masked] (GNU bug Tracking System)
Date: Tue, 11 Jun 2024 15:56:02 +0000

Your bug report

#70878: [PATCH 0/4] Reduce download builder duplication.

which was filed against the guix-patches package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
70878: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=70878
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: [bug#70878] [PATCH 0/4] Reduce download builder duplication.
From: Christopher Baines <[email-masked]>
To: [email-masked]
Date: Tue, 11 Jun 2024 12:05:50 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

Christopher Baines <[email-masked]> writes:

> I think we currently have an issue where the builder scripts for several
> download approaches are very numerous, svn-multi-download is probably
> the extreme example as that's used for the numerous texlive packages.
>
> I noticed this when wondering why bayfront is spending so much time
> substituting svn-multi-download files from data.guix.gnu.org, and it's
> probably taking up extra space in the data.guix.gnu.org database too.
>
> These commits should address the issue in svn-multi-fetch, svn-fetch,
> hg-fetch and git-fetch (although this issue doesn't affect users of
> builtin:git-download).  The main change is to pass the hash through to
> the builder as an environment variable, rather than generating a
> different builder script for each different hash.
>
> I've also restructured the code to try and avoid this problem in the
> future.  While there was a comment about the intent to not duplicate the
> builder scripts, it's too easy to miss.  By moving the builder to it's
> own procedure and moving the comment to the call site, it'll be clearer
> when a new source of variation is added.
>
>
> Christopher Baines (4):
>   svn-download: Reduce svn-multi-fetch builder duplication.
>   svn-download: Reduce svn-fetch builder duplication.
>   hg-download: Reduce builder duplication.
>   git-download: Reduce builder duplication.
>
>  guix/git-download.scm | 123 +++++++++++---------
>  guix/hg-download.scm  | 127 +++++++++++---------
>  guix/svn-download.scm | 264 +++++++++++++++++++++++-------------------
>  3 files changed, 291 insertions(+), 223 deletions(-)

I've tweaked the commit messages a little and pushed these patches to
master as 0daa72e34d7fafc927e2d476ef613c582107781d.

Subject: [PATCH 0/4] Reduce download builder duplication.
From: Christopher Baines <[email-masked]>
To: [email-masked]
Date: Sat, 11 May 2024 17:29:16 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

I think we currently have an issue where the builder scripts for several
download approaches are very numerous, svn-multi-download is probably
the extreme example as that's used for the numerous texlive packages.

I noticed this when wondering why bayfront is spending so much time
substituting svn-multi-download files from data.guix.gnu.org, and it's
probably taking up extra space in the data.guix.gnu.org database too.

These commits should address the issue in svn-multi-fetch, svn-fetch,
hg-fetch and git-fetch (although this issue doesn't affect users of
builtin:git-download).  The main change is to pass the hash through to
the builder as an environment variable, rather than generating a
different builder script for each different hash.

I've also restructured the code to try and avoid this problem in the
future.  While there was a comment about the intent to not duplicate the
builder scripts, it's too easy to miss.  By moving the builder to it's
own procedure and moving the comment to the call site, it'll be clearer
when a new source of variation is added.

Christopher Baines (4):
  svn-download: Reduce svn-multi-fetch builder duplication.
  svn-download: Reduce svn-fetch builder duplication.
  hg-download: Reduce builder duplication.
  git-download: Reduce builder duplication.

 guix/git-download.scm | 123 +++++++++++---------
 guix/hg-download.scm  | 127 +++++++++++---------
 guix/svn-download.scm | 264 +++++++++++++++++++++++-------------------
 3 files changed, 291 insertions(+), 223 deletions(-)