Opened 9 years ago

Closed 9 years ago

#418 closed defect (fixed)

o4w_env.bat pollutes stdout with OSGEO4W home info

Reported by: neteler Owned by: osgeo4w-dev@…
Priority: minor Component: Package
Version: Keywords: pkg-msvcrt, o4w_env.bat
Cc:

Description

GRASS GIS 7.svn is able to print its configuration which is useful e.g. for Python scripting (in order to easily obtain the path for the Python API within the installation). Unfortunately OSGeo4W interferes and makes parsing difficult:

C:\Users\user\Desktop>grass71svn --config path

OSGEO4W home is C:\OSGeo4W
C:\OSGeo4W\apps\grass\grass-7.1.svn

C:\Users\user\Desktop>

while e.g. under Linux the output is just the expected path:

grass71 --config path
/home/neteler/software/grass71/dist.x86_64-unknown-linux-gnu

The extra stuff comes from C:\OSGeo4W\bin\o4w_env.bat

Could it be please suppressed or printed in a diffent way if all needed?

Thanks, Markus

Change History (6)

in reply to:  description ; comment:1 by hellik, 9 years ago

Replying to neteler:

GRASS GIS 7.svn is able to print its configuration which is useful e.g. for Python scripting (in order to easily obtain the path for the Python API within the installation). Unfortunately OSGeo4W interferes and makes parsing difficult:

C:\Users\user\Desktop>grass71svn --config path

OSGEO4W home is C:\OSGeo4W
C:\OSGeo4W\apps\grass\grass-7.1.svn

C:\Users\user\Desktop>

while e.g. under Linux the output is just the expected path:

grass71 --config path
/home/neteler/software/grass71/dist.x86_64-unknown-linux-gnu

The extra stuff comes from C:\OSGeo4W\bin\o4w_env.bat

Could it be please suppressed or printed in a diffent way if all needed?

Thanks, Markus

the critical line in C:\OSGeo4W\bin\o4w_env.bat is

echo OSGEO4W home is %OSGEO4W_ROOT%

AFAIU the task of o4w_env.bat is to set the environment variables for different packages in OSGEO4W, I propose to delete this line of code in o4w_env.bat.

thanks Helmut

p.s. where can be o4w_env.bat found in the source: http://trac.osgeo.org/osgeo4w/browser ?

comment:2 by hellik, 9 years ago

Priority: majorcritical

comment:3 by jef, 9 years ago

Priority: criticalminor

in reply to:  1 comment:4 by neteler, 9 years ago

Replying to hellik:

AFAIU the task of o4w_env.bat is to set the environment variables for different packages in OSGEO4W, I propose to delete this line of code in o4w_env.bat.

...

p.s. where can be o4w_env.bat found in the source: http://trac.osgeo.org/osgeo4w/browser ?

I see it mentioned here: http://trac.osgeo.org/osgeo4w/wiki/pkg-msvcrt

comment:5 by jef, 9 years ago

Keywords: pkg-msvcrt added

comment:6 by jef, 9 years ago

Resolution: fixed
Status: newclosed

fixed in msvcrt-1.0.1-11 (32bit) / msvcrt-1.0.1-5 (64bit)

Note: See TracTickets for help on using tickets.