Re: [9fans] inferno from hg does not build out of the box

2009-10-03 Thread Sam Watkins
Let's fix this now.  Here is a one-line fix, which is simpler and cleaner than
a multi-empty-file commit.  My old fix mkdir -p `lib/emptydirs` is a bashism I
think, I've reworded it:

  xargs mkdir -p lib/emptydirs

That will suffice to fix the problem for unix users at least.  xargs might not
be present, we can do it with only the shell; this might be best:

  while read d; do mkdir -p $d; done lib/emptydirs

Could you please add this fix to makemk.sh?  I put it at the end of the
following stanza which seems appropriate (patch below).

# make sure we start off clean
echo removing old libraries and binaries
rm -f $PLAT/lib/*.a $PLAT/bin/*
rm -f utils/cc/y.tab.?
while read d; do mkdir -p $d; done lib/emptydirs

A general fix for hg/git/etc would be to keep a list of all directories in the
RCS as a file .hg-dirs or .hg/dirs (but forbidden), and a post-update to
create/remove them as needed.

Is it best to talk about inferno on 9fans or should I use/Cc inferno-list?

thanks,

Sam


--- makemk.sh.orig  2009-10-04 00:55:37.0 +1000
+++ makemk.sh   2009-10-04 00:56:10.0 +1000
@@ -42,6 +42,7 @@
 echo removing old libraries and binaries
 rm -f $PLAT/lib/*.a $PLAT/bin/*
 rm -f utils/cc/y.tab.?
+while read d; do mkdir -p $d; done lib/emptydirs
 
 # libregexp
 cd $ROOT/utils/libregexp || error cannot find libregexp directory



Re: [9fans] inferno from hg does not build out of the box

2009-10-02 Thread roger peppe
2009/10/2 Sam Watkins s...@nipl.net:
 could be removed if anyone fixes hg.

from the way the mercurial guys go on about it,
it sounds like the fix might not be trivial.
it does seem like a ridiculous thing, but it
seems to be something of a religious issue with them.

hg doesn't do permissions (other than execute) either AFAIK.

it's no substitute for tar.



Re: [9fans] inferno from hg does not build out of the box

2009-10-02 Thread C H Forsyth
it does seem like a ridiculous thing, but it
seems to be something of a religious issue with them.

that was my impression. we aren't the only ones to find
the restriction irksome, by any means. to avoid this
intransigence spreading, i should say that we'll compensate
for it somehow. i agree with the sentiment of the original
message; i just wasn't sure of the best way to do that.



Re: [9fans] inferno from hg does not build out of the box

2009-10-02 Thread David Leimbach
On Fri, Oct 2, 2009 at 1:44 AM, roger peppe rogpe...@gmail.com wrote:

 2009/10/2 Sam Watkins s...@nipl.net:
  could be removed if anyone fixes hg.

 from the way the mercurial guys go on about it,
 it sounds like the fix might not be trivial.
 it does seem like a ridiculous thing, but it
 seems to be something of a religious issue with them.

 hg doesn't do permissions (other than execute) either AFAIK.

 it's no substitute for tar.


Wait, Hg can't deal with a directory with a file like .keepme and keep the
directory!?!  That's pretty silly.  Or do the directories have to be 100%
empty for this to work?


Re: [9fans] inferno from hg does not build out of the box

2009-10-02 Thread Tim Newsham

It's a bit sad when a modern OS (inferno) from one of the best labs in the
world does not build (from hg), due to a error that could be avoided with a
tiny patch.  You are losing new users because of this (or aggrevating them).
Why not commit the list of empty directories and add mkdir -p `empty-dirs`
to makemk.sh or something like that?  It's a 1 minute fix, and could be removed
if anyone fixes hg.  Also there is a standard utility uname which could be
used to write a short configure script (for unix;  would mean plan 9!).
I'm happy to do this if someone is willing to review and commit it.


committing a .emptydir file in each directory would be easier.


Sam


Tim Newsham
http://www.thenewsh.com/~newsham/



Re: [9fans] inferno from hg does not build out of the box

2009-10-02 Thread Charles Forsyth
committing a .emptydir file in each directory would be easier.

why bother making it .emptydir (ie, with the dot) when that makes it
invisible on broken host systems (with the ls bug) but visible under inferno 
itself.
more important, and the reason i didn't do that,
if it's visible under inferno itself, it breaks the point of some of
those directories being there, and empty: you're supposed to be able to 
enumerate
services by listing names subsequently bound to them.



Re: [9fans] inferno from hg does not build out of the box

2009-10-02 Thread Eric Van Hensbergen

On Oct 2, 2009, at 1:31 PM, Charles Forsyth wrote:


committing a .emptydir file in each directory would be easier.


why bother making it .emptydir (ie, with the dot) when that makes it
invisible on broken host systems (with the ls bug) but visible under  
inferno itself.

more important, and the reason i didn't do that,
if it's visible under inferno itself, it breaks the point of some of
those directories being there, and empty: you're supposed to be able  
to enumerate

services by listing names subsequently bound to them.



Perhaps a rule in the mkfile which would check/create empty directories?
Certainly makes sense for arch/lib and whatnot, less certain it  
makes perfect

sense for other common empty directories.

   -eric



Re: [9fans] inferno from hg does not build out of the box

2009-10-02 Thread Charles Forsyth
Perhaps a rule in the mkfile which would check/create empty directories?

perhaps. there are several alternatives, and no doubt i'll switch
to use a mix as appropriate. the annoying thing is that
previously, whether through tar, replica, or even subversion, a suitable
skeleton would appear without having yet more procedures to know and to 
document.
now some poxy but popular `control system' has to have its say.