View | Details | Raw Unified | Return to bug 30261 | Differences between
and this patch

Collapse All | Expand All

(-)a/branches/ucs-3.1/ucs/base/univention-updater/debian/changelog (+2 lines)
Lines 1-6 Link Here
1
univention-updater (8.0.68-1) unstable; urgency=low
1
univention-updater (8.0.68-1) unstable; urgency=low
2
2
3
  * Force univention-upgrade --check to be non-interactive (Bug #30315)
3
  * Force univention-upgrade --check to be non-interactive (Bug #30315)
4
  * Replace component/parts in favor of component/{,un}maintained inheriting
5
    from repository/online/{,un}maintained (Bug #30261)
4
6
5
 -- Philipp Hahn <hahn@univention.de>  Tue, 26 Feb 2013 19:36:08 +0100
7
 -- Philipp Hahn <hahn@univention.de>  Tue, 26 Feb 2013 19:36:08 +0100
6
8
(-)a/branches/ucs-3.1/ucs/base/univention-updater/debian/univention-updater.postinst (-1 lines)
Lines 62-68 if [ "$1" = "configure" ]; then Link Here
62
		update/doc/releasenotes/description"?http://download.univention.de/doc/"\
62
		update/doc/releasenotes/description"?http://download.univention.de/doc/"\
63
		repository/online?no \
63
		repository/online?no \
64
		repository/online/port?80 \
64
		repository/online/port?80 \
65
		repository/online/maintained?yes \
66
		repository/online/unmaintained?no \
65
		repository/online/unmaintained?no \
67
		repository/online/hotfixes?no \
66
		repository/online/hotfixes?no \
68
		repository/mirror?"$mirror_default" \
67
		repository/mirror?"$mirror_default" \
(-)a/branches/ucs-3.1/ucs/base/univention-updater/debian/univention-updater.univention-config-registry (-2 lines)
Lines 8-14 Variables: local/repository Link Here
8
Variables: repository/online
8
Variables: repository/online
9
Variables: repository/online/server
9
Variables: repository/online/server
10
Variables: repository/online/port
10
Variables: repository/online/port
11
Variables: repository/online/maintained
12
Variables: repository/online/unmaintained
11
Variables: repository/online/unmaintained
13
Variables: repository/online/sources
12
Variables: repository/online/sources
14
Variables: repository/online/httpmethod
13
Variables: repository/online/httpmethod
Lines 35-41 Variables: local/repository Link Here
35
Variables: repository/online
34
Variables: repository/online
36
Variables: repository/online/server
35
Variables: repository/online/server
37
Variables: repository/online/port
36
Variables: repository/online/port
38
Variables: repository/online/maintained
39
Variables: repository/online/unmaintained
37
Variables: repository/online/unmaintained
40
Variables: repository/online/component/.*
38
Variables: repository/online/component/.*
41
Variables: repository/mirror
39
Variables: repository/mirror
(-)a/branches/ucs-3.1/ucs/base/univention-updater/debian/univention-updater.univention-config-registry-variables (-3 / +92 lines)
Lines 1-6 Link Here
1
[repository/online/server]
1
[repository/online/server]
2
Description[de]=Server, auf dem das Repository vorgehalten wird [apt.univention.de]
2
Description[de]=Server, auf dem das Repository vorgehalten wird [updates.software-univention.de]
3
Description[en]=Server holding the Repository [apt.univention.de]
3
Description[en]=Server holding the Repository [updates.software-univention.de]
4
Type=str
4
Type=str
5
Categories=service-software-management
5
Categories=service-software-management
6
6
Lines 104-110 Categories=service-software-management Link Here
104
Description[de]=Pakete aus dem Maintained-Bereich verwenden [yes]
104
Description[de]=Pakete aus dem Maintained-Bereich verwenden [yes]
105
Description[en]=Use packages from the maintained section [yes]
105
Description[en]=Use packages from the maintained section [yes]
106
Type=bool
106
Type=bool
107
Categories=service-software-management
107
Categories=deprecated
108
108
109
[repository/online/unmaintained]
109
[repository/online/unmaintained]
110
Description[de]=Pakete aus dem Unmaintained-Bereich verwenden [no]
110
Description[de]=Pakete aus dem Unmaintained-Bereich verwenden [no]
Lines 136-141 Description[en]=Lowest errata-version to use [1] Link Here
136
Type=int
136
Type=int
137
Categories=service-software-management
137
Categories=service-software-management
138
138
139
[repository/online/component/.*]
140
Description[de]=Aktiviert das Einbinden der Komponente
141
Description[en]=Activates the inclusion of the component
142
Type=bool
143
Categories=service-software-management
144
145
[repository/online/component/.*/erratalevel]
146
Description[de]=Errata-Patchlevel der Komponente
147
Description[en]=Errata patchlevel of the component
148
Type=int
149
Categories=service-software-management
150
151
[repository/online/component/.*/parts]
152
Description[de]=Bereiche, aus dem Pakete verwendet werden [maintained]
153
Description[en]=Sections from which packages are used [maintained]
154
Type=str
155
Categories=deprecated
156
157
[repository/online/component/.*/unmaintained]
158
Description[de]=Pakete aus dem Unmaintained-Bereich verwenden [no]
159
Description[en]=Use packages from the unmaintained section [no]
160
Type=bool
161
Categories=service-software-management
162
163
[repository/online/component/.*/version]
164
Description[de]=Liste von Versionen der Komponente, die eingebunden werden sollen. 'current' erfordert das Vorhandensein der Komponente für die UCS Version, was u.a. Upgrades auf die nächste UCS-Version verhindert, bis auch die Komponente dafür vorhanden ist.
165
Description[en]=List of versions for component, which should be activated. 'current' requires the component to be available for the UCS version, which blocks upgrades to the next UCS version, until the component is available for it.
166
Type=str
167
Categories=service-software-management
168
169
[repository/online/component/.*/server]
170
Description[de]=Server, auf dem das Repository der Komponente vorgehalten wird
171
Description[en]=Server holding the Repository of the component
172
Type=str
173
Categories=service-software-management
174
175
[repository/online/component/.*/port]
176
Description[de]=TCP-Portnummer des online Repository Servers der Komponente
177
Description[en]=TCP port number of the online repository servers of the component
178
Type=int
179
Categories=service-software-management
180
181
[repository/online/component/.*/prefix]
182
Description[de]=Updateverzeichnis auf dem Repository Server der Komponente
183
Description[en]=Update directory on the repository server of the component
184
Type=str
185
Categories=service-software-management
186
187
[repository/online/component/.*/username]
188
Description[de]=Benutzername für den Zugriff auf den Repository Server der Komponente
189
Description[en]=User name to access the repository server of the component
190
Type=str
191
Categories=service-software-management
192
193
[repository/online/component/.*/password]
194
Description[de]=Passwort für den Zugriff auf den Repository Server der Komponente
195
Description[en]=Passwort to access the repository server of the component
196
Type=str
197
Categories=service-software-management
198
199
[repository/online/component/.*/localmirror]
200
Description[de]=Aktiviere/Deaktiviere das Spiegeln der Komponente in das lokale Repository
201
Description[en]=Enable/Disable mirroring the component into the local repository
202
Type=bool
203
Categories=service-software-management
204
205
[repository/online/component/.*/clean]
206
Description[de]=Skript zum Löschen nicht länger benötigter Pakete aus dem lokalen Repository erzeugen
207
Description[en]=Create script to delete obsolete packages from the local repository
208
Type=bool
209
Categories=service-software-management
139
210
140
[repository/mirror]
211
[repository/mirror]
141
Description[de]=Aktiviere/Deaktiviere das Spiegeln der Pakete in das lokale Repository [yes]
212
Description[de]=Aktiviere/Deaktiviere das Spiegeln der Pakete in das lokale Repository [yes]
Lines 328-330 Description[de]=Kommando zum Simulieren einer Aktualisierung aller installierter Link Here
328
Description[en]=Command to simulate the upgrade of all installed packages
399
Description[en]=Command to simulate the upgrade of all installed packages
329
Type=str
400
Type=str
330
Categories=service-software-management
401
Categories=service-software-management
402
403
[updater/identify]
404
Description[de]=Identifizierungsmerkmal des Updates
405
Description[en]=Identification property of the updater
406
Type=str
407
Categories=
408
409
[uuid/license]
410
Description[de]=Eindeutige ID der UCS Lizenz der Domäne
411
Description[en]=Unique ID of the UCS license of the domain
412
Type=str
413
Categories=
414
415
[uuid/system]
416
Description[de]=Eindeutige ID des Rechners
417
Description[en]=Unique ID of the host
418
Type=str
419
Categories=
(-)a/branches/ucs-3.1/ucs/base/univention-updater/modules/univention/updater/tools.py (-13 / +11 lines)
Lines 544-554 class UniventionUpdater: Link Here
544
			os.environ['no_proxy'] = self.configRegistry['proxy/no_proxy']
544
			os.environ['no_proxy'] = self.configRegistry['proxy/no_proxy']
545
545
546
		# check for maintained and unmaintained
546
		# check for maintained and unmaintained
547
		self.parts = []
547
		self.parts = ['maintained']
548
549
		if self.configRegistry.is_true('repository/online/maintained', True):
550
			self.parts.append('maintained')
551
552
		if self.configRegistry.is_true('repository/online/unmaintained', False):
548
		if self.configRegistry.is_true('repository/online/unmaintained', False):
553
			self.parts.append('unmaintained')
549
			self.parts.append('unmaintained')
554
550
Lines 803-809 class UniventionUpdater: Link Here
803
799
804
	def security_update_available(self, version=None):
800
	def security_update_available(self, version=None):
805
		'''Check for the security version for the current version.
801
		'''Check for the security version for the current version.
806
	       Returns next available security update number (integer) or False if no security update is available.
802
		   Returns next available security update number (integer) or False if no security update is available.
807
		'''
803
		'''
808
		if version:
804
		if version:
809
			start = end = version
805
			start = end = version
Lines 816-822 class UniventionUpdater: Link Here
816
812
817
	def errata_update_available(self, version=None):
813
	def errata_update_available(self, version=None):
818
		'''Check for the errata version for the current version.
814
		'''Check for the errata version for the current version.
819
	       Returns next available security update number (integer) or False if no security update is available.
815
		   Returns next available security update number (integer) or False if no security update is available.
820
		'''
816
		'''
821
		if version:
817
		if version:
822
			start = end = version
818
			start = end = version
Lines 1115-1123 class UniventionUpdater: Link Here
1115
1111
1116
	def _iterate_component_repositories(self, components, start, end, archs, for_mirror_list=False, errata_level=None, iterate_errata=True):
1112
	def _iterate_component_repositories(self, components, start, end, archs, for_mirror_list=False, errata_level=None, iterate_errata=True):
1117
		'''
1113
		'''
1118
			Iterate over all components and return (server, version).
1114
		Iterate over all components and return (server, version).
1119
			for_mirror_list shall be True if the code shall iterate over component
1115
		for_mirror_list shall be True if the code shall iterate over component
1120
			repositories for mirror.list.
1116
		repositories for mirror.list.
1121
		'''
1117
		'''
1122
1118
1123
		self.log.info('Searching components %r [%s..%s)', components, start, end)
1119
		self.log.info('Searching components %r [%s..%s)', components, start, end)
Lines 1126-1133 class UniventionUpdater: Link Here
1126
			# server, port, prefix
1122
			# server, port, prefix
1127
			server = self._get_component_server(component, for_mirror_list=for_mirror_list)
1123
			server = self._get_component_server(component, for_mirror_list=for_mirror_list)
1128
			# parts
1124
			# parts
1129
			parts = self.configRegistry.get('repository/online/component/%s/parts' % component, 'maintained')
1125
			parts = set(self.parts)
1130
			parts = ['%s/component' % part for part in RE_SPLIT_MULTI.split(parts)]
1126
			if self.configRegistry.is_true('repository/online/component/%s/unmaintained' % (component)):
1127
				parts.add("unmaintained")
1128
			parts = list(parts)
1131
			# versions
1129
			# versions
1132
			if start == end:
1130
			if start == end:
1133
				versions = (start,)
1131
				versions = (start,)
Lines 1162-1168 class UniventionUpdater: Link Here
1162
1160
1163
				# Go through all errata level for this component and break if the first errata level is missing
1161
				# Go through all errata level for this component and break if the first errata level is missing
1164
				if for_mirror_list:
1162
				if for_mirror_list:
1165
					for i in range(1,1000):
1163
					for i in xrange(1, 1000):
1166
						valid = False
1164
						valid = False
1167
						patch_name = '%s-errata%s' % (component, i)
1165
						patch_name = '%s-errata%s' % (component, i)
1168
						for (UCSRepoPoolVariant, subarchs) in ((UCSRepoPool, archs), (UCSRepoPoolNoArch, ('all',))):
1166
						for (UCSRepoPoolVariant, subarchs) in ((UCSRepoPool, archs), (UCSRepoPoolNoArch, ('all',))):
(-)a/branches/ucs-3.1/ucs/management/univention-management-console-module-appcenter/debian/changelog (+7 lines)
Lines 1-3 Link Here
1
univention-management-console-module-appcenter (2.0.126-1) unstable; urgency=low
2
3
  * Replace component/parts in favor of component/{,un}maintained inheriting
4
    from repository/online/{,un}maintained (Bug #30261)
5
6
 -- Philipp Hahn <hahn@univention.de>  Wed, 27 Feb 2013 14:41:19 +0100
7
1
univention-management-console-module-appcenter (2.0.125-1) unstable; urgency=low
8
univention-management-console-module-appcenter (2.0.125-1) unstable; urgency=low
2
9
3
  * Fix overwriting important variables (Bug #30503)
10
  * Fix overwriting important variables (Bug #30503)
(-)a/branches/ucs-3.1/ucs/management/univention-management-console-module-appcenter/umc/js/appcenter/DetailsPage.js (-7 / +1 lines)
Lines 107-117 define([ Link Here
107
				},
107
				},
108
				{
108
				{
109
					type: CheckBox,
109
					type: CheckBox,
110
					name: 'maintained',
111
					label: _("Use maintained repositories")
112
				},
113
				{
114
					type: CheckBox,
115
					name: 'unmaintained',
110
					name: 'unmaintained',
116
					label: _("Use unmaintained repositories")
111
					label: _("Use unmaintained repositories")
117
				},
112
				},
Lines 148-154 define([ Link Here
148
					label: _("Advanced settings"),
143
					label: _("Advanced settings"),
149
					layout:
144
					layout:
150
					[
145
					[
151
						['maintained', 'unmaintained'],
146
						['unmaintained'],
152
						['username', 'password'],
147
						['username', 'password'],
153
						['version']
148
						['version']
154
					]
149
					]
Lines 236-242 define([ Link Here
236
					defaultpackages: '',
231
					defaultpackages: '',
237
					server: '',
232
					server: '',
238
					// TODO These have to be copied from the current settings
233
					// TODO These have to be copied from the current settings
239
					maintained: true,
240
					unmaintained: false
234
					unmaintained: false
241
				});
235
				});
242
		}
236
		}
(-)a/branches/ucs-3.1/ucs/management/univention-management-console-module-appcenter/umc/js/appcenter/SettingsPage.js (-5 / +1 lines)
Lines 73-89 define([ Link Here
73
				label: _("Repository prefix")
73
				label: _("Repository prefix")
74
			}, {
74
			}, {
75
				type: 'CheckBox',
75
				type: 'CheckBox',
76
				name: 'maintained',
77
				label: _("Use maintained repositories")
78
			}, {
79
				type: 'CheckBox',
80
				name: 'unmaintained',
76
				name: 'unmaintained',
81
				label: _("Use unmaintained repositories")
77
				label: _("Use unmaintained repositories")
82
			}];
78
			}];
83
79
84
			var formLayout = [
80
			var formLayout = [
85
				['server', 'prefix', 'submit' ],
81
				['server', 'prefix', 'submit' ],
86
				['maintained', 'unmaintained']
82
				['unmaintained']
87
			];
83
			];
88
84
89
			var formButtons = [{
85
			var formButtons = [{
(-)a/branches/ucs-3.1/ucs/management/univention-management-console-module-appcenter/umc/js/de.po (-4 / +3 lines)
Lines 701-710 msgid "Upgrade not possible" Link Here
701
msgstr "Aktualisierung nicht möglich"
701
msgstr "Aktualisierung nicht möglich"
702
702
703
#: umc/js/appcenter/DetailsPage.js: umc/js/appcenter/SettingsPage.js:
703
#: umc/js/appcenter/DetailsPage.js: umc/js/appcenter/SettingsPage.js:
704
msgid "Use maintained repositories"
705
msgstr "'Maintained' Repositories benutzen"
706
707
#: umc/js/appcenter/DetailsPage.js: umc/js/appcenter/SettingsPage.js:
708
msgid "Use unmaintained repositories"
704
msgid "Use unmaintained repositories"
709
msgstr "'Unmaintained' Repositories benutzen"
705
msgstr "'Unmaintained' Repositories benutzen"
710
706
Lines 814-816 msgstr "aktualisiert" Link Here
814
810
815
#~ msgid "Was the domain prepared as asked in the dialog before?"
811
#~ msgid "Was the domain prepared as asked in the dialog before?"
816
#~ msgstr "Wurde die Domäne wie zuvor beschrieben vorbereitet?"
812
#~ msgstr "Wurde die Domäne wie zuvor beschrieben vorbereitet?"
813
814
#~ msgid "Use maintained repositories"
815
#~ msgstr "'Maintained' Repositories benutzen"
(-)a/branches/ucs-3.1/ucs/management/univention-management-console-module-appcenter/umc/python/appcenter/__init__.py (-1 lines)
Lines 475-481 class Instance(umcm.Base): Link Here
475
475
476
		for _ in iterator:
476
		for _ in iterator:
477
			yield {
477
			yield {
478
				'maintained' : self.ucr.is_true('repository/online/maintained', False),
479
				'unmaintained' : self.ucr.is_true('repository/online/unmaintained', False),
478
				'unmaintained' : self.ucr.is_true('repository/online/unmaintained', False),
480
				'server' : self.ucr.get('repository/online/server', ''),
479
				'server' : self.ucr.get('repository/online/server', ''),
481
				'prefix' : self.ucr.get('repository/online/prefix', ''),
480
				'prefix' : self.ucr.get('repository/online/prefix', ''),
(-)a/branches/ucs-3.1/ucs/management/univention-management-console-module-appcenter/umc/python/appcenter/constants.py (-2 / +1 lines)
Lines 3-10 ONLINE_BASE = 'repository/online' Link Here
3
COMPONENT_BASE = '%s/component' % ONLINE_BASE
3
COMPONENT_BASE = '%s/component' % ONLINE_BASE
4
4
5
# Parameter names for component definitions
5
# Parameter names for component definitions
6
COMP_PARTS = ['maintained', 'unmaintained']
6
COMP_PARAMS = ['description', 'server', 'prefix', 'password', 'username', 'defaultpackages', 'version', 'localmirror', 'unmaintained']
7
COMP_PARAMS = ['description', 'server', 'prefix', 'password', 'username', 'defaultpackages', 'version', 'localmirror']
8
7
9
# Symbolic error codes for UCR write operations
8
# Symbolic error codes for UCR write operations
10
PUT_SUCCESS = 0
9
PUT_SUCCESS = 0
(-)a/branches/ucs-3.1/ucs/management/univention-management-console-module-appcenter/umc/python/appcenter/sanitizers.py (-2 lines)
Lines 25-31 class NoDoubleNameSanitizer(StringSanitizer): Link Here
25
basic_components_sanitizer = DictSanitizer({
25
basic_components_sanitizer = DictSanitizer({
26
		'server' : StringSanitizer(required=True, minimum=1),
26
		'server' : StringSanitizer(required=True, minimum=1),
27
		'prefix' : StringSanitizer(required=True),
27
		'prefix' : StringSanitizer(required=True),
28
		'maintained' : AnySanitizer(required=True, may_change_value=False, further_arguments=['unmaintained']),
29
		'unmaintained' : BooleanSanitizer(required=True),
28
		'unmaintained' : BooleanSanitizer(required=True),
30
	},
29
	},
31
	allow_other_keys=False,
30
	allow_other_keys=False,
Lines 34-40 basic_components_sanitizer = DictSanitizer({ Link Here
34
advanced_components_sanitizer = DictSanitizer({
33
advanced_components_sanitizer = DictSanitizer({
35
		'server' : StringSanitizer(),
34
		'server' : StringSanitizer(),
36
		'prefix' : StringSanitizer(),
35
		'prefix' : StringSanitizer(),
37
		'maintained' : BooleanSanitizer(),
38
		'unmaintained' : BooleanSanitizer(),
36
		'unmaintained' : BooleanSanitizer(),
39
		'enabled' : BooleanSanitizer(required=True),
37
		'enabled' : BooleanSanitizer(required=True),
40
		'name' : StringSanitizer(required=True, regex_pattern='^[A-Za-z0-9\-\_\.]+$'),
38
		'name' : StringSanitizer(required=True, regex_pattern='^[A-Za-z0-9\-\_\.]+$'),
(-)a/branches/ucs-3.1/ucs/management/univention-management-console-module-appcenter/umc/python/appcenter/util.py (-25 / +4 lines)
Lines 48-54 from univention.admin.handlers.computers import domaincontroller_backup Link Here
48
48
49
49
50
# local application
50
# local application
51
from constants import COMPONENT_BASE, COMP_PARTS, COMP_PARAMS, STATUS_ICONS, DEFAULT_ICON, PUT_SUCCESS, PUT_PROCESSING_ERROR
51
from constants import COMPONENT_BASE, COMP_PARAMS, STATUS_ICONS, DEFAULT_ICON, PUT_SUCCESS, PUT_PROCESSING_ERROR
52
52
53
def get_hosts(module, lo, ucr=None):
53
def get_hosts(module, lo, ucr=None):
54
 	hosts = module.lookup(None, lo, None)
54
 	hosts = module.lookup(None, lo, None)
Lines 275-282 class ComponentManager(object): Link Here
275
		"""
275
		"""
276
		entry = {}
276
		entry = {}
277
		entry['name'] = component_id
277
		entry['name'] = component_id
278
		for part in COMP_PARTS:
279
			entry[part] = False
280
		# ensure a proper bool
278
		# ensure a proper bool
281
		entry['enabled'] = self.ucr.is_true('%s/%s' % (COMPONENT_BASE, component_id), False)
279
		entry['enabled'] = self.ucr.is_true('%s/%s' % (COMPONENT_BASE, component_id), False)
282
		# Most values that can be fetched unchanged
280
		# Most values that can be fetched unchanged
Lines 285-297 class ComponentManager(object): Link Here
285
			entry[attr] = self.ucr.get(regstr, '')
283
			entry[attr] = self.ucr.get(regstr, '')
286
		# Get default packages (can be named either defaultpackage or defaultpackages)
284
		# Get default packages (can be named either defaultpackage or defaultpackages)
287
		entry['defaultpackages'] = list(self.uu.get_component_defaultpackage(component_id))  # method returns a set
285
		entry['defaultpackages'] = list(self.uu.get_component_defaultpackage(component_id))  # method returns a set
288
		# Parts value (if present) must be splitted into words and added as bools.
286
		# Explicitly enable unmaintained component
289
		# For parts not contained here we have set 'False' default values.
287
		entry['unmaintained'] = self.ucr.is_true('%s/%s/unmaintained' % (COMPONENT_BASE, component_id), False)
290
		parts = self.ucr.get('%s/%s/parts' % (COMPONENT_BASE, component_id), '').split(',')
291
		for part in parts:
292
			p = part.strip()
293
			if len(p):
294
				entry[p] = True
295
		# Component status as a symbolic string
288
		# Component status as a symbolic string
296
		entry['status'] = self.uu.get_current_component_status(component_id)
289
		entry['status'] = self.uu.get_current_component_status(component_id)
297
		entry['installed'] = self.uu.is_component_defaultpackage_installed(component_id)
290
		entry['installed'] = self.uu.is_component_defaultpackage_installed(component_id)
Lines 317-323 class ComponentManager(object): Link Here
317
		app_data = {
310
		app_data = {
318
			'server' : app.get_server(),
311
			'server' : app.get_server(),
319
			'prefix' : '',
312
			'prefix' : '',
320
			'maintained' : True,
321
			'unmaintained' : False,
313
			'unmaintained' : False,
322
			'enabled' : True,
314
			'enabled' : True,
323
			'name' : app.component_id,
315
			'name' : app.component_id,
Lines 350-362 class ComponentManager(object): Link Here
350
			'object': {},
342
			'object': {},
351
		}
343
		}
352
		try:
344
		try:
353
			parts = set()
354
			name = data.pop('name')
345
			name = data.pop('name')
355
			named_component_base = '%s/%s' % (COMPONENT_BASE, name)
346
			named_component_base = '%s/%s' % (COMPONENT_BASE, name)
356
			old_parts = self.ucr.get('%s/parts' % named_component_base, '')
357
			if old_parts:
358
				for part in old_parts.split(','):
359
					parts.add(part)
360
			for key, val in data.iteritems():
347
			for key, val in data.iteritems():
361
				if val is None:
348
				if val is None:
362
					# was not given, so dont update
349
					# was not given, so dont update
Lines 365-376 class ComponentManager(object): Link Here
365
					super_ucr.set_registry_var('%s/%s' % (named_component_base, key), val)
352
					super_ucr.set_registry_var('%s/%s' % (named_component_base, key), val)
366
				elif key == 'enabled':
353
				elif key == 'enabled':
367
					super_ucr.set_registry_var(named_component_base, val)
354
					super_ucr.set_registry_var(named_component_base, val)
368
				elif key in COMP_PARTS:
369
					if val:
370
						parts.add(key)
371
					else:
372
						parts.discard(key)
373
			super_ucr.set_registry_var('%s/parts' % named_component_base, ','.join(sorted(parts)))
374
		except Exception as e:
355
		except Exception as e:
375
			result['status'] = PUT_PROCESSING_ERROR
356
			result['status'] = PUT_PROCESSING_ERROR
376
			result['message'] = "Parameter error: %s" % str(e)
357
			result['message'] = "Parameter error: %s" % str(e)
Lines 400-408 class ComponentManager(object): Link Here
400
381
401
	def _remove(self, component_id, super_ucr):
382
	def _remove(self, component_id, super_ucr):
402
		named_component_base = '%s/%s' % (COMPONENT_BASE, component_id)
383
		named_component_base = '%s/%s' % (COMPONENT_BASE, component_id)
403
		for var in COMP_PARAMS + ['parts']:
384
		for var in COMP_PARAMS:
404
			# COMP_PARTS (maintained,unmaintained) are special
405
			# '' deletes this variable
406
			super_ucr.set_registry_var('%s/%s' % (named_component_base, var), '')
385
			super_ucr.set_registry_var('%s/%s' % (named_component_base, var), '')
407
386
408
		super_ucr.set_registry_var(named_component_base, '')
387
		super_ucr.set_registry_var(named_component_base, '')
(-)a/branches/ucs-3.1/ucs/test/ucs-test/tests/09_updater/31maintained (+2 lines)
Lines 4-9 Link Here
4
##  1. setup local repository with maintained and unmaintained
4
##  1. setup local repository with maintained and unmaintained
5
##  2. check if enabling maintained works
5
##  2. check if enabling maintained works
6
## roles-not: [basesystem]
6
## roles-not: [basesystem]
7
## versions:
8
##  3.1-1: skip
7
## tags: [basic]
9
## tags: [basic]
8
## packages:
10
## packages:
9
##  - apache2 | apache2-mpm-prefork
11
##  - apache2 | apache2-mpm-prefork
(-)a/branches/ucs-3.1/ucs/test/ucs-test/tests/09_updater/40component-unmaintained (+2 lines)
Lines 4-9 Link Here
4
##  1. setup local repository for maintained and unmaintained component
4
##  1. setup local repository for maintained and unmaintained component
5
##  2. check if all packages are installable
5
##  2. check if all packages are installable
6
## roles-not: [basesystem]
6
## roles-not: [basesystem]
7
## versions:
8
##  3.1-1: skip
7
## tags: [basic]
9
## tags: [basic]
8
## packages:
10
## packages:
9
##  - apache2 | apache2-mpm-prefork
11
##  - apache2 | apache2-mpm-prefork

Return to bug 30261