View | Details | Raw Unified | Return to bug 27745
Collapse All | Expand All

(-)a/branches/ucs-3.0/ucs/base/univention-updater/modules/univention/updater/mirror.py (-8 / +4 lines)
 Lines 48-61   class UniventionMirror( UniventionUpdater ): Link Here 
48
		UniventionUpdater.__init__(self, check_access)
48
		UniventionUpdater.__init__(self, check_access)
49
		self.repository_path =  self.configRegistry.get( 'repository/mirror/basepath', '/var/lib/univention-repository' )
49
		self.repository_path =  self.configRegistry.get( 'repository/mirror/basepath', '/var/lib/univention-repository' )
50
50
51
		if self.configRegistry.has_key( 'repository/mirror/version/end' ):
51
		version_end = self.configRegistry.get('repository/mirror/version/end') or self.current_version
52
			self.version_end = UCS_Version( self.configRegistry.get( 'repository/mirror/version/end' ) )
52
		self.version_end = UCS_Version(version_end)
53
		else:
53
		version_start = self.configRegistry.get('repository/mirror/version/start') or (self.version_major, 0, 0)
54
			self.version_end = UCS_Version( ( self.version_major, self.version_minor, self.patchlevel ) )
54
		self.version_start = UCS_Version(version_start)
55
		if self.configRegistry.has_key( 'repository/mirror/version/start' ):
56
			self.version_start = UCS_Version( self.configRegistry.get( 'repository/mirror/version/start' ) )
57
		else:
58
			self.version_start = UCS_Version( ( self.version_major, 0, 0 ) )
59
		# set architectures to mirror
55
		# set architectures to mirror
60
		archs = self.configRegistry.get( 'repository/mirror/architectures', '' )
56
		archs = self.configRegistry.get( 'repository/mirror/architectures', '' )
61
		if archs:
57
		if archs:
(-)a/branches/ucs-3.0/ucs/base/univention-updater/python/univention-errata-components-update (-1 / +1 lines)
 Lines 231-237   if __name__ == '__main__': Link Here 
231
			if configRegistry.is_true('local/repository', False):
231
			if configRegistry.is_true('local/repository', False):
232
				local_repository = True
232
				local_repository = True
233
				# if there is no _new_ repository server -> exit
233
				# if there is no _new_ repository server -> exit
234
				if configRegistry.has_key( 'repository/local/old' ):
234
				if configRegistry.get('repository/local/old'):
235
					update_status( status='FAILED', errorsource='SETTINGS' )
235
					update_status( status='FAILED', errorsource='SETTINGS' )
236
					dprint( 'The repository server directory structure has been changed with UCS 2.2-0. The local repository still has the old structure and can not be used for updates anymore. Please migrate the repository to the new directory structure or disable the local repository by setting the UCR variable local/repository to "no". Information on how to migrate the repository can be found in the release notes for UCS 2.2-0', [fp_debug,sys.stderr] )
236
					dprint( 'The repository server directory structure has been changed with UCS 2.2-0. The local repository still has the old structure and can not be used for updates anymore. Please migrate the repository to the new directory structure or disable the local repository by setting the UCR variable local/repository to "no". Information on how to migrate the repository can be found in the release notes for UCS 2.2-0', [fp_debug,sys.stderr] )
237
					sys.exit( 1 )
237
					sys.exit( 1 )
(-)a/branches/ucs-3.0/ucs/base/univention-updater/python/univention-errata-update (-1 / +1 lines)
 Lines 205-211   if __name__ == '__main__': Link Here 
205
			if configRegistry.is_true('local/repository', False):
205
			if configRegistry.is_true('local/repository', False):
206
				local_repository = True
206
				local_repository = True
207
				# if there is no _new_ repository server -> exit
207
				# if there is no _new_ repository server -> exit
208
				if configRegistry.has_key( 'repository/local/old' ):
208
				if configRegistry.get('repository/local/old'):
209
					update_status( status='FAILED', errorsource='SETTINGS' )
209
					update_status( status='FAILED', errorsource='SETTINGS' )
210
					dprint( 'The repository server directory structure has been changed with UCS 2.2-0. The local repository still has the old structure and can not be used for updates anymore. Please migrate the repository to the new directory structure or disable the local repository by setting the UCR variable local/repository to "no". Information on how to migrate the repository can be found in the release notes for UCS 2.2-0', [fp_debug,sys.stderr] )
210
					dprint( 'The repository server directory structure has been changed with UCS 2.2-0. The local repository still has the old structure and can not be used for updates anymore. Please migrate the repository to the new directory structure or disable the local repository by setting the UCR variable local/repository to "no". Information on how to migrate the repository can be found in the release notes for UCS 2.2-0', [fp_debug,sys.stderr] )
211
					sys.exit( 1 )
211
					sys.exit( 1 )
(-)a/branches/ucs-3.0/ucs/base/univention-updater/python/univention-repository-create (-1 / +1 lines)
 Lines 251-257   if __name__ == '__main__': Link Here 
