univention.updater.scripts package

Submodules

univention.updater.scripts.actualize module

class univention.updater.scripts.actualize.Tee(files=[], stdout=True, filter=None)[source]

Bases: object

Writes the given string to several files at once. Could by used with the print statement

call(command, **kwargs)[source]
Return type

int

univention.updater.scripts.actualize.getUpdate()[source]

Small function waiting for apt lockfile to vanish then starts apt-get update

Return type

None

univention.updater.scripts.actualize.check(configRegistry, dist_upgrade=False)[source]

Just probe if there are packages to add or remove

Parameters

dist_upgrade (bool) – Perform distribution upgrade instead of package updates.

Return type

bool

Returns

True if there are package changes.

univention.updater.scripts.actualize.getPackageList(configRegistry, job)[source]

Get a list of packages to remove or add, depending on the value of job.

Parameters
  • configRegistry (ConfigRegistry) – UCR instance.

  • job (Literal[‘add’, ‘remove’]) – add or remove.

Return type

List[str]

Returns

List of package names.

univention.updater.scripts.actualize.parse_args()[source]
Return type

Namespace

univention.updater.scripts.actualize.run(opt)[source]
Return type

int

univention.updater.scripts.actualize.update_ucr_updatestatus()[source]
Return type

None

univention.updater.scripts.actualize.check_failed()[source]
Return type

None

univention.updater.scripts.actualize.remove_temp()[source]
Return type

None

univention.updater.scripts.actualize.main()[source]
Return type

NoReturn

univention.updater.scripts.kernel module

Prune no longer required Linux kernel packages.

univention.updater.scripts.kernel.main()[source]
Return type

None

univention.updater.scripts.kernel.parse_args(argv=None)[source]
Return type

Namespace

univention.updater.scripts.kernel.prune(opt)[source]
Return type

None

univention.updater.scripts.list_installed_unmaintained_packages module

This script lists all currently installed packages that are not maintained by Univention.

univention.updater.scripts.list_installed_unmaintained_packages.main()[source]
Return type

int

univention.updater.scripts.list_installed_unmaintained_packages.parse_args()[source]
Return type

Namespace

univention.updater.scripts.list_installed_unmaintained_packages.get_unmaintained_packages(maintained)[source]
Return type

Set[str]

univention.updater.scripts.list_installed_unmaintained_packages.get_installed_packages()[source]
Return type

Tuple[Set[str], Set[str]]

univention.updater.scripts.list_installed_unmaintained_packages.get_maintained_packages(maintained)[source]
Return type

Set[str]

univention.updater.scripts.list_installed_unmaintained_packages.print_packages(packages)[source]
Return type

None

univention.updater.scripts.list_installed_unmaintained_packages.print_unmaintained_packages(packages)[source]
Return type

None

univention.updater.scripts.list_installed_unmaintained_packages.print_wrapped(text)[source]
Return type

None

univention.updater.scripts.list_installed_unmaintained_packages.get_columns()[source]
Return type

int

univention.updater.scripts.list_installed_unmaintained_packages.print_all_maintained()[source]

univention.updater.scripts.policy_maintenance module

univention.updater.scripts.policy_maintenance.write_cron_job(configRegistry, cron, updateto, reboot, try_release_update)[source]
Return type

None

univention.updater.scripts.policy_maintenance.one(results, key)[source]
Return type

str

univention.updater.scripts.policy_maintenance.main()[source]
Return type

None

univention.updater.scripts.policy_repo_server module

univention.updater.scripts.policy_repo_server.query_policy(ldap_hostdn)[source]

Retrieve updateServer and version from policy.

Return type

Tuple[str, str]

univention.updater.scripts.policy_repo_server.one(results, key)[source]
Return type

str

univention.updater.scripts.policy_repo_server.main()[source]

Set repository server.

Return type

None

univention.updater.scripts.policy_repo_sync module

univention.updater.scripts.policy_repo_sync.write_cron_job(cron)[source]
Return type

None

univention.updater.scripts.policy_repo_sync.one(results, key)[source]
Return type

str

univention.updater.scripts.policy_repo_sync.main()[source]
Return type

None

univention.updater.scripts.repo_create module

Creates a local repository.

univention.updater.scripts.repo_create.check_preconditions(options)[source]

Check for already existing mirror and for debmirror package

Return type

None

univention.updater.scripts.repo_create.prepare(options)[source]

Set local/repository and create directory structure

Return type

None

univention.updater.scripts.repo_create.parse_args()[source]
Return type

Namespace

univention.updater.scripts.repo_create.main()[source]
Return type

None

univention.updater.scripts.repo_update module

univention.updater.scripts.statistics module

