Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Checking for GDAL Framework Dependency #5074

Closed
hanxue opened this issue Jun 26, 2014 · 11 comments
Closed

Checking for GDAL Framework Dependency #5074

hanxue opened this issue Jun 26, 2014 · 11 comments

Comments

@hanxue
Copy link
Contributor

hanxue commented Jun 26, 2014

I am trying to create a new cask qgis hanxue@53d9acf

  1. Why does homebrew cask allow the installation to be marked as successful when the Installer returns an error?
$ brew cask install ./qgis.rb 
==> Downloading http://www.kyngchaos.com/files/software/qgis/QGIS-2.2.0-10.dmg
Already downloaded: /Library/Caches/Homebrew/qgis-2.2.0-10.dmg
==> Running installer for qgis; your password may be necessary.
Password:
==> installer: Error - The GDAL 1.11 framework is required.
🍺  qgis installed to '/opt/homebrew-cask/Caskroom/qgis/2.2.0-10' (6 files, 159M)

As a result, QGIS Installer.pkg get's copied over to the caskroom. If I execute it manually I see this message.

screen shot 2014-06-26 at 12 04 58 pm

GDAL Framework is actually installed

$ brew info gdal
gdal: stable 1.11.0 (bottled), HEAD
http://www.gdal.org/
/usr/local/Cellar/gdal/1.11.0 (228 files, 33M) *
  Poured from bottle
From: https://github.com/Homebrew/homebrew/blob/master/Library/Formula/gdal.rb
  1. How can I tell the installer to look for the framework?
@rolandwalker
Copy link
Contributor

Interesting. Thanks for working on this.

If the Apple program installer does not exit with an error code, we don't call it a failure. Instead we keep on with the installation. So the first step would be to run the install command with --debug so that we can see what is going on, then run the installer command by hand and see if it exits with an error.

Telling QGIS Installer.pkg how to find the GDAL framework that brew previously installed is sort of a separate question. I would start by opening up the pkg file and looking at the preflight scripts

$ pkgutil --expand  './QGIS Installer.pkg' QGIS_Installer_unpacked

I'll try to help you with it a little later.

Incidentally, this Cask can use

  depends_on_formula 'gdal'

to get Homebrew to install the dependency automatically. Though as we have seen, the pkg installer doesn't like that location very much.

@rolandwalker
Copy link
Contributor

See the file Distribution inside the unpacked pkg for the install requirements. The file /Library/Frameworks/GDAL.framework/Versions/1.11/Resources/Info.plist must exist, among others.

@hanxue
Copy link
Contributor Author

hanxue commented Jun 27, 2014

Indeed, it depends on GDAL framework. Here's the (brew cask install --debug)[https://gist.github.com/hanxue/b454a201a6c53745acf3#file-brew-cask-install-debug-log] output
(Distribution)[https://gist.github.com/hanxue/b454a201a6c53745acf3#file-qdal-framework-distribution-xml]
QGIS PackageInfo - https://gist.github.com/hanxue/b454a201a6c53745acf3#file-qgis-packageinfo-xml

I am going to install GDAL from http://www.kyngchaos.com/software/frameworks instead, and will update the results.

hanxue added a commit to hanxue/caskroom that referenced this issue Jun 27, 2014
Required as dependency to install QGIS
See Homebrew#5074
The complete framework package is installed because most applications that use GDAL will also need Proj, UnixImage and Numpy.
hanxue added a commit to hanxue/caskroom that referenced this issue Jun 27, 2014
Matplotlib framework
Required to complete Homebrew#5074
@hanxue
Copy link
Contributor Author

hanxue commented Jun 27, 2014

How can I create a dependency on a Cask (not a homebrew formula)?

@vitorgalvao
Copy link
Member

You can’t, yet.

@rolandwalker
Copy link
Contributor

For the moment, most such cases just print a caveat explaining how to install the dependency.

hanxue added a commit to hanxue/caskroom that referenced this issue Jul 1, 2014
- See issue Homebrew#5074 - requires GDAL Framework and Matplotlib
@hanxue
Copy link
Contributor Author

hanxue commented Jul 1, 2014

Thank you for the advice. Updated the QGIS Cask with caveat.

I think it is preferable to have QGIS depend on GDAL and matplotlib that is installed by Homebrew, instead of having to install these frameworks separately. Can I get anyone's help to make QGIS work with homebrew formulas, instead of separately installed frameworks?

@rolandwalker
Copy link
Contributor

From my first look at the package, I also didn't understand how to make it work with Homebrew Formulae.

@hanxue
Copy link
Contributor Author

hanxue commented Jul 2, 2014

I guess we keep it simple and install the Framework dependencies as separate Casks. Could someone kindly take a look at the pull request #5095 ?

@rolandwalker
Copy link
Contributor

#5095 looks good, merged.

@tapeinosyne
Copy link
Contributor

Cask dependencies have been introduced in brew-cask version 0.52.

@Homebrew Homebrew locked and limited conversation to collaborators May 8, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants