unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#28699] [PATCH] pull: Add GUIX_PULL_URL environment variable.
@ 2017-10-04  9:05 Oleg Pykhalov
  2017-10-05  9:28 ` Ludovic Courtès
  0 siblings, 1 reply; 4+ messages in thread
From: Oleg Pykhalov @ 2017-10-04  9:05 UTC (permalink / raw)
  To: 28699

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: [PATCH] pull: Add GUIX_PULL_URL environment variable. --]
[-- Type: text/x-patch, Size: 1502 bytes --]

From 2638c08eef0e8c173111ced6bbc95167f6130fd7 Mon Sep 17 00:00:00 2001
From: Oleg Pykhalov <go.wigust@gmail.com>
Date: Wed, 4 Oct 2017 12:01:41 +0300
Subject: [PATCH] pull: Add GUIX_PULL_URL environment variable.

* guix/scripts/pull.scm (%repository-url): Add GUIX_PULL_URL environment
  variable.
* doc/guix.texi (Invoking guix pull): Mention GUIX_PULL_URL.
---
 doc/guix.texi         | 3 ++-
 guix/scripts/pull.scm | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index f0a59a6b4..0b6d5cdee 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -2533,7 +2533,8 @@ Produce verbose output, writing build logs to the standard error output.
 Download Guix from the Git repository at @var{url}.
 
 By default, the source is taken from its canonical Git repository at
-@code{gnu.org}, for the stable branch of Guix.
+@code{gnu.org}, for the stable branch of Guix.  To use a different source,
+provide @code{GUIX_PULL_URL} environment variable.
 
 @item --commit=@var{commit}
 Deploy @var{commit}, a valid Git commit ID represented as a hexadecimal
diff --git a/guix/scripts/pull.scm b/guix/scripts/pull.scm
index b1c87c870..240019800 100644
--- a/guix/scripts/pull.scm
+++ b/guix/scripts/pull.scm
@@ -82,7 +82,7 @@ Install it by running:
                (resolve-interface '(git))))
 
 (define %repository-url
-  "https://git.savannah.gnu.org/git/guix.git")
+  (or (getenv "GUIX_PULL_URL") "https://git.savannah.gnu.org/git/guix.git"))
 
 \f
 ;;;
-- 
2.14.2

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [bug#28699] [PATCH] pull: Add GUIX_PULL_URL environment variable.
  2017-10-04  9:05 [bug#28699] [PATCH] pull: Add GUIX_PULL_URL environment variable Oleg Pykhalov
@ 2017-10-05  9:28 ` Ludovic Courtès
  2017-10-06  3:39   ` Oleg Pykhalov
  0 siblings, 1 reply; 4+ messages in thread
From: Ludovic Courtès @ 2017-10-05  9:28 UTC (permalink / raw)
  To: Oleg Pykhalov; +Cc: 28699

Oleg Pykhalov <go.wigust@gmail.com> skribis:

> From 2638c08eef0e8c173111ced6bbc95167f6130fd7 Mon Sep 17 00:00:00 2001
> From: Oleg Pykhalov <go.wigust@gmail.com>
> Date: Wed, 4 Oct 2017 12:01:41 +0300
> Subject: [PATCH] pull: Add GUIX_PULL_URL environment variable.
>
> * guix/scripts/pull.scm (%repository-url): Add GUIX_PULL_URL environment
>   variable.
> * doc/guix.texi (Invoking guix pull): Mention GUIX_PULL_URL.

I’m not entirely convinced, especially with a look on “channels”, which
would provide a way to persistently register repo URLs.

OTOH, I see that it can be convenient in the short-term for someone
using a repo other than the default one.

Thoughts?

Ludo’.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [bug#28699] [PATCH] pull: Add GUIX_PULL_URL environment variable.
  2017-10-05  9:28 ` Ludovic Courtès
@ 2017-10-06  3:39   ` Oleg Pykhalov
  2017-10-07 20:41     ` bug#28699: " Ludovic Courtès
  0 siblings, 1 reply; 4+ messages in thread
From: Oleg Pykhalov @ 2017-10-06  3:39 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 28699

Hello Ludovic,

thanks for review!