univention.updater.scripts.statistics.encode_number(number, significant_digits=3)[source]
Return type

str

univention.updater.scripts.statistics.encode_users(users)[source]
Return type

str

univention.updater.scripts.statistics.encode_role(role)[source]
Return type

str

univention.updater.scripts.statistics.encode_additional_info(users=None, role=None)[source]
Return type

str

univention.updater.scripts.statistics.getReadonlyAdminConnection()[source]
Return type

Tuple[access, position]

univention.updater.scripts.statistics.main()[source]
Return type

None

univention.updater.scripts.updater module

Tool for updating local system

exception univention.updater.scripts.updater.UpdateError(msg, errorsource)[source]

Bases: Exception

Exception to signal errors on update.

Parameters
  • msg – Human readable message.

  • errorsource – One of ‘SETTINGS’, ‘PREPARATION’, ‘PREUP’, ‘UPDATE’, ‘POSTUP’

univention.updater.scripts.updater.log(str)[source]

Log message to LOGNAME.

univention.updater.scripts.updater.dprint(str)[source]

Print message to stdout and LOGNAME.

univention.updater.scripts.updater.update_status(**kwargs)[source]

update updater_status and write status to disk

Keys: - current_version ==> UCS_Version ==> 2.3-1 - next_version ==> UCS_Version ==> 2.3-2 - target_version ==> UCS_Version ==> 2.4-0 - type ==> (LOCAL|NET) - status ==> (RUNNING|FAILED|DONE) - phase ==> (PREPARATION|PREUP|UPDATE|POSTUP) ==> only valid if status=RUNNING - errorsource ==> (SETTINGS|PREPARATION|PREUP|UPDATE|POSTUP)

univention.updater.scripts.updater.get_status()[source]

Read Updater status from file.

Returns

Dictionary with status

See also

update_status()

univention.updater.scripts.updater.remove_temporary_sources_list()[source]

Add the temporary sources.list.

univention.updater.scripts.updater.add_temporary_sources_list(temporary_sources_list)[source]

Add line to a temporary sources.list.

univention.updater.scripts.updater.update_available(opt, ucr)[source]

Checks if there is an update available. Returns the next version, or None if up-to-date, or throws an UpdateError if the next version can not be identified.

univention.updater.scripts.updater.update_local(opt, ucr)[source]
univention.updater.scripts.updater.update_net(opt, ucr)[source]
univention.updater.scripts.updater.update_ucr_updatestatus()[source]
univention.updater.scripts.updater.call_local(opt)[source]

Call updater in “local” mode.

univention.updater.scripts.updater.parse_args(args=None)[source]

Parse command line arguments.

univention.updater.scripts.updater.setup_logging(opt, ucr)[source]
univention.updater.scripts.updater.check(opt, ucr)[source]

Return pending update status.

univention.updater.scripts.updater.find(opt, ucr)[source]
univention.updater.scripts.updater.run(opt, ucr, updater, nextversion)[source]
univention.updater.scripts.updater.main()[source]

univention.updater.scripts.upgrade module

Install UCS release and errata updates.

univention.updater.scripts.upgrade.dprint(silent, msg, newline=True, debug=False)[source]

Print debug output.

Return type

None

univention.updater.scripts.upgrade.update_status(**kwargs)[source]

update updater_status and write status to disk

Keys: - current_version ==> UCS_Version ==> 2.3-1 - next_version ==> UCS_Version ==> 2.3-2 - updatetype ==> (LOCAL|NET) - status ==> (RUNNING|FAILED|DONE) - errorsource ==> (SETTINGS|PREPARATION|PREUP|UPDATE|POSTUP)

Return type

None

univention.updater.scripts.upgrade.readcontinue(msg)[source]

Print message and read yes/no/abort answer.

Return type

bool

univention.updater.scripts.upgrade.performUpdate(options, checkForUpdates=False, silent=False)[source]
Return type

Optional[bool]

univention.updater.scripts.upgrade.do_release_update(options, checkForUpdates, silent)[source]
Return type

bool

univention.updater.scripts.upgrade.do_package_updates(options, checkForUpdates, silent)[source]
Return type

bool

univention.updater.scripts.upgrade.do_app_updates(options, checkForUpdates, silent)[source]
Return type

Optional[bool]

univention.updater.scripts.upgrade.parse_args(argv=None)[source]
Return type

Namespace

univention.updater.scripts.upgrade.main()[source]
Return type

None

univention.updater.scripts.upgrade.update_local_repository(options)[source]
Return type

None

univention.updater.scripts.upgrade.do_update(options)[source]
Return type

None

univention.updater.scripts.upgrade.do_exec()[source]
Return type

NoReturn