mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Only update the bootstrap script on request. Fixes #9535.
This commit is contained in:
parent
ca79876787
commit
ad54eca1ab
1 changed files with 20 additions and 9 deletions
29
setup.py
29
setup.py
|
@ -106,28 +106,39 @@ exec(compile(open(SALT_SYSPATHS).read(), SALT_SYSPATHS, 'exec'))
|
||||||
class CloudSdist(sdist):
|
class CloudSdist(sdist):
|
||||||
user_options = sdist.user_options + [
|
user_options = sdist.user_options + [
|
||||||
('skip-bootstrap-download', None,
|
('skip-bootstrap-download', None,
|
||||||
'Skip downloading the bootstrap-salt.sh script. This can also be '
|
'[DEPRECATED] Skip downloading the bootstrap-salt.sh script. This '
|
||||||
'triggered by having `SKIP_BOOTSTRAP_DOWNLOAD=1` as an environment '
|
'can also be triggered by having `SKIP_BOOTSTRAP_DOWNLOAD=1` as an '
|
||||||
'variable.')
|
'environment variable.'),
|
||||||
|
('download-bootstrap-script', None,
|
||||||
|
'Download the latest stable bootstrap-salt.sh script. This '
|
||||||
|
'can also be triggered by having `DOWNLOAD_BOOTSTRAP_SCRIPT=1` as an '
|
||||||
|
'environment variable.')
|
||||||
|
|
||||||
]
|
]
|
||||||
boolean_options = sdist.boolean_options + [
|
boolean_options = sdist.boolean_options + [
|
||||||
'skip-bootstrap-download'
|
'skip-bootstrap-download',
|
||||||
|
'download-bootstrap-script'
|
||||||
]
|
]
|
||||||
|
|
||||||
def initialize_options(self):
|
def initialize_options(self):
|
||||||
sdist.initialize_options(self)
|
sdist.initialize_options(self)
|
||||||
self.skip_bootstrap_download = False
|
self.skip_bootstrap_download = True
|
||||||
|
self.download_bootstrap_script = False
|
||||||
|
|
||||||
def finalize_options(self):
|
def finalize_options(self):
|
||||||
sdist.finalize_options(self)
|
sdist.finalize_options(self)
|
||||||
if 'SKIP_BOOTSTRAP_DOWNLOAD' in os.environ:
|
if 'SKIP_BOOTSTRAP_DOWNLOAD' in os.environ:
|
||||||
skip_bootstrap_download = os.environ.get(
|
log('Please stop using \'SKIP_BOOTSTRAP_DOWNLOAD\' and use '
|
||||||
'SKIP_BOOTSTRAP_DOWNLOAD', '0'
|
'\'DOWNLOAD_BOOTSTRAP_SCRIPT\' instead')
|
||||||
|
|
||||||
|
if 'DOWNLOAD_BOOTSTRAP_SCRIPT' in os.environ:
|
||||||
|
download_bootstrap_script = os.environ.get(
|
||||||
|
'DOWNLOAD_BOOTSTRAP_SCRIPT', '0'
|
||||||
)
|
)
|
||||||
self.skip_bootstrap_download = skip_bootstrap_download == '1'
|
self.download_bootstrap_script = download_bootstrap_script == '1'
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
if self.skip_bootstrap_download is False:
|
if self.download_bootstrap_script is True:
|
||||||
# Let's update the bootstrap-script to the version defined to be
|
# Let's update the bootstrap-script to the version defined to be
|
||||||
# distributed. See BOOTSTRAP_SCRIPT_DISTRIBUTED_VERSION above.
|
# distributed. See BOOTSTRAP_SCRIPT_DISTRIBUTED_VERSION above.
|
||||||
url = (
|
url = (
|
||||||
|
|
Loading…
Add table
Reference in a new issue