Skip to content

Commit

Permalink
Merge pull request conda#3726 from soapy1/warning-for-old-things
Browse files Browse the repository at this point in the history
Error and exit for upgrading noarch and info/files
  • Loading branch information
kalefranz authored Nov 8, 2016
2 parents 621c37c + 3113879 commit a72a704
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions conda/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
import time
import traceback
from os.path import abspath, basename, dirname, isdir, isfile, islink, join, relpath
from conda.cli.common import error_and_exit

try:
from conda.lock import Locked
Expand Down Expand Up @@ -622,10 +623,18 @@ def link(pkgs_dir, prefix, dist, linktype=LINK_HARD, index=None):
sys.exit('Error: pre-link failed: %s' % dist)

info_dir = join(source_dir, 'info')

if not os.path.isfile(join(info_dir, "files")):
error_and_exit("Installing %s requires a minimum conda version of 4.3." % dist)

files = list(yield_lines(join(info_dir, 'files')))
has_prefix_files = read_has_prefix(join(info_dir, 'has_prefix'))
no_link = read_no_link(info_dir)

full_dist_name = "%s.tar.bz2" % dist
if not index.get(full_dist_name, {}).get("noarch", None) in (True, False, None, "generic"):
error_and_exit("Installing %s requires a minimum conda version of 4.3." % dist)

with Locked(prefix), Locked(pkgs_dir):
for f in files:
src = join(source_dir, f)
Expand Down

0 comments on commit a72a704

Please sign in to comment.