251
		ucr.handler_set( [ 'repository/online/server=%s' % fqdn ] )
251
		ucr.handler_set( [ 'repository/online/server=%s' % fqdn ] )
252
252
253
		# unset UCR variable marking old repository
253
		# unset UCR variable marking old repository
254
		if configRegistry.has_key( 'repository/local/old' ):
254
		if 'repository/local/old' in configRegistry:
255
			ucr.handler_unset( 'repository/local/old' )
255
			ucr.handler_unset( 'repository/local/old' )
256
256
257
		# set start version for synchronsation of repository
257
		# set start version for synchronsation of repository
(-)a/branches/ucs-3.0/ucs/base/univention-updater/python/univention-repository-merge (-3 / +4 lines)
 Lines 84-92   def walking(arg, dirname, names): Link Here 
84
					arch = ' '.join(line.split(' ', 1)[1:])
84
					arch = ' '.join(line.split(' ', 1)[1:])
85
85
86
			key = (package, arch)
86
			key = (package, arch)
87
			if l_package.has_key(key):
87
			record = l_package.get(key)
88
				if compare(version, l_package[key][1]):
88
			if record:
89
					p_remove.append(l_package[key][0])
89
				if compare(version, record[1]):
90
					p_remove.append(record[0])
90
					l_package[key]=[file, version, arg]
91
					l_package[key]=[file, version, arg]
91
				else:
92
				else:
92
					p_remove.append(file)
93
					p_remove.append(file)
(-)a/branches/ucs-3.0/ucs/base/univention-updater/python/univention-repository-migrate (-2 / +2 lines)
 Lines 217-224   if __name__ == '__main__': Link Here 
217
		migrate_repository( options )
217
		migrate_repository( options )
218
218
219
		# unset UCR variable makring old repository
219
		# unset UCR variable makring old repository
220
		if configRegistry.has_key( 'repository/local/old' ):
220
		if 'repository/local/old' in configRegistry:
221
			os.system('/usr/sbin/univention-config-registry unset repository/local/old')
221
			ucr.handler_unset( 'repository/local/old' )
222
	finally:
222
	finally:
223
		if not univention.updater.tools.updater_lock_release(lock):
223
		if not univention.updater.tools.updater_lock_release(lock):
224
			print 'WARNING: updater-lock already released!'
224
			print 'WARNING: updater-lock already released!'
(-)a/branches/ucs-3.0/ucs/base/univention-updater/python/univention-repository-update (-1 / +1 lines)
 Lines 259-265   if __name__ == '__main__': Link Here 
259
		sys.exit( 1 )
259
		sys.exit( 1 )
260
260
261
	# if there is no _new_ repository server -> exit
261
	# if there is no _new_ repository server -> exit
262
	if configRegistry.has_key( 'repository/local/old' ):
262
	if configRegistry.get('repository/local/old'):
263
		print >> options.teefile, 'The repository server directory structure has been changed with UCS 2.2-0. The local repository still has the old structure and can not be used for updates anymore. Please migrate the repository to the new directory structure or disable the local repository by setting the UCR variable local/repository to "no". Information on how to migrate the repository can be found in the release notes for UCS 2.2-0'
263
		print >> options.teefile, 'The repository server directory structure has been changed with UCS 2.2-0. The local repository still has the old structure and can not be used for updates anymore. Please migrate the repository to the new directory structure or disable the local repository by setting the UCR variable local/repository to "no". Information on how to migrate the repository can be found in the release notes for UCS 2.2-0'
264
		sys.exit( 1 )
264
		sys.exit( 1 )
265
265
(-)a/branches/ucs-3.0/ucs/base/univention-updater/python/univention-updater (-1 / +1 lines)
 Lines 410-416   def main(): Link Here 
410
	architecture=os.popen('dpkg --print-architecture 2>/dev/null').readline()[:-1]
410
	architecture=os.popen('dpkg --print-architecture 2>/dev/null').readline()[:-1]
411
411
412
	# if there is no _new_ repository server -> exit
412
	# if there is no _new_ repository server -> exit
413
	if baseConfig.get( 'local/repository', '' ).lower() in ( 'yes', 'true' ) and baseConfig.has_key( 'repository/local/old' ):
413
	if baseConfig.is_true('local/repository', False) and baseConfig.get('repository/local/old'):
414
		dprint( 'The repository server directory structure has been changed with UCS 2.2-0. The local repository still has the old structure and can not be used for updates anymore. Please migrate the repository to the new directory structure or disable the local repository by setting the UCR variable local/repository to "no". Information on how to migrate the repository can be found in the release notes for UCS 2.2-0')
414
		dprint( 'The repository server directory structure has been changed with UCS 2.2-0. The local repository still has the old structure and can not be used for updates anymore. Please migrate the repository to the new directory structure or disable the local repository by setting the UCR variable local/repository to "no". Information on how to migrate the repository can be found in the release notes for UCS 2.2-0')
415
		sys.exit( 1 )
415
		sys.exit( 1 )
416
416

Return to bug 27745