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

permit hdiutil to exit with error code #4900

Merged
merged 1 commit into from
Jun 16, 2014

Conversation

rolandwalker
Copy link
Contributor

Mysterious hdiutil errors are a longtime problem with the
test suite, and the largest cause of false Travis failure
reports.

What appears to happen is that hdiutil returns a valid
plist output, but also exits with an error code.

Recently, user errors have been reported which seem to be
related to the same problem (#4857).

After #4892 and #4887, we have have more assurances that mount errors
will be caught elsewhere, if the XML is incorrect/missing, or if the
mounts are not returned.

So, for this special case, it should be safe to simply
ignore the error code from hdiutil.

Mysterious `hdiutil` errors are a longtime problem with the
test suite, and the largest cause of false Travis failure
reports.

What appears to happen is that `hdiutil` returns a valid
plist output, but also exits with an error code.

Recently, user errors have been reported which seem to be
related to the same problem (Homebrew#4857).

After Homebrew#4892 and Homebrew#4887, we have have more assurances that mount errors
will be caught elsewhere, if the XML is incorrect/missing, or if the
mounts are not returned.

So, for this special case, it should be safe to simply
ignore the error code from `hdiutil`.
rolandwalker added a commit that referenced this pull request Jun 16, 2014
permit `hdiutil` to exit with error code
@rolandwalker rolandwalker merged commit df3b056 into Homebrew:master Jun 16, 2014
@rolandwalker rolandwalker deleted the allow_hdiutil_exit_code branch June 16, 2014 11:42
rolandwalker added a commit to rolandwalker/homebrew-cask that referenced this pull request Jun 19, 2014
nstead, determine success by directly testing the intended effect:
does the mount path still exist?

Also:
 - retry once on failure.
 - silent success if the given mount point did not exist.

These changes are intended to help with unpredictable problems with
the test suite that manifest frequently on Travis.

References: Homebrew#4975, Homebrew#4900, Homebrew#4857
rolandwalker added a commit to rolandwalker/homebrew-cask that referenced this pull request Jun 25, 2014
- Raise `CaskError` instead of `Plist::ParseError` from module
- Improve error message when parse result is empty
- remove leading garbage text and emit it to stderr (seen in Homebrew#5060)
- remove trailing garbage text and emit it to stderr (seen in Homebrew#4819)

This has the incidental effect of emitting DMG licenses during
installation, which seems desirable as permanent functionality.

If not permanent, the warnings to STDERR should still be kept
temporarily to help get better bug reports on `hdiutil`.

A bug wrt DMG licenses must have been introduced in one of
Homebrew#4892, Homebrew#4887, Homebrew#4889, Homebrew#4900, Homebrew#4975, Homebrew#4978, or Homebrew#4857.  Presumably,
the cause is that STDERR was previously silenced when running
`hdiutil`.  It would be cleaner (and more reliable) to redirect
STDERR and examine it separately, rather than clean up the
merged outputs.

closes Homebrew#4819
closes Homebrew#5060
@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

Successfully merging this pull request may close these issues.

1 participant