Issue 30527 - $^O eq "MSWin32" is used to check for WNT (possible cws tooling problem)
Summary: $^O eq "MSWin32" is used to check for WNT (possible cws tooling problem)
Status: CLOSED NOT_AN_OOO_ISSUE
Alias: None
Product: Build Tools
Classification: Code
Component: solenv (show other issues)
Version: current
Hardware: PC Windows 2000
: P3 Trivial (vote)
Target Milestone: ---
Assignee: hjs
QA Contact: issues@tools
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-06-21 20:05 UTC by quetschke
Modified: 2013-08-07 15:34 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description quetschke 2004-06-21 20:05:41 UTC
I used branch mws_srx645 because the cws tooling is already checked in there.

The following is a list of occurences where '$^O eq "MSWin32"' is used to check
for the Windows operating system. This might be wrong when cygwin's perl is used.

Unfortunately each occurence has to be checked if MSWin32 == ActiveState Perl
was not accidentally correct.
When really the OS is meant, $ENV{OS} should be checked, but if the use
of "\" vs. "/" is checked checking for $^O eq "MSWin32" is propably OK.


solenv/bin/cwscreate.pl:275:    if ( $^O eq 'MSWin32' ) {
solenv/bin/cwscreate.pl:298:        $globalini = ( $^O eq 'MSWin32' )
solenv/bin/setsolar.pl:280:            if ( $^O eq 'MSWin32' ) {
solenv/bin/setsolar.pl:548:        if ( $^O eq 'MSWin32' ) {
solenv/bin/setsolar.pl:885:    # MSWin32
solenv/bin/setsolar.pl:886:    if ( $^O eq 'MSWin32' ) {
solenv/bin/setsolar.pl:922:    # surprisingly this works under MSWin32, too
solenv/bin/setsolar.pl:1150:        if ( $^O eq 'MSWin32' ) {
solenv/bin/setsolar.pl:1490:    if ( $^O eq 'MSWin32' ) {
solenv/bin/setsolar.pl:1531:        $globalini = ( $^O eq 'MSWin32' ) 
solenv/bin/setsolar.pl:1702:    if ( $^O eq 'MSWin32' ) {
solenv/bin/setsolar.pl:1735:    if ( $^O eq 'MSWin32' ) {
solenv/bin/cwsresync.pl:871:        if ( $^O =~ "MSWin32" )
solenv/bin/cwsresync.pl:1508:            print_error("Operation not (yet)
supported on Windows", 9) if $^O eq 'MSWin32';
solenv/bin/deliver.pl:225:        $command =~ s#/#\\#g if $^O eq 'MSWin32';
solenv/bin/deliver.pl:1023:    $zipexe .= ' -y' unless  $^O eq 'MSWin32';
solenv/bin/modules/CreatePDBRelocators.pm:121:	if ( $^O eq 'MSWin32' ) {
solenv/bin/modules/Cvs.pm:85:        if ($^O eq "MSWin32" || $^O eq "os2" ) {
solenv/bin/modules/CvsModule.pm:78:my $t_cvs_binary = ($^O eq 'MSWin32') ?
'cvsclt2.exe' : 'cvs.clt2';
solenv/bin/build.pl:111:    if ( $^O eq 'MSWin32' ) {
solenv/bin/build.pl:542:    if ( ($^O eq 'MSWin32') && (!defined $ENV{SHELL})) {
solenv/bin/build.pl:1387:    if ( $^O eq 'MSWin32' ) {
solenv/bin/build.pl:1426:        if ( $^O eq 'MSWin32' ) {
solenv/bin/build.pl:1713:    if ( $^O eq 'MSWin32' ) {
solenv/bin/build.pl:1747:		if ( $^O eq 'MSWin32' ) {
solenv/bin/build.pl:1775:    if ( $^O eq 'MSWin32' ) {
solenv/bin/build.pl:1792:    if ( $^O eq 'MSWin32' ) {
solenv/bin/cwsadd.pl:231:    if ( $^O =~ "MSWin32" )
solenv/bin/cwsadd.pl:484:		    if ( $^O =~ "MSWin32" )
solenv/bin/cwsanalyze.pl:795:            print_error("Operation not (yet)
supported on Windows", 9) if $^O eq 'MSWin32';
Comment 1 hjs 2004-06-22 09:55:25 UTC
as you may be affected...
Comment 2 jens-heiner.rechtien 2004-06-22 10:49:10 UTC
Currently $^O eq 'MSWin32' is reserved for usage Windows with ActiveState under
4NT shell. Cygwin should be handled like Unix in most cases. Maybe we'll need a
more granular approach for the mixed cases, when people use ActiveState whithin
the cygwin environment (people really shouldn't do this)

The CWS tooling is meant for Unix only in the moment. It has never been tested
on Windows. Incidently the original version can not work on Windows. The
restriction has been removed for OOo but I doubt that it will work immediately
out of the box.
Comment 3 quetschke 2004-06-22 14:46:56 UTC
Hallo!
> Currently $^O eq 'MSWin32' is reserved for usage Windows with ActiveState
> under 4NT shell. Cygwin should be handled like Unix in most cases.
Well, see below. Most of the cases are just only used in hamburg environment
and therefore it doesn't matter.

> Maybe we'll need a
> more granular approach for the mixed cases, when people use ActiveState
> whithin the cygwin environment (people really shouldn't do this)
Yes, a configure check that barks on USE_SHELL=4nt and $^O ne 'MSWin32'.

> The CWS tooling is meant for Unix only in the moment. It has never been tested
> on Windows. Incidently the original version can not work on Windows. The
> restriction has been removed for OOo but I doubt that it will work immediately
> out of the box.
Just say so, when you need a tester for W32-tcsh (cygwin) environment. ;)

Some comments on the suspicious lines:
(I only looked at the occurences with MSWin.)

The cws stuff first:

> solenv/bin/cwsresync.pl:871:        if ( $^O =~ "MSWin32" )
> solenv/bin/cwsresync.pl:1508:        print_error("Operation not (yet)
                                 supported on Windows", 9) if $^O eq 'MSWin32';
should both be $ENV{OS} eq "WNT"

> solenv/bin/modules/Cvs.pm:85:        if ($^O eq "MSWin32" || $^O eq "os2" ) {
Should be $ENV{OS} eq "WNT"

> solenv/bin/modules/CvsModule.pm:78:my $t_cvs_binary = ($^O eq 'MSWin32') ?
'cvsclt2.exe' : 'cvs.clt2';
Should be $ENV{OS} eq "WNT"

> solenv/bin/cwsadd.pl:231:    if ( $^O =~ "MSWin32" )
> solenv/bin/cwsadd.pl:484:		    if ( $^O =~ "MSWin32" )
An OS check is meant.

> solenv/bin/cwsanalyze.pl:795:            print_error("Operation not (yet)
>                            supported on Windows", 9) if $^O eq 'MSWin32';
An OS check is meant.

> solenv/bin/cwscreate.pl:275:    if ( $^O eq 'MSWin32' ) {
> solenv/bin/cwscreate.pl:298:        $globalini = ( $^O eq 'MSWin32' )
Hamburg special, OS check

Now the rest, I guess it is all hamburg environment related, and
therefore no problem for OOo.

> solenv/bin/setsolar.pl:280:            if ( $^O eq 'MSWin32' ) {
> solenv/bin/setsolar.pl:548:        if ( $^O eq 'MSWin32' ) {
OS check

> solenv/bin/setsolar.pl:886:    if ( $^O eq 'MSWin32' ) {
4nt check

> solenv/bin/setsolar.pl:1150:        if ( $^O eq 'MSWin32' ) {
OK

> solenv/bin/setsolar.pl:1490:    if ( $^O eq 'MSWin32' ) {
4nt check

> solenv/bin/setsolar.pl:1531:        $globalini = ( $^O eq 'MSWin32' ) 
> solenv/bin/setsolar.pl:1702:    if ( $^O eq 'MSWin32' ) {
OS check

> solenv/bin/setsolar.pl:1735:    if ( $^O eq 'MSWin32' ) {
4nt+Activestate checks

> solenv/bin/deliver.pl:225:        $command =~ s#/#\\#g if $^O eq 'MSWin32';
OK

> solenv/bin/deliver.pl:1023:    $zipexe .= ' -y' unless  $^O eq 'MSWin32';
Hmmm, I'm unsure here. zip -y obviously works with the cygwin zip, so the
test should be changed to: $ENV{USE_SHELL} ne "4nt"
but I'm not sure why the native zip shouldn't use "-y". I don't have that
version here.

> solenv/bin/modules/CreatePDBRelocators.pm:121:	if ( $^O eq 'MSWin32' ) {
Should be $ENV{OS} eq "WNT", or even $ENV{COM} eq "MSC"

> solenv/bin/build.pl:111:    if ( $^O eq 'MSWin32' ) {
> solenv/bin/build.pl:542:    if ( ($^O eq 'MSWin32') && (!defined $ENV{SHELL})) {
> solenv/bin/build.pl:1387:    if ( $^O eq 'MSWin32' ) {
OK, but these imply 4nt.

> solenv/bin/build.pl:1426:        if ( $^O eq 'MSWin32' ) {
ActiveState renames, unix deletes?

> solenv/bin/build.pl:1713:    if ( $^O eq 'MSWin32' ) {
hamburg environment only, OS check

> solenv/bin/build.pl:1747:		if ( $^O eq 'MSWin32' ) {
hamburg environment, really a 4nt check

> solenv/bin/build.pl:1775:    if ( $^O eq 'MSWin32' ) {
ActiveState renames, unix deletes?

> solenv/bin/build.pl:1792:    if ( $^O eq 'MSWin32' ) {
check for 4nt
Comment 4 quetschke 2005-01-25 22:31:34 UTC
Well, CWS tools work for W32-tcsh. So I close this issue. I'll open a new issue
should I find a problem.
Comment 5 hjs 2005-04-27 17:54:52 UTC
oops, still open...