mirror of
https://github.com/altlinux/gpupdate.git
synced 2025-11-12 04:24:18 +03:00
Compare commits
5 Commits
0.9.7-alt1
...
bugsFix
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a8bc2dbcb5 | ||
|
|
585811e282 | ||
|
|
0b497bcc02 | ||
|
|
e6f19a2116 | ||
|
|
86c240b9df |
@@ -61,6 +61,9 @@ class system_gsettings:
|
|||||||
def append(self, schema, path, data, lock, helper):
|
def append(self, schema, path, data, lock, helper):
|
||||||
self.gsettings.append(system_gsetting(schema, path, data, lock, helper))
|
self.gsettings.append(system_gsetting(schema, path, data, lock, helper))
|
||||||
|
|
||||||
|
def pop(self):
|
||||||
|
self.gsettings.pop()
|
||||||
|
|
||||||
def apply(self):
|
def apply(self):
|
||||||
config = configparser.ConfigParser()
|
config = configparser.ConfigParser()
|
||||||
|
|
||||||
@@ -96,7 +99,7 @@ class system_gsettings:
|
|||||||
def glib_map(value, glib_type):
|
def glib_map(value, glib_type):
|
||||||
result_value = value
|
result_value = value
|
||||||
|
|
||||||
if glib_type == 'i' or glib_type == 'b':
|
if glib_type == 'i' or glib_type == 'b' or glib_type == 'q':
|
||||||
result_value = GLib.Variant(glib_type, int(value))
|
result_value = GLib.Variant(glib_type, int(value))
|
||||||
else:
|
else:
|
||||||
result_value = GLib.Variant(glib_type, value)
|
result_value = GLib.Variant(glib_type, value)
|
||||||
|
|||||||
@@ -78,6 +78,7 @@ class gsettings_applier(applier_frontend):
|
|||||||
self.override_old_file = os.path.join(self.__global_schema, self.__override_old_file)
|
self.override_old_file = os.path.join(self.__global_schema, self.__override_old_file)
|
||||||
self.gsettings = system_gsettings(self.override_file)
|
self.gsettings = system_gsettings(self.override_file)
|
||||||
self.locks = dict()
|
self.locks = dict()
|
||||||
|
self.dictArr = dict()
|
||||||
self.__module_enabled = check_enabled(
|
self.__module_enabled = check_enabled(
|
||||||
self.storage
|
self.storage
|
||||||
, self.__module_name
|
, self.__module_name
|
||||||
@@ -113,16 +114,33 @@ class gsettings_applier(applier_frontend):
|
|||||||
# Calculate all configured gsettings
|
# Calculate all configured gsettings
|
||||||
for setting in self.gsettings_keys:
|
for setting in self.gsettings_keys:
|
||||||
helper = None
|
helper = None
|
||||||
valuename = setting.hive_key.rpartition('\\')[2]
|
valuename = setting.valuename
|
||||||
rp = valuename.rpartition('.')
|
rp = valuename.rpartition('.')
|
||||||
schema = rp[0]
|
schema = rp[0]
|
||||||
path = rp[2]
|
path = rp[2]
|
||||||
lock = bool(self.locks[valuename]) if valuename in self.locks else None
|
data = setting.data
|
||||||
|
|
||||||
if setting.hive_key.lower() == self.__wallpaper_entry.lower():
|
if setting.hive_key.lower() == self.__wallpaper_entry.lower():
|
||||||
self.update_file_cache(setting.data)
|
self.update_file_cache(setting.data)
|
||||||
helper = self.uri_fetch_helper
|
helper = self.uri_fetch_helper
|
||||||
self.gsettings.append(schema, path, setting.data, lock, helper)
|
# Registry branch ends with back slash.
|
||||||
|
# If keyname starts with same prefix, it would be array
|
||||||
|
elif setting.keyname.lower().startswith(self.__registry_branch.lower()):
|
||||||
|
valuenameArr = setting.keyname.rpartition('\\')[2]
|
||||||
|
if valuenameArr:
|
||||||
|
valuename = valuenameArr
|
||||||
|
rpArr = valuename.rpartition('.')
|
||||||
|
schema = rpArr[0]
|
||||||
|
path = rpArr[2]
|
||||||
|
if self.dictArr and path in self.dictArr.keys():
|
||||||
|
self.dictArr[path].append(setting.data)
|
||||||
|
self.gsettings.pop()
|
||||||
|
else:
|
||||||
|
self.dictArr[path] = [setting.data,]
|
||||||
|
data = self.dictArr[path]
|
||||||
|
|
||||||
|
lock = bool(self.locks[valuename]) if valuename in self.locks else None
|
||||||
|
self.gsettings.append(schema, path, data, lock, helper)
|
||||||
# Create GSettings policy with highest available priority
|
# Create GSettings policy with highest available priority
|
||||||
self.gsettings.apply()
|
self.gsettings.apply()
|
||||||
|
|
||||||
@@ -193,7 +211,7 @@ class gsettings_applier_user(applier_frontend):
|
|||||||
self.gsettings = list()
|
self.gsettings = list()
|
||||||
self.__module_enabled = check_enabled(self.storage, self.__module_name, self.__module_enabled)
|
self.__module_enabled = check_enabled(self.storage, self.__module_name, self.__module_enabled)
|
||||||
self.__windows_mapping_enabled = check_windows_mapping_enabled(self.storage)
|
self.__windows_mapping_enabled = check_windows_mapping_enabled(self.storage)
|
||||||
|
self.dictArr = dict()
|
||||||
self.__windows_settings = dict()
|
self.__windows_settings = dict()
|
||||||
self.windows_settings = list()
|
self.windows_settings = list()
|
||||||
mapping = [
|
mapping = [
|
||||||
@@ -265,6 +283,18 @@ class gsettings_applier_user(applier_frontend):
|
|||||||
schema = rp[0]
|
schema = rp[0]
|
||||||
path = rp[2]
|
path = rp[2]
|
||||||
helper = self.uri_fetch_helper if setting.hive_key.lower() == self.__wallpaper_entry.lower() else None
|
helper = self.uri_fetch_helper if setting.hive_key.lower() == self.__wallpaper_entry.lower() else None
|
||||||
|
if valuename == setting.data:
|
||||||
|
valuenameArr = setting.keyname.rpartition('\\')[2]
|
||||||
|
rpArr = valuenameArr.rpartition('.')
|
||||||
|
schema = rpArr[0]
|
||||||
|
path = rpArr[2]
|
||||||
|
if self.dictArr and path in self.dictArr.keys():
|
||||||
|
self.dictArr[path].append(setting.data)
|
||||||
|
self.gsettings.pop()
|
||||||
|
else:
|
||||||
|
self.dictArr[path] = [setting.data,]
|
||||||
|
self.gsettings.append(user_gsetting(schema, path, self.dictArr[path], helper))
|
||||||
|
continue
|
||||||
self.gsettings.append(user_gsetting(schema, path, setting.data, helper))
|
self.gsettings.append(user_gsetting(schema, path, setting.data, helper))
|
||||||
|
|
||||||
# Create GSettings policy with highest available priority
|
# Create GSettings policy with highest available priority
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
%define _unpackaged_files_terminate_build 1
|
%define _unpackaged_files_terminate_build 1
|
||||||
|
|
||||||
Name: gpupdate
|
Name: gpupdate
|
||||||
Version: 0.9.7
|
Version: 0.9.8
|
||||||
Release: alt1
|
Release: alt0.dev1
|
||||||
|
|
||||||
Summary: GPT applier
|
Summary: GPT applier
|
||||||
License: GPLv3+
|
License: GPLv3+
|
||||||
|
|||||||
Reference in New Issue
Block a user