ludo@gnu.org (Ludovic Courtès) writes:

> Oleg Pykhalov <go.wigust@gmail.com> skribis:
>
>> From 2638c08eef0e8c173111ced6bbc95167f6130fd7 Mon Sep 17 00:00:00 2001
>> From: Oleg Pykhalov <go.wigust@gmail.com>
>> Date: Wed, 4 Oct 2017 12:01:41 +0300
>> Subject: [PATCH] pull: Add GUIX_PULL_URL environment variable.
>>
>> * guix/scripts/pull.scm (%repository-url): Add GUIX_PULL_URL environment
>>   variable.
>> * doc/guix.texi (Invoking guix pull): Mention GUIX_PULL_URL.
>
> I’m not entirely convinced, especially with a look on “channels”, which
> would provide a way to persistently register repo URLs.

Interesting.  I didn't know about channels before you mention.

> OTOH, I see that it can be convenient in the short-term for someone
> using a repo other than the default one.
>
> Thoughts?

So, as we don't have channels yet, then I think it's a useful patch.
Because I cannot use 'guix pull --url=URL' when I use 'M-x guix pull' in
GNU Emacs.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#28699: [PATCH] pull: Add GUIX_PULL_URL environment variable.
  2017-10-06  3:39   ` Oleg Pykhalov
@ 2017-10-07 20:41     ` Ludovic Courtès
  0 siblings, 0 replies; 4+ messages in thread
From: Ludovic Courtès @ 2017-10-07 20:41 UTC (permalink / raw)
  To: Oleg Pykhalov; +Cc: 28699-done

[-- Attachment #1: Type: text/plain, Size: 1248 bytes --]

Hello Oleg,

Oleg Pykhalov <go.wigust@gmail.com> skribis:

> ludo@gnu.org (Ludovic Courtès) writes:
>
>> Oleg Pykhalov <go.wigust@gmail.com> skribis:
>>
>>> From 2638c08eef0e8c173111ced6bbc95167f6130fd7 Mon Sep 17 00:00:00 2001
>>> From: Oleg Pykhalov <go.wigust@gmail.com>
>>> Date: Wed, 4 Oct 2017 12:01:41 +0300
>>> Subject: [PATCH] pull: Add GUIX_PULL_URL environment variable.
>>>
>>> * guix/scripts/pull.scm (%repository-url): Add GUIX_PULL_URL environment
>>>   variable.
>>> * doc/guix.texi (Invoking guix pull): Mention GUIX_PULL_URL.
>>
>> I’m not entirely convinced, especially with a look on “channels”, which
>> would provide a way to persistently register repo URLs.
>
> Interesting.  I didn't know about channels before you mention.

It’s still a collective pipe dream at this stage, but we’ll get there.
:-)

>> OTOH, I see that it can be convenient in the short-term for someone
>> using a repo other than the default one.
>>
>> Thoughts?
>
> So, as we don't have channels yet, then I think it's a useful patch.
> Because I cannot use 'guix pull --url=URL' when I use 'M-x guix pull' in
> GNU Emacs.

Yeah, that makes sense.

Applied with the changes below, thank you!

Ludo’.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 668 bytes --]

diff --git a/doc/guix.texi b/doc/guix.texi
index 641e39d9e..7b5b71179 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -2532,9 +2532,10 @@ Produce verbose output, writing build logs to the standard error output.
 @item --url=@var{url}
 Download Guix from the Git repository at @var{url}.
 
+@vindex GUIX_PULL_URL
 By default, the source is taken from its canonical Git repository at
 @code{gnu.org}, for the stable branch of Guix.  To use a different source,
-provide @code{GUIX_PULL_URL} environment variable.
+set the @code{GUIX_PULL_URL} environment variable.
 
 @item --commit=@var{commit}
 Deploy @var{commit}, a valid Git commit ID represented as a hexadecimal

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-10-07 20:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-04  9:05 [bug#28699] [PATCH] pull: Add GUIX_PULL_URL environment variable Oleg Pykhalov
2017-10-05  9:28 ` Ludovic Courtès
2017-10-06  3:39   ` Oleg Pykhalov
2017-10-07 20:41     ` bug#28699: " Ludovic Courtès

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).