This is the mail archive of the cygwin-xfree@cygwin.com mailing list for the Cygwin XFree86 project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: conflict (Was Re: gv)


On Sun, 20 Jun 2004, Thomas Dickey wrote:

> On Sat, 19 Jun 2004, Igor Pechtchanski wrote:
> > On Sat, 19 Jun 2004, Thomas Dickey wrote:
> > > On Fri, Jun 18, 2004 at 10:45:07PM -0400, Igor Pechtchanski wrote:
> > > > One more thing: "make check" doesn't work when built outside of
> > > > the source directory (the build itself is fine).  I think changing
> > > > "./run_test.sh" to "${srcdir}/run_test.sh" should fix it, but I'm
> > > > not sure, so I'll leave it up to you.  Also, when testing, a file
> > > > called "conflict" is blindly removed and created in /tmp, and the
> > > > test itself doesn't seem to work under Cygwin (i.e., reports no
> > > > conflicts).  Could the latter have something to do with the .exe
> > > > extension (just a guess)?  I'll check later.
> > >
> > > I think Cygwin's chmod simply didn't believe the file was a script.
> > > So I tweaked its contents to help, will test that tomorrow...
> >
> > Actually, looks like the file created is "conflict", and the tested
> > conflict executable is "conflict.exe".  It doesn't look like .exe is part
>
> shell scripts also are executable (no suffix).

Yes, but the testcase specifically tries to induce a conflict between the
current conflict executable (i.e., $BIN/conflict.exe) and the newly
created script (i.e., /tmp/conflict).  This doesn't work unless the
"-t.exe." argument is supplied.

> > of FileTypes by default, so no conflict is found.  Another clue is that
> > "conflict -t.exe." works...  FWIW, "." is explicitly added to the PATH in
> > run_test.sh.
> >
> > BTW, while we're discussing run_test.sh, would it be possible to first
> > create a unique directory, and then create the test executable in that
> > directory, instead of doing it straight in /tmp?  Something like
> >
> > DIR=`mktemp -d /tmp/conflict.$$.XXXXXXXX`
>
> something like - but mktemp isn't portable.  The script could test for
> that (I do that in dialog).  I did notice this yesterday as well, but
> didn't modify that yet.

You could use the following, which should be more portable:

DIR=/tmp/conflict.$$.`od -An -N4 -tx4 /dev/random|cut -d" " -f2`
mkdir $DIR

> > cd $DIR
> > touch conflict
> > chmod 755 conflict
> > $PROG
> > rm -f conflict
> > cd /tmp
> > rm -rf $DIR

So, when can we expect the new version out?  Once the above issues are
fixed, I should be able to release the Cygwin package.  FWIW, I'll
maintain it if you won't.
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha@cs.nyu.edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor@watson.ibm.com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"I have since come to realize that being between your mentor and his route
to the bathroom is a major career booster."  -- Patrick Naughton


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]