1
0
mirror of https://github.com/altlinux/gpupdate.git synced 2025-10-17 23:33:44 +03:00

Compare commits

...

5 Commits

Author SHA1 Message Date
Valery Sinelnikov
4d6a5d750c 0.10.4-alt1
- Fixed the definition of the module activation check (closes: 50755)
- Fixed sorting of scripts (closes: 50756)
- Fixed reading key values from dconf
- Changed the method for getting the list of packages for pkcon_runner
2024-06-27 16:48:27 +04:00
Valery Sinelnikov
84e1340362 Fixed sorting of scripts
Reported-by: Sergey Sysoev <sysoevsa@surgut.gazprom.ru>
2024-06-27 16:43:18 +04:00
5ee05df574 Fixed the definition of the module activation check
Reported-by: Sergey Sysoev <sysoevsa@surgut.gazprom.ru>
2024-06-27 14:26:37 +04:00
Valery Sinelnikov
2a993f0400 Fixed reading key values ​​from dconf 2024-06-27 12:14:59 +04:00
Valery Sinelnikov
b878b7e1b3 Changed the method for getting the list of packages for pkcon_runner 2024-06-27 12:13:08 +04:00
4 changed files with 24 additions and 18 deletions

View File

@@ -36,8 +36,8 @@ def check_windows_mapping_enabled(storage):
flag = storage.get_key_value(windows_mapping_enable_flag)
result = True
if flag and '0' == str(flag):
flag = str(flag)
if flag and '0' == flag:
result = False
return result
@@ -48,9 +48,9 @@ def check_module_enabled(storage, module_name):
flag = storage.get_key_value(gpupdate_module_flag)
result = None
flag = str(flag)
if flag:
if '1' == str(flag):
if '1' == flag:
result = True
else:
result = False

View File

@@ -57,16 +57,16 @@ class Pkcon_applier:
self.storage.filling_storage_from_dconf()
install_branch = '{}/{}'.format(self.__hklm_branch, self.__install_key_name)
remove_branch = '{}/{}'.format(self.__hklm_branch, self.__remove_key_name)
self.install_packages_setting = self.storage.filter_hklm_entries(install_branch)
self.remove_packages_setting = self.storage.filter_hklm_entries(remove_branch)
self.install_packages_setting = self.storage.get_key_value(install_branch)
self.remove_packages_setting = self.storage.get_key_value(remove_branch)
for package in self.install_packages_setting:
if not is_rpm_installed(package.data):
self.install_packages.add(package.data)
if not is_rpm_installed(package):
self.install_packages.add(package)
for package in self.remove_packages_setting:
if package.data in self.install_packages:
self.install_packages.remove(package.data)
if is_rpm_installed(package.data):
self.remove_packages.add(package.data)
if package in self.install_packages:
self.install_packages.remove(package)
if is_rpm_installed(package):
self.remove_packages.add(package)
def apply(self):
log('D142')

View File

@@ -206,7 +206,7 @@ class Dconf_registry():
dconf_dict = self.get_key_values(self.get_matching_keys(startswith))
for key, value in dconf_dict.items():
keys_tmp = key.split('/')
update_dict(output_dict.setdefault('/'.join(keys_tmp[:-1])[1:], {}), {keys_tmp[-1]: value})
update_dict(output_dict.setdefault('/'.join(keys_tmp[:-1])[1:], {}), {keys_tmp[-1]: str(value)})
log('D207')
return output_dict
@@ -371,13 +371,13 @@ class Dconf_registry():
def get_scripts(cls, sid, action):
action_scripts = list()
for part in cls.scripts:
if action == 'LOGON':
if action == 'LOGON' and part.action == 'LOGON':
action_scripts.append(part)
elif action == 'LOGOFF':
elif action == 'LOGOFF' and part.action == 'LOGOFF':
action_scripts.append(part)
elif action == 'STARTUP':
elif action == 'STARTUP' and part.action == 'STARTUP':
action_scripts.append(part)
elif action == 'SHUTDOWN':
elif action == 'SHUTDOWN' and part.action == 'SHUTDOWN':
action_scripts.append(part)
return action_scripts

View File

@@ -33,7 +33,7 @@
%add_python3_req_skip util.gpoa_ini_parsing
Name: gpupdate
Version: 0.10.3
Version: 0.10.4
Release: alt1
Summary: GPT applier
@@ -191,6 +191,12 @@ fi
%exclude %python3_sitelibdir/gpoa/test
%changelog
* Thu Jun 27 2024 Valery Sinelnikov <greh@altlinux.org> 0.10.4-alt1
- Fixed the definition of the module activation check (closes: 50755)
- Fixed sorting of scripts (closes: 50756)
- Fixed reading key values from dconf
- Changed the method for getting the list of packages for pkcon_runner
* Wed Jun 19 2024 Valery Sinelnikov <greh@altlinux.org> 0.10.3-alt1
- Added autocompletion for gpoa, gpupdate, gpupdate-setup
- Added correct work with json data in keys for the Firefox browser