9front - general discussion about 9front
 help / color / mirror / Atom feed
From: Jacob Moody <moody@mail.posixcafe.org>
To: 9front@9front.org
Subject: Re: [9front] git: install rc scripts into /rc/bin/git/
Date: Thu, 14 Jul 2022 14:52:13 -0600	[thread overview]
Message-ID: <b13099a9-2a82-3d11-b659-f2fd4d359ed3@posixcafe.org> (raw)
In-Reply-To: <B8BDC11DB21BFA93B0268EAF7333612B@gmail.com>

On 7/14/22 14:32, an2qzavok@gmail.com wrote:
> rc script files should probably be installed to rc directory.
> 
> Unfortunately, cleaning up files already installed in /$objtype is
> left as an exercise for the reader.
> 
> diff ce2ad9701d018dcff87ecabf1038bb202ea39a50 uncommitted
> --- a/sys/src/cmd/git/mkfile
> +++ b/sys/src/cmd/git/mkfile
> @@ -1,6 +1,7 @@
>  </$objtype/mkfile
>  
>  BIN=/$objtype/bin/git
> +RCBIN=/rc/bin/git
>  TARG=\
>  	conf\
>  	get\
> @@ -45,7 +46,7 @@
>  
>  # Override install target to install rc.
>  install:V:
> -	mkdir -p $BIN
> +	mkdir -p $BIN $RCBIN
>  	mkdir -p /sys/lib/git
>  	for (i in $TARG)
>  		mk $MKFLAGS $i.install
> @@ -53,5 +54,5 @@
>  		mk $MKFLAGS $i.rcinstall
>  
>  %.rcinstall:V:
> -	cp $stem $BIN/$stem
> -	chmod +x $BIN/$stem
> +	cp $stem $RCBIN/$stem
> +	chmod +x $RCBIN/$stem
> 

Did you test this? This doesn't seem like it
would work at all to me. Unions on plan9 are not
deep, if two directories are unioned together
then subdirectories are "either or" based
on if -b or -a was passed. So if you have
both /$objtype/bin/git and /rc/bin/git,
for how /bin is usually binded, one will
take precedence over the other. You can
see for yourself:

% ramfs
% mkdir /tmp/fakebin
% mkdir /tmp/fakebin/git
% touch /tmp/fakebin/git/FILE
% ls /bin/git
/bin/git/add
/bin/git/branch
/bin/git/clone
...
%

# bind before; our new git subdir takes precedence
% bind -b /tmp/fakebin /bin
% ls /bin/git
/bin/git/FILE
% unmount /tmp/fakebin /bin

# bind after; existing git subdir is kept
% bind -a /tmp/fakebin /bin
% ls /bin/git | grep FILE
%

  reply	other threads:[~2022-07-14 20:54 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-14 20:32 an2qzavok
2022-07-14 20:52 ` Jacob Moody [this message]
2022-07-14 21:33   ` an2qzavok
2022-07-14 23:02     ` Jacob Moody
2022-07-15  0:03       ` umbraticus
2022-07-15  1:04         ` Stuart Morrow
2022-07-15  1:22           ` ori

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=b13099a9-2a82-3d11-b659-f2fd4d359ed3@posixcafe.org \
    --to=moody@mail.posixcafe.org \
    --cc=9front@9front.org \
    /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;
as well as URLs for NNTP newsgroup(s).