From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, NICE_REPLY_A,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.4 Received: (qmail 9429 invoked from network); 14 Jul 2022 20:54:31 -0000 Received: from 9front.inri.net (168.235.81.73) by inbox.vuxu.org with ESMTPUTF8; 14 Jul 2022 20:54:31 -0000 Received: from mail.posixcafe.org ([45.76.19.58]) by 9front; Thu Jul 14 16:52:23 -0400 2022 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=posixcafe.org; s=20200506; t=1657831939; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=VjH9WF8APixLO9T1yU/YerF6EweEMd2A4VrdkkQSIaI=; b=P8pXNFXkKzuCV7fMt6KZsFysl1i0WlIP8Vh3sxLAqmMmJ6/RXYZfVbVGSGxMfnx833sSwF Kp0Dm4jqGTX/qa2pM5r5t9tuxFEUcKy4O5WptWAabB+DKJsthb+VzFAmUsXQJpU9SLxwhC Eb8MYw+p1CmeZBY6gQsH+zhBRlBs1DQ= Received: from [192.168.168.200] (161-97-228-135.lpcnextlight.net [161.97.228.135]) by mail.posixcafe.org (OpenSMTPD) with ESMTPSA id cd2e169d (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO) for <9front@9front.org>; Thu, 14 Jul 2022 15:52:19 -0500 (CDT) Message-ID: Date: Thu, 14 Jul 2022 14:52:13 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Content-Language: en-US To: 9front@9front.org References: From: Jacob Moody In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: map/reduce reduce/map-scale event Subject: Re: [9front] git: install rc scripts into /rc/bin/git/ Reply-To: 9front@9front.org Precedence: bulk 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 @@ > > 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 %