This repository was archived by the owner on Aug 24, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -1166,6 +1166,20 @@ function add_repositories()
1166
1166
1167
1167
_log_stage " Setting up repositories"
1168
1168
1169
+ AE_UMASK_PRE_HOOK=" $( umask) "
1170
+ _log_debug " Default UMASK is $AE_UMASK_PRE_HOOK "
1171
+
1172
+ if [[ $AE_UMASK_PRE_HOOK != " 0022" ]]; then
1173
+ _log_notice " Setting UMASK to 0022 for the script to avoid APT errors"
1174
+ _log_notice " This will be reverted at the end of this task."
1175
+ if ! umask 0022; then
1176
+ _log_error " Failed to set UMASK to 0022 for task: Repositories"
1177
+ _log_error " This may result in errors while updating repositories via packagekit"
1178
+ fi
1179
+ else
1180
+ _log_debug " No need to modify UMASK"
1181
+ fi
1182
+
1169
1183
1170
1184
local exit_status
1171
1185
local sources_list_bak_ts
@@ -1789,6 +1803,16 @@ deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main"
1789
1803
_log_debug " Skipped ROS"
1790
1804
fi # add_ros_repo
1791
1805
1806
+ # Reset UMASK if not 0022
1807
+ if [[ $AE_UMASK_PRE_HOOK != " 0022" ]]; then
1808
+ _log_notice " Setting UMASK back to $AE_UMASK_PRE_HOOK "
1809
+ if ! umask " $AE_UMASK_PRE_HOOK " ; then
1810
+ _log_error " Failed to set UMASK back to $AE_UMASK_PRE_HOOK "
1811
+ fi
1812
+ else
1813
+ _log_debug " No need to modify UMASK (post-task-hook)"
1814
+ fi
1815
+
1792
1816
update_repos
1793
1817
1794
1818
You can’t perform that action at this time.
0 commit comments