aboutsummaryrefslogtreecommitdiffstats
path: root/mini-dinstall
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@ubuntu.com>2019-07-13 21:03:34 -0400
committerLibravatarUnit 193 <unit193@ubuntu.com>2019-07-13 23:09:21 -0400
commit91ad709de018d524a241d796da1698eaf9206e68 (patch)
tree8e4d1c91c7b9223c563a937e55d64eeccbe0f065 /mini-dinstall
parent4b168e80f105e7d93f19a5cbd691593eb1f95778 (diff)
Deprecate chown_changes_files in favor of restrict_changes_files.
Closes: #821960
Diffstat (limited to 'mini-dinstall')
-rwxr-xr-xmini-dinstall11
1 files changed, 9 insertions, 2 deletions
diff --git a/mini-dinstall b/mini-dinstall
index f9d8ec1..9874ee8 100755
--- a/mini-dinstall
+++ b/mini-dinstall
@@ -384,7 +384,8 @@ class DistOptionHandler:
'post_install_script': ['str', None],
'pre_install_script': ['str', None],
'dynamic_reindex': ['bool', True],
- 'chown_changes_files': ['bool', True],
+ 'restrict_changes_files': ['bool', None],
+ 'chown_changes_files': ['bool', None],
'keep_old': ['bool', False],
'mail_on_success': ['bool', True],
'tweet_on_success': ['bool', False],
@@ -435,6 +436,12 @@ for dist in list(distributions.keys()):
distributions[dist] = distoptionhandler.get_option_map(dist)
if distributions[dist]['archive_style'] not in ('simple-subdir', 'flat'):
raise DinstallException('Unknown archive style "%s"' % distributions[dist]['archive_style'])
+ if distributions[dist]['chown_changes_files'] is not None:
+ logger.warn("'chown_changes_files' is deprecated, please use 'restrict_changes_files' instead")
+ if distributions[dist]['restrict_changes_files'] is None:
+ distributions[dist]['restrict_changes_files'] = distributions[dist]['chown_changes_files']
+ if distributions[dist]['restrict_changes_files'] is None:
+ distributions[dist]['restrict_changes_files'] = True
logger.debug("Distributions: %s" % distributions)
@@ -803,7 +810,7 @@ class ArchiveDir:
self._logger.exception('Failed to process "%s"' % changefilename)
self._reject_changefile(changefilename, changefile, e)
return False
- if self._chown_changes_files:
+ if self._restrict_changes_files:
do_chmod(changefilename, 0o600)
target = os.path.join(self._dir, os.path.basename(changefilename))
# the final step