Issue 28579 - CYGWIN mis-management ...
Summary: CYGWIN mis-management ...
Status: CLOSED FIXED
Alias: None
Product: Build Tools
Classification: Code
Component: configure (show other issues)
Version: OOo 1.1.1
Hardware: All All
: P3 Trivial (vote)
Target Milestone: OOo 1.1.2
Assignee: quetschke
QA Contact: issues@tools
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-04-30 17:08 UTC by mmeeks
Modified: 2006-03-14 21:02 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
Patch for config_office (112fix2) (3.51 KB, patch)
2004-05-18 23:36 UTC, quetschke
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description mmeeks 2004-04-30 17:08:43 UTC
AC_PATH_PROG(CYGWIN,bash) will use the environment variable 'CYGWIN' as the
answer - _without checking_ if you have CYGWIN already defined;
CYGWIN is defined by the result of this process;
CYGWIN=`dirname "$CYGWIN"` happens after the check; so running configure
multiple times from clean you get:

CYGWIN=/usr/bin
CYGWIN=/usr
CYGWIN=/

decay as you re-run configure; the trivial fix is to use (as a check) a
different variable name so AC_PATH_PROG looks for something else:

--- config_office/configure.in	19 Feb 2004 10:59:25 -0000	1.55.6.7
+++ config_office/configure.in	30 Apr 2004 16:03:45 -0000
@@ -1529,11 +1921,13 @@ dnl ************************************
 dnl testing bash tools path on Windows
 dnl ***************************************
 if test "$_os" = "WINNT"; then
-	AC_PATH_PROG(CYGWIN, bash)
-	CYGWIN=`dirname "$CYGWIN"`
+	AC_PATH_PROG(CYGWIN_PATH, bash)
+	CYGWIN_PATH=`dirname "$CYGWIN_PATH"`
 fi
-if test -z "$CYGWIN"; then
+if test -z "$CYGWIN_PATH"; then
    CYGWIN="NO_CYGWIN"
+else
+   CYGWIN="$CYGWIN_PATH"
 fi
 AC_SUBST(CYGWIN)
 
Simple but very effective. This is the only instance of 'dirname' related env.
var fiddling that I could see in configure.in - there may be other gotchas though.
Comment 1 quetschke 2004-04-30 23:00:00 UTC
Doh! I hope that's nothing I did to configure.in in the first place.

The var CYGWIN has a special meaning for cygwin and should't used at all.

So, the patch is not approved, correct is *not* to use CYGWIN at all.

Thanks for catching this Michael! We have to use your fix, but with
something like CYGWIN_TMP and export CYGWIN_PATH instead of CYGWIN. 
Comment 2 quetschke 2004-05-10 16:04:19 UTC
Committed to cws_src680_ooo20040509. I found no other use of $(CYGWIN)
in the sources, I'll propably remove the export of (now:) CYGWIN_PATH.

It is only used in configure and set_soenv.in

Will also commit to 112fix2 after I did a test build.

@mmeeks: It is no good idea to repeat configure ... ; source win*.set
in the same shell, because the current path is added each time as after
the OOo path is created. This is a general uglyness.
Comment 3 quetschke 2004-05-18 23:36:01 UTC
Created attachment 15334 [details]
Patch for config_office (112fix2)
Comment 4 quetschke 2004-05-18 23:36:51 UTC
Committed iz28579.diff to cws_srx645_ooo112fix2.
Comment 5 sander_traveling 2004-06-02 10:39:10 UTC
setting target 
Comment 6 sander_traveling 2004-06-02 12:48:56 UTC
verified
Comment 7 Martin Hollmichel 2004-07-05 13:20:47 UTC
set target 1.1.2
Comment 8 Martin Hollmichel 2004-10-26 00:51:20 UTC
close issue.