unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: "Stefan Reichör" <stefan@xsteve.at>
Cc: 28531@debbugs.gnu.org
Subject: [bug#28531] [PATCH] gnu: Add vcsh.
Date: Mon, 25 Sep 2017 11:50:55 +0200	[thread overview]
Message-ID: <8760c7ksxs.fsf@gnu.org> (raw)
In-Reply-To: <87vak92sm2.fsf@xsteve.at> ("Stefan \=\?utf-8\?Q\?Reich\=C3\=B6r\=22\?\= \=\?utf-8\?Q\?'s\?\= message of "Sat, 23 Sep 2017 20:10:45 +0200")

Hi,

Stefan Reichör <stefan@xsteve.at> skribis:

> Thanks for the explaination. I see the benefit of the static binding.
> The good thing is that the package versions are reproducable.
> However, I am used to the way it works on other systems. There is almost
> always the search path used to start other programs.
>
> And to make it even more complicated, I still use Ubuntu and install
> some tools using Guix. So it is even possible that I use vcsh from Guix
> and git from Ubuntu.

Indeed.  From a reproducibility viewpoint, it’s something we’d like to
avoid, because then vcsh might behave completely differently depending
on what the underlying distro is, and that’s clearly not what we expect
from Guix.

> I took a look at the vcsh script. git is hardcoded in many places there.
> Patching it to have static binding seems to be complicated. The only
> sane solution would be to change the script and make git configurable
> and try to make this change upstream. However I am not really keen on
> doing this kind of work...
>
> Or do you have another idea how the static binding should be accomplished?

I think it might be enough to do a regexp substitution matching all
“git” commands in the script:

  (substitute* "vcsh"
    (("\\<git ([a-z-]+)" _ sub-command)
     (string-append (assoc-ref inputs "git") "/bin/git "
                    sub-command)))

Could you give it a try?

Thanks,
Ludo'.

      reply	other threads:[~2017-09-25  9:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-20 19:37 [bug#28531] [PATCH] gnu: Add vcsh Stefan Reichör
2017-09-20 20:32 ` bug#28531: " Ludovic Courtès
     [not found]   ` <87o9q2o1bw.fsf@xsteve.at>
2017-09-23 12:52     ` [bug#28531] " Ludovic Courtès
2017-09-23 18:10       ` Stefan Reichör
2017-09-25  9:50         ` Ludovic Courtès [this message]

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

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8760c7ksxs.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=28531@debbugs.gnu.org \
    --cc=stefan@xsteve.at \
    /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.
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).