[darcs-devel] Issue building on FreeBSD

Ashley Moran ashley.moran at patchspace.co.uk
Tue Apr 15 11:23:21 UTC 2008


Hi

I am trying to build darcs 2 on FreeBSD 7.0/amd64.  (Note to David -  
sorry for the delay getting round to this - work got in the way.)   I  
have a few problems, but I'll deal with this one first.  The test for  
issue 381 is failing as part of the makefile test runs.  I compiled  
darcs with ghc 6.8.2 and am using gmake 3.81.

When running "gmake check", I get this output:

> Output from failed issue381.sh:
>
> # for issue381: "darcs send -o message --edit-description doesn't  
> work"
>
> test $DARCS || DARCS=$PWD/../darcs
> DARCS_EDITOR=echo
> export DARCS_EDITOR
>
> rm -rf temp1 temp2
> mkdir temp1 temp2
>
> cd temp2
> $DARCS init
> cd ..
>
> cd temp1
> $DARCS init
> echo Hello world > foobar
> $DARCS add foobar
> $DARCS record -a -A me -m add_foobar
> Finished recording patch 'add_foobar'
>
> # Test that editor is called when --output is used with --edit- 
> description
> echo This is a note > note
> cat > editor <<EOF
> #!/usr/bin/env bash
> echo I am running the editor
> echo the file is \$1
> mv \$1 \$1-temp
> echo hello world >> \$1
> cat \$1-temp >> \$1
> echo >> \$1
> echo finished editing >> \$1
> echo I am done running the editor
> EOF
>
> chmod +x editor
>
> DARCS_EDITOR=./editor "$DARCS" send --debug --author=me -a -- 
> output=bundle --edit-description ../temp2
> Beginning identifying repository .
> Done identifying repository .
> Identified darcs-1 repo: /usr/home/administrator/darcs.net/tests- 
> shell-hashed.dir/temp1
> Beginning identifying repository /usr/home/administrator/darcs.net/ 
> tests-shell-hashed.dir/temp2
> Done identifying repository /usr/home/administrator/darcs.net/tests- 
> shell-hashed.dir/temp2
> Beginning reading pristine
> Beginning defining environment variables
> Reading patch file: Tue Apr 15 10:53:51 BST 2008  me
>   * add_foobar
> I'm doing copyFileUsingCache on patches/ 
> 0000000081 
> -3ed31ec279fbe9c343e37104b7e8dbc02da783f24528a10553ac77e513e48feb
> Done defining environment variables
> About to edit file darcs-temp-mail-0
> darcs: setFdOption: illegal operation (Inappropriate ioctl for device)


But when I run it individually, as "bash issue381.sh", it works:

> # for issue381: "darcs send -o message --edit-description doesn't  
> work"
>
> test $DARCS || DARCS=$PWD/../darcs
> DARCS_EDITOR=echo
> export DARCS_EDITOR
>
> rm -rf temp1 temp2
> mkdir temp1 temp2
>
> cd temp2
> $DARCS init
> cd ..
>
> cd temp1
> $DARCS init
> echo Hello world > foobar
> $DARCS add foobar
> $DARCS record -a -A me -m add_foobar
> Finished recording patch 'add_foobar'
>
> # Test that editor is called when --output is used with --edit- 
> description
> echo This is a note > note
> cat > editor <<EOF
> #!/usr/bin/env bash
> echo I am running the editor
> echo the file is \$1
> mv \$1 \$1-temp
> echo hello world >> \$1
> cat \$1-temp >> \$1
> echo >> \$1
> echo finished editing >> \$1
> echo I am done running the editor
> EOF
>
> chmod +x editor
>
> DARCS_EDITOR=./editor "$DARCS" send --debug --author=me -a -- 
> output=bundle --edit-description ../temp2
> Beginning identifying repository .
> Done identifying repository .
> Identified darcs-1 repo: /usr/home/administrator/darcs.net/tests/temp1
> Beginning identifying repository /usr/home/administrator/darcs.net/ 
> tests/temp2
> Done identifying repository /usr/home/administrator/darcs.net/tests/ 
> temp2
> Beginning reading inventory of repository /usr/home/administrator/ 
> darcs.net/tests/temp2
> Done reading inventory of repository /usr/home/administrator/ 
> darcs.net/tests/temp2
> Beginning reading inventory of repository /usr/home/administrator/ 
> darcs.net/tests/temp1
> Done reading inventory of repository /usr/home/administrator/ 
> darcs.net/tests/temp1
> Beginning defining environment variables
> Done defining environment variables
> About to edit file darcs-temp-mail-0
> I am running the editor
> the file is darcs-temp-mail-0
> I am done running the editor
> Wrote patch to /usr/home/administrator/darcs.net/tests/temp1/bundle.
>
> echo === beginning of bundle > ===
> cat bundle
> hello world
> Tue Apr 15 11:11:52 BST 2008  me
>   * add_foobar
> finished editing
>
>
> New patches:
>
> [add_foobar
> me**20080415101152] {
> addfile ./foobar
> hunk ./foobar 1
> +Hello world
> }
>
> Context:
>
> Patch bundle hash:
> c74de90d3142c8218724a5400d7b1f4eb5a60971
> echo === end of bundle > ===
>
> grep ' add_foobar' bundle
>   * add_foobar
> grep 'finished editing' bundle
> finished editing
>
> IFS=' ' "$DARCS" send --author=me -a --subject="it works" --to user at place.org 
>  --sendmail-command='grep "^Subject: it works$" %<' ../temp2
> Creating patch to "../temp2"...
> Successfully sent patch bundle to: user at place.org.
>
> cd ..
> rm -rf temp1 temp2


I've chased it down to this line in issue381.sh:
DARCS_EDITOR=./editor "$DARCS" send --debug --author=me -a -- 
output=bundle --edit-description ../temp2

It also works fine run as "shell_harness issue381.sh"

I guess something in the makefile is making it break, but I don't know  
where to start looking for it, so I thought I'd throw it back to the  
developer list.

Anyone got any ideas?

Thanks
Ashley

-- 
http://www.patchspace.co.uk/
http://aviewfromafar.net/



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osuosl.org/pipermail/darcs-devel/attachments/20080415/5952ae4a/attachment-0001.htm 


More information about the darcs-devel mailing list