Bug report #9924

gdal_merge does not work

Added by Paolo Cavallini over 10 years ago. Updated over 9 years ago.

Status:Closed
Priority:High
Assignee:Victor Olaya
Category:Processing/Core
Affected QGIS version:2.2.0 Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:up/downstream
Crashes QGIS or corrupts data:No Copied to github as #:18435

Description

In GDAL 1.10.1 gdal_merge.py was renamed to gdal_merge. As a consequence, both GDALTools and Processing corresponding commands do not work.

This may affect other GDAL commands.

History

#1 Updated by Paolo Cavallini over 10 years ago

  • Priority changed from Normal to High

#2 Updated by Alexander Bruy over 10 years ago

Hmm... as I can see in sources it still listed as gdal_merge.py (http://trac.osgeo.org/gdal/browser/tags/1.10.1/gdal/swig/python/scripts)

#3 Updated by Paolo Cavallini over 10 years ago

$ dpkg -L python-gdal | grep merge
/usr/share/man/man1/gdal_merge.1.gz
/usr/share/doc/python-gdal/examples/gdal_vrtmerge.py.gz
/usr/share/doc/python-gdal/examples/hsv_merge.py.gz
/usr/bin/gdal_merge

#4 Updated by Alexander Bruy over 10 years ago

Maybe it was renamed in Debian? Just checked packages in Slackware, Fedora and OpenSuSE: they all have gdal_merge.py not gdal_merge

#5 Updated by Bas Couwenberg over 10 years ago

The Debian package indeed strips the .py extension to conform to the Debian Policy (10.4 Scripts).

It's a "should" requirement, so we could chose to not strip the extension and just add a lintian override to not have it complain about this issue, but I'd prefer to support both variants in QGIS. Checking the file with and without extension shouldn't require much code.

#6 Updated by Etienne Tourigny over 10 years ago

Indeed, in ubuntu 12.04 it is installed as gdal_merge.py.

Are there any other gdal/ftools tools that use python scripts? These would require the same fix in this case.

#7 Updated by Alexander Bruy over 10 years ago

Etienne Tourigny wrote:

Are there any other gdal/ftools tools that use python scripts? These would require the same fix in this case.

There are several tools in GDALTools plugin and in Processing. I'll try to update them ASAP

#8 Updated by hamish - over 10 years ago

could the qgis code be made flexible to search for 'script.py' || 'script'?
having the debian package make an extra symlink seems too ugly to consider.

thanks,
Hamish

#9 Updated by Bas Couwenberg over 10 years ago

The GDAL plugins in QGIS heavily rely on the .py extension, so I think the best course of action is to revert the change in the GDAL Debian package.

Ubuntu trusty has gdal 1.10.1+dfsg-3, and because they're in pre-release freeze unlikely to sync gdal 1.10.1+dfsg-5 once it's available in Debian. Although they may consider it if asked about it explicitly.

#10 Updated by Bas Couwenberg over 10 years ago

I've reverted the change that strips the .py extension in the gdal package for Debian, now available in unstable.

I've also filed a sync request for Ubuntu trusty: https://bugs.launchpad.net/ubuntu/+source/gdal/+bug/1301763

#11 Updated by Bas Couwenberg over 10 years ago

The fixed gdal packages has migrated to Debian testing, and Ubuntu has synced the fixed package in time for Trusty.

From the distribution side this issue is fixed.

#12 Updated by Paolo Cavallini over 10 years ago

  • Status changed from Open to Closed
  • Resolution set to up/downstream

#13 Updated by Giovanni Manghi over 9 years ago

  • Category changed from 94 to Processing/Core

Also available in: Atom PDF