Skip to content

Commit

Permalink
Merge pull request #2975 from mingwandroid/UnsatisfiableError
Browse files Browse the repository at this point in the history
Actually move the broken (test env unsat) packages
  • Loading branch information
msarahan authored Jun 25, 2018
2 parents fbec282 + 56b3b19 commit 7dac1cb
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 16 deletions.
34 changes: 22 additions & 12 deletions conda_build/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@
from .conda_interface import reset_context
from .conda_interface import context
from .conda_interface import UnsatisfiableError
from .conda_interface import NoPackagesFoundError
from .conda_interface import CondaError
from .utils import env_var

from conda_build import __version__
Expand Down Expand Up @@ -1917,18 +1919,26 @@ def test(recipedir_or_package_or_metadata, config, stats, move_broken=True):
else metadata.config.host_subdir)
# ensure that the test prefix isn't kept between variants
utils.rm_rf(metadata.config.test_prefix)
actions = environ.get_install_actions(metadata.config.test_prefix,
tuple(specs), 'host',
subdir=subdir,
debug=metadata.config.debug,
verbose=metadata.config.verbose,
locking=metadata.config.locking,
bldpkgs_dirs=tuple(metadata.config.bldpkgs_dirs),
timeout=metadata.config.timeout,
disable_pip=metadata.config.disable_pip,
max_env_retry=metadata.config.max_env_retry,
output_folder=metadata.config.output_folder,
channel_urls=tuple(metadata.config.channel_urls))
try:
actions = environ.get_install_actions(metadata.config.test_prefix,
tuple(specs), 'host',
subdir=subdir,
debug=metadata.config.debug,
verbose=metadata.config.verbose,
locking=metadata.config.locking,
bldpkgs_dirs=tuple(metadata.config.bldpkgs_dirs),
timeout=metadata.config.timeout,
disable_pip=metadata.config.disable_pip,
max_env_retry=metadata.config.max_env_retry,
output_folder=metadata.config.output_folder,
channel_urls=tuple(metadata.config.channel_urls))
except (DependencyNeedsBuildingError, NoPackagesFoundError, UnsatisfiableError,
CondaError, AssertionError) as exc:
log.warn("failed to get install actions, retrying. exception was: %s",
str(exc))
tests_failed(metadata, move_broken=move_broken, broken_dir=metadata.config.broken_dir,
config=metadata.config)
raise
# upgrade the warning from silently clobbering to warning. If it is preventing, just
# keep it that way.
conflict_verbosity = ('warn' if str(context.path_conflict) == 'clobber' else
Expand Down
3 changes: 2 additions & 1 deletion conda_build/environ.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@

# noqa here because PY3 is used only on windows, and trips up flake8 otherwise.
from .conda_interface import text_type, PY3 # noqa
from .conda_interface import CondaError, LinkError, LockError, NoPackagesFoundError, PaddingError, UnsatisfiableError
from .conda_interface import (CondaError, LinkError, LockError, NoPackagesFoundError,
PaddingError, UnsatisfiableError)
from .conda_interface import display_actions, execute_actions, execute_plan, install_actions
from .conda_interface import memoized
from .conda_interface import package_cache, TemporaryDirectory
Expand Down
9 changes: 6 additions & 3 deletions conda_build/os_utils/macho.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,10 +163,13 @@ def otool(path, cb_filter=is_dylib_info):
"""
lines = check_output(['otool', '-l', path], stderr=STDOUT).decode('utf-8')
# llvm-objdump returns 0 for some things that are anything but successful completion.
if (re.match('.*(is not a Mach-O|invalid|expected|unexpected).*', lines, re.MULTILINE)):
lines_split = lines.splitlines()
# 'invalid', 'expected' and 'unexpected' are too generic
# here so also check that we do not get 'useful' output.
if len(lines_split) < 10 and (re.match('.*(is not a Mach-O|invalid|expected|unexpected).*',
lines, re.MULTILINE)):
raise CalledProcessError
lines = lines.splitlines()
return _get_matching_load_commands(lines, cb_filter)
return _get_matching_load_commands(lines_split, cb_filter)


def get_dylibs(path):
Expand Down

0 comments on commit 7dac1cb

Please sign in to comment.