mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 08:58:59 +00:00
Merge pull request #37358 from Firewire2002/2016.3.3_issue37355
Fix/workaround for issue #37355
This commit is contained in:
commit
5e58b32934
@ -292,6 +292,18 @@ def gen_thin(cachedir, extra_mods='', overwrite=False, so_mods='',
|
|||||||
if tempdir is not None:
|
if tempdir is not None:
|
||||||
shutil.rmtree(tempdir)
|
shutil.rmtree(tempdir)
|
||||||
tempdir = None
|
tempdir = None
|
||||||
|
|
||||||
|
# symlink for backports directory on old distributions
|
||||||
|
tmpbackports = tempfile.mkdtemp(suffix='_backports_workaround', prefix='salt_')
|
||||||
|
tmpbackports_symlink = os.path.join(tmpbackports, 'symlink')
|
||||||
|
os.symlink('salt/ext', tmpbackports_symlink)
|
||||||
|
tfp_deref_old = tfp.dereference
|
||||||
|
tfp.dereference = False
|
||||||
|
tfp.add(tmpbackports_symlink, arcname=os.path.join('py{0}'.format(py_ver), 'backports'))
|
||||||
|
tfp.dereference = tfp_deref_old
|
||||||
|
shutil.rmtree(tmpbackports)
|
||||||
|
# workaround end
|
||||||
|
|
||||||
os.chdir(thindir)
|
os.chdir(thindir)
|
||||||
tfp.add('salt-call')
|
tfp.add('salt-call')
|
||||||
with salt.utils.fopen(thinver, 'w+') as fp_:
|
with salt.utils.fopen(thinver, 'w+') as fp_:
|
||||||
|
Loading…
Reference in New Issue
Block a user