Jelajahi Sumber

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.
Marek Marczykowski-Górecki 8 tahun lalu
induk
melakukan
9567f7b40b
2 mengubah file dengan 6 tambahan dan 3 penghapusan
  1. 3 0
      qubes/ext/r3compatibility.py
  2. 3 3
      qubes/vm/__init__.py

+ 3 - 0
qubes/ext/r3compatibility.py

@@ -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']))))

+ 3 - 3
qubes/vm/__init__.py

@@ -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