Showing with 27 additions and 24 deletions.
  1. +6 −0 debian/changelog
  2. +0 −14 ms-windows/osgeo4w/package-nightly.cmd
  3. +0 −7 ms-windows/osgeo4w/package.cmd
  4. +4 −1 src/app/qgspluginmanager.cpp
  5. +17 −2 src/providers/grass/qgsgrass.cpp
6 changes: 6 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
qgis (1.7.4-1) UNRELEASED; urgency=low

* new upstream bugfix release

-- Jürgen E. Fischer <jef@norbit.de> Sun, 19 Feb 2012 22:35:23 +0100

qgis (1.7.3-1) UNRELEASED; urgency=low

* new upstream bugfix release
Expand Down
14 changes: 0 additions & 14 deletions ms-windows/osgeo4w/package-nightly.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -155,20 +155,6 @@ tar -C %OSGEO4W_ROOT% -cjf %PACKAGENAME%-%VERSION%-%PACKAGE%.tar.bz2 ^
etc/preremove/%PACKAGENAME%.bat ^
>>%LOG% 2>&1
if errorlevel 1 goto error

REM tar -C %OSGEO4W_ROOT% -cjf %PACKAGENAME%-grass-%VERSION%-%PACKAGE%.tar.bz2 ^
REM --exclude-from exclude ^
REM "apps/%PACKAGENAME%/themes/classic/grass" ^
REM "apps/%PACKAGENAME%/themes/default/grass" ^
REM "apps/%PACKAGENAME%/themes/gis/grass" ^
REM "apps/%PACKAGENAME%/grass" ^
REM "apps/%PACKAGENAME%/bin/qgisgrass.dll" ^
REM "apps/%PACKAGENAME%/plugins/grassrasterprovider.dll" ^
REM "apps/%PACKAGENAME%/plugins/grassplugin.dll" ^
REM "apps/%PACKAGENAME%/plugins/grassprovider.dll" ^
REM >>%LOG% 2>&1
REM if errorlevel 1 goto error

goto end

:error
Expand Down
7 changes: 0 additions & 7 deletions ms-windows/osgeo4w/package.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -199,9 +199,6 @@ if errorlevel 1 goto error
tar -C %OSGEO4W_ROOT% -cjf %PACKAGENAME%-%VERSION%-%PACKAGE%.tar.bz2 ^
--exclude-from exclude ^
--exclude "*.pyc" ^
--exclude apps/%PACKAGENAME%/themes/classic/grass ^
--exclude apps/%PACKAGENAME%/themes/default/grass ^
--exclude apps/%PACKAGENAME%/themes/gis/grass ^
"apps/%PACKAGENAME%/bin/qgis.exe" ^
"apps/%PACKAGENAME%/bin/qgis.reg.tmpl" ^
"apps/%PACKAGENAME%/i18n/" ^
Expand Down Expand Up @@ -230,7 +227,6 @@ tar -C %OSGEO4W_ROOT% -cjf %PACKAGENAME%-%VERSION%-%PACKAGE%.tar.bz2 ^
"apps/%PACKAGENAME%/python/" ^
"apps/%PACKAGENAME%/resources/context_help/" ^
"apps/%PACKAGENAME%/resources/qgis_help.db" ^
"apps/%PACKAGENAME%/themes/" ^
"bin/%PACKAGENAME%.bat.tmpl" ^
"etc/postinstall/%PACKAGENAME%.bat" ^
"etc/preremove/%PACKAGENAME%.bat" ^
Expand All @@ -240,9 +236,6 @@ if errorlevel 1 goto error
tar -C %OSGEO4W_ROOT% -cjf %PACKAGENAME%-grass-plugin-%VERSION%-%PACKAGE%.tar.bz2 ^
--exclude-from exclude ^
--exclude "*.pyc" ^
"apps/%PACKAGENAME%/themes/classic/grass" ^
"apps/%PACKAGENAME%/themes/default/grass" ^
"apps/%PACKAGENAME%/themes/gis/grass" ^
"apps/%PACKAGENAME%/grass" ^
"apps/%PACKAGENAME%/bin/qgisgrass.dll" ^
"apps/%PACKAGENAME%/plugins/grassrasterprovider.dll" ^
Expand Down
5 changes: 4 additions & 1 deletion src/app/qgspluginmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,10 @@ void QgsPluginManager::getPluginDescriptions()
QString myPaths = settings.value( "plugins/searchPathsForPlugins", "" ).toString();
if ( !myPaths.isEmpty() )
{
myPathList.append( myPaths.split( "|" ) );
foreach( QString path, myPaths.split( "|" ) )
{
myPathList.append( path );
}
}

for ( int j = 0; j < myPathList.size(); ++j )
Expand Down
19 changes: 17 additions & 2 deletions src/providers/grass/qgsgrass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -450,14 +450,21 @@ QString GRASS_EXPORT QgsGrass::openMapset( QString gisdbase, QString location, Q
{
return QObject::tr( "%1 is not a GRASS mapset." ).arg( mapsetPath );
}
QString lock = mapsetPath + "/.gislock";

#ifndef _MSC_VER
int pid = getpid();
#else
int pid = GetCurrentProcessId();
#endif

QgsDebugMsg( QString( "pid = %1" ).arg( pid ) );

#ifndef Q_OS_WIN
QString lock = mapsetPath + "/.gislock";
QFile lockFile( lock );
QProcess *process = new QProcess();
QString lockProgram( gisBase + "/etc/lock" );

int pid = getpid();
QgsDebugMsg( QString( "pid = %1" ).arg( pid ) );

process->start( lockProgram, QStringList() << lock << QString::number( pid ) );
Expand Down Expand Up @@ -488,13 +495,17 @@ QString GRASS_EXPORT QgsGrass::openMapset( QString gisdbase, QString location, Q
QFileInfo dirInfo( mTmp );
if ( !dirInfo.isWritable() )
{
#ifndef Q_OS_WIN
lockFile.remove();
#endif
return QObject::tr( "Temporary directory %1 exists but is not writable" ).arg( mTmp );
}
}
else if ( !dir.mkdir( mTmp ) )
{
#ifndef Q_OS_WIN
lockFile.remove();
#endif
return QObject::tr( "Cannot create temporary directory %1" ).arg( mTmp );
}

Expand All @@ -508,7 +519,9 @@ QString GRASS_EXPORT QgsGrass::openMapset( QString gisdbase, QString location, Q
QFile out( mGisrc );
if ( !out.open( QIODevice::WriteOnly ) )
{
#ifndef Q_OS_WIN
lockFile.remove();
#endif
return QObject::tr( "Cannot create %1" ).arg( mGisrc );
}
QTextStream stream( &out );
Expand Down Expand Up @@ -566,12 +579,14 @@ QString GRASS_EXPORT QgsGrass::openMapset( QString gisdbase, QString location, Q

active = true;

#ifndef Q_OS_WIN
// Close old mapset
if ( mMapsetLock.length() > 0 )
{
QFile file( mMapsetLock );
file.remove();
}
#endif

mMapsetLock = lock;

Expand Down