summarylogtreecommitdiffstats
path: root/install.py.patch
diff options
context:
space:
mode:
authorIsmaël Bouya2016-10-25 15:37:38 +0200
committerIsmaël Bouya2016-10-25 15:38:23 +0200
commit8ec4c3d134e9432acd3e9b7a0d41143953637f38 (patch)
tree08dee9e3bf637111c59cad9b747ac46e721f1a76 /install.py.patch
parente5bff5ebdf2c9e5d98c0f3b9c95e06fb25e4c395 (diff)
downloadaur-8ec4c3d134e9432acd3e9b7a0d41143953637f38.tar.gz
Upgrade to 4.2.0 by Petron
Diffstat (limited to 'install.py.patch')
-rw-r--r--install.py.patch78
1 files changed, 78 insertions, 0 deletions
diff --git a/install.py.patch b/install.py.patch
new file mode 100644
index 000000000000..c25587f18c1d
--- /dev/null
+++ b/install.py.patch
@@ -0,0 +1,78 @@
+--- a/pkgs/.install.py> 2016-10-22 22:34:35.739932506 +0800
++++ b/pkgs/.install.py> 2016-10-22 22:35:04.296779737 +0800
+@@ -44,6 +44,7 @@
+-
+ # these may be changed in main()
+ ROOT_PREFIX = sys.prefix
++instdir = ROOT_PREFIX
+ PKGS_DIR = join(ROOT_PREFIX, 'pkgs')
+ SKIP_SCRIPTS = False
+ FORCE = False
+@@ -1145,7 +1146,9 @@
+ return res
+-
+-
+-def update_prefix(path, new_prefix, placeholder, mode):
++def update_prefix(path, new_prefix, placeholder, mode, instdir=None):
++ if not instdir is None:
++ new_prefix = instdir
+ if on_win:
+ # force all prefix replacements to forward slashes to simplify need
+ # to escape backslashes - replace with unix-style path separators
+@@ -1269,7 +1272,7 @@
+ return set(fn[:-5] for fn in os.listdir(meta_dir) if fn.endswith('.json'))
+-
+-
+-def link(prefix, dist, linktype=LINK_HARD):
++def link(prefix, dist, linktype=LINK_HARD, instdir=None):
+ '''
+ Link a package in a specified prefix. We assume that the packacge has
+ been extra_info in either
+@@ -1309,7 +1312,7 @@
+ for f in sorted(has_prefix_files):
+ placeholder, mode = has_prefix_files[f]
+ try:
+- update_prefix(join(prefix, f), prefix, placeholder, mode)
++ update_prefix(join(prefix, f), prefix, placeholder, mode, instdir)
+ except PaddingError:
+ sys.exit("ERROR: placeholder '%s' too short in: %s\n" %
+ (placeholder, dist))
+@@ -1384,7 +1387,7 @@
+ prefix = prefix_env(env_name)
+ for dist in dists:
+ assert dist in IDISTS
+- link(prefix, dist, linktype)
++ link(prefix, dist, linktype, instdir)
+-
+ for dist in duplicates_to_remove(linked(prefix), dists):
+ meta_path = join(prefix, 'conda-meta', dist + '.json')
+@@ -1419,7 +1422,7 @@
+-
+-
+ def main():
+- global ROOT_PREFIX, PKGS_DIR, FORCE
++ global ROOT_PREFIX, PKGS_DIR, FORCE, instdir
+-
+ p = OptionParser(description="conda link tool used by installers")
+-
+@@ -1428,6 +1431,10 @@
+ default=abspath(join(__file__, '..', '..')),
+ help="root prefix (defaults to %default)")
+-
++ p.add_option('--instdir',
++ action="store",
++ help="install dir (defaults to root prefix)")
++
+ p.add_option('--post',
+ action="store",
+ help="perform post extract (on a single package), "
+@@ -1439,6 +1446,10 @@ p.error('no arguments expected')
+-
+ ROOT_PREFIX = opts.root_prefix
++ if not opts.instdir:
++ instdir = ROOT_PREFIX
++ else:
++ instdir = opts.instdir
+ PKGS_DIR = join(ROOT_PREFIX, 'pkgs')
+-
+ if opts.post: