--- a/branches/ucs-3.0/ucs/base/univention-updater/modules/univention/updater/mirror.py +++ a/branches/ucs-3.0/ucs/base/univention-updater/modules/univention/updater/mirror.py @@ -48,14 +48,10 @@ class UniventionMirror( UniventionUpdater ): UniventionUpdater.__init__(self, check_access) self.repository_path = self.configRegistry.get( 'repository/mirror/basepath', '/var/lib/univention-repository' ) - if self.configRegistry.has_key( 'repository/mirror/version/end' ): - self.version_end = UCS_Version( self.configRegistry.get( 'repository/mirror/version/end' ) ) - else: - self.version_end = UCS_Version( ( self.version_major, self.version_minor, self.patchlevel ) ) - if self.configRegistry.has_key( 'repository/mirror/version/start' ): - self.version_start = UCS_Version( self.configRegistry.get( 'repository/mirror/version/start' ) ) - else: - self.version_start = UCS_Version( ( self.version_major, 0, 0 ) ) + version_end = self.configRegistry.get('repository/mirror/version/end') or self.current_version + self.version_end = UCS_Version(version_end) + version_start = self.configRegistry.get('repository/mirror/version/start') or (self.version_major, 0, 0) + self.version_start = UCS_Version(version_start) # set architectures to mirror archs = self.configRegistry.get( 'repository/mirror/architectures', '' ) if archs: --- a/branches/ucs-3.0/ucs/base/univention-updater/python/univention-errata-components-update +++ a/branches/ucs-3.0/ucs/base/univention-updater/python/univention-errata-components-update @@ -231,7 +231,7 @@ if __name__ == '__main__': if configRegistry.is_true('local/repository', False): local_repository = True # if there is no _new_ repository server -> exit - if configRegistry.has_key( 'repository/local/old' ): + if configRegistry.get('repository/local/old'): update_status( status='FAILED', errorsource='SETTINGS' ) 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] ) sys.exit( 1 ) --- a/branches/ucs-3.0/ucs/base/univention-updater/python/univention-errata-update +++ a/branches/ucs-3.0/ucs/base/univention-updater/python/univention-errata-update @@ -205,7 +205,7 @@ if __name__ == '__main__': if configRegistry.is_true('local/repository', False): local_repository = True # if there is no _new_ repository server -> exit - if configRegistry.has_key( 'repository/local/old' ): + if configRegistry.get('repository/local/old'): update_status( status='FAILED', errorsource='SETTINGS' ) 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] ) sys.exit( 1 ) --- a/branches/ucs-3.0/ucs/base/univention-updater/python/univention-repository-create +++ a/branches/ucs-3.0/ucs/base/univention-updater/python/univention-repository-create @@ -251,7 +251,7 @@ if __name__ == '__main__': ucr.handler_set( [ 'repository/online/server=%s' % fqdn ] ) # unset UCR variable marking old repository - if configRegistry.has_key( 'repository/local/old' ): + if 'repository/local/old' in configRegistry: ucr.handler_unset( 'repository/local/old' ) # set start version for synchronsation of repository --- a/branches/ucs-3.0/ucs/base/univention-updater/python/univention-repository-merge +++ a/branches/ucs-3.0/ucs/base/univention-updater/python/univention-repository-merge @@ -84,9 +84,10 @@ def walking(arg, dirname, names): arch = ' '.join(line.split(' ', 1)[1:]) key = (package, arch) - if l_package.has_key(key): - if compare(version, l_package[key][1]): - p_remove.append(l_package[key][0]) + record = l_package.get(key) + if record: + if compare(version, record[1]): + p_remove.append(record[0]) l_package[key]=[file, version, arg] else: p_remove.append(file) --- a/branches/ucs-3.0/ucs/base/univention-updater/python/univention-repository-migrate +++ a/branches/ucs-3.0/ucs/base/univention-updater/python/univention-repository-migrate @@ -217,8 +217,8 @@ if __name__ == '__main__': migrate_repository( options ) # unset UCR variable makring old repository - if configRegistry.has_key( 'repository/local/old' ): - os.system('/usr/sbin/univention-config-registry unset repository/local/old') + if 'repository/local/old' in configRegistry: + ucr.handler_unset( 'repository/local/old' ) finally: if not univention.updater.tools.updater_lock_release(lock): print 'WARNING: updater-lock already released!' --- a/branches/ucs-3.0/ucs/base/univention-updater/python/univention-repository-update +++ a/branches/ucs-3.0/ucs/base/univention-updater/python/univention-repository-update @@ -259,7 +259,7 @@ if __name__ == '__main__': sys.exit( 1 ) # if there is no _new_ repository server -> exit - if configRegistry.has_key( 'repository/local/old' ): + if configRegistry.get('repository/local/old'): 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' sys.exit( 1 ) --- a/branches/ucs-3.0/ucs/base/univention-updater/python/univention-updater +++ a/branches/ucs-3.0/ucs/base/univention-updater/python/univention-updater @@ -410,7 +410,7 @@ def main(): architecture=os.popen('dpkg --print-architecture 2>/dev/null').readline()[:-1] # if there is no _new_ repository server -> exit - if baseConfig.get( 'local/repository', '' ).lower() in ( 'yes', 'true' ) and baseConfig.has_key( 'repository/local/old' ): + if baseConfig.is_true('local/repository', False) and baseConfig.get('repository/local/old'): 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') sys.exit( 1 )