Univention Bugzilla – Attachment 5774 Details for
Bug 33548
App Center needs to use the target version during release upgrade
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Parse updater.status file to get next_version.
33548_umc-app-next-version.diff (text/plain), 1.56 KB, created by
Philipp Hahn
on 2014-02-04 19:16:48 CET
(
hide
)
Description:
Parse updater.status file to get next_version.
Filename:
MIME Type:
Creator:
Philipp Hahn
Created:
2014-02-04 19:16:48 CET
Size:
1.56 KB
patch
obsolete
>diff --git a/branches/ucs-3.2/ucs-3.2-0/management/univention-management-console-module-appcenter/umc/python/appcenter/app_center.py b/branches/ucs-3.2/ucs-3.2-0/management/univention-management-console-module-appcenter/umc/python/appcenter/app_center.py >index ed0eb78..cc47414 100644 >--- a/branches/ucs-3.2/ucs-3.2-0/management/univention-management-console-module-appcenter/umc/python/appcenter/app_center.py >+++ b/branches/ucs-3.2/ucs-3.2-0/management/univention-management-console-module-appcenter/umc/python/appcenter/app_center.py >@@ -462,7 +462,7 @@ class Application(object): > def get_metainf_url(cls): > # during a release upgrade, find ini files > # of the new release >- version = ucr.get('version/version/target') >+ version = cls._get_next_version() > if version is None: > version = ucr.get('version/version', '') > return '%s/meta-inf/%s' % ( >@@ -471,6 +471,23 @@ class Application(object): > ) > > @classmethod >+ def _get_next_version(cls): >+ still_running = False >+ version = None >+ try: >+ with open('/var/lib/univention-updater/univention-updater.status', 'r') as status: >+ for line in status: >+ line = line.strip() >+ key, value = line.split("=", 1) >+ if key == 'status': >+ still_running = value == 'RUNNING' >+ elif key == 'next_version': >+ version = value.split('-')[0] >+ except (IOError, ValueError) as ex: >+ MODULE.warn('Could no parse update.status: %s' % (ex,)) >+ return version if still_running else None >+ >+ @classmethod > def find(cls, application_id): > for application in cls.all(): > if application.id == application_id:
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 33548
: 5774