vm: rename 'yum-proxy-setup' feature to 'updates-proxy-setup'

The 'yum-proxy-setup' is deprecated since R3.0, so finally remove old
name.
But add it to R3.x compatibility layer.
This commit is contained in:
Marek Marczykowski-Górecki 2016-03-07 03:26:59 +01:00 committed by Wojtek Porczyk
parent b6d8c7fb81
commit 9567f7b40b
2 changed files with 6 additions and 3 deletions

View File

@ -229,3 +229,6 @@ class R3Compatibility(qubes.ext.Extension):
# forcefully convert to '0' or '1'
vm.qdb.write('/qubes-service/{}'.format(service),
str(int(bool(value))))
if 'updates-proxy-setup' in vm.features.keys():
vm.qdb.write('/qubes-service/{}'.format('yum-proxy-setup'),
str(int(bool(vm.features['updates-proxy-setup']))))

View File

@ -564,13 +564,13 @@ class BaseVM(qubes.PropertyHolder):
os.path.basename(sys.argv[0]), err)
return False
# Automatically enable/disable 'yum-proxy-setup' service based on
# Automatically enable/disable 'updates-proxy-setup' service based on
# allowYumProxy
if conf['allowYumProxy']:
self.features['yum-proxy-setup'] = '1'
self.features['updates-proxy-setup'] = '1'
else:
try:
del self.features['yum-proxy-setup']
del self.features['updates-proxy-setup']
except KeyError:
pass