Univention Bugzilla – Attachment 6821 Details for
Bug 38042
Prevent installation of apps until a certain UCS version is met
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Check version (broken patch)
errata.patch (text/plain), 17.39 KB, created by
Dirk Wiesenthal
on 2015-04-14 11:17:36 CEST
(
hide
)
Description:
Check version (broken patch)
Filename:
MIME Type:
Creator:
Dirk Wiesenthal
Created:
2015-04-14 11:17:36 CEST
Size:
17.39 KB
patch
obsolete
>Index: umc/js/appcenter/requirements.js >=================================================================== >--- umc/js/appcenter/requirements.js (Revision 59725) >+++ umc/js/appcenter/requirements.js (Arbeitskopie) >@@ -91,6 +91,20 @@ > opts.appDetailsPage.standbyDuring(opts.appDetailsPage.switchToProgressBar(), opts.appDetailsPage._progressBar); > } > }), >+ must_have_fitting_ucs_version: new Requirement({ >+ reasonDescription: function(details) { >+ return _('The application requires UCS version %(required_version)s or later.', details); >+ }, >+ solutionDescription: function() { >+ return _('The system has to be updated.'); >+ }, >+ solutionLabel: function() { >+ return _('Open Software update Module'); >+ }, >+ solution: function() { >+ topic.publish('/umc/modules/open', 'updater'); >+ } >+ }), > must_have_valid_license: new Requirement({ > reasonDescription: function() { > return _('For the installation of this application, a UCS license key with a key identification (Key ID) is required.'); >Index: umc/js/de.po >=================================================================== >--- umc/js/de.po (Revision 59725) >+++ umc/js/de.po (Arbeitskopie) >@@ -3,7 +3,7 @@ > msgstr "" > "Project-Id-Version: univention-management-console-module-appcenter\n" > "Report-Msgid-Bugs-To: \n" >-"POT-Creation-Date: 2015-04-08 16:19+0200\n" >+"POT-Creation-Date: 2015-04-13 15:53+0200\n" > "PO-Revision-Date: 2011-11-02 09:36+0100\n" > "Last-Translator: Frank Greif <fg@it25.de>\n" > "Language-Team: LANGUAGE <LL@li.org>\n" >@@ -12,7 +12,7 @@ > "Content-Type: text/plain; charset=UTF-8\n" > "Content-Transfer-Encoding: 8bit\n" > >-#: umc/js/appcenter/requirements.js:144 >+#: umc/js/appcenter/requirements.js:158 > #, python-format > msgid "" > "%(name)s cannot be installed on the current server role (%(current_role)s). " >@@ -23,7 +23,7 @@ > "installiert werden. Um die Applikation zu installieren, ist eine der " > "folgenden Serverrollen notwendig: %(allowed_roles)s" > >-#: umc/js/appcenter/requirements.js:125 >+#: umc/js/appcenter/requirements.js:139 > #, python-format > msgid "%(name)s only supports %(supported)s as architecture. %(msg)s" > msgstr "%(name)s unterstützt nur die Architektur %(supported)s. %(msg)s" >@@ -56,7 +56,7 @@ > "%d Rechner wurden aus der Auswahl ausgeschlossen, weil die Applikation eine " > "andere Serverrolle voraussetzt, als diese Rechner haben." > >-#: umc/js/appcenter/requirements.js:110 >+#: umc/js/appcenter/requirements.js:124 > #, python-format > msgid "" > "%s cannot be updated. The application is either not installed or no newer " >@@ -65,33 +65,33 @@ > "%s kann nicht aktualisiert werden. Die Applikation ist entweder nicht " > "installiert oder es existiert keine neuere Version." > >-#: umc/js/appcenter/requirements.js:176 >+#: umc/js/appcenter/requirements.js:190 > #, python-format > msgid "%s conflicts with the following applications." > msgstr "" > "%s kann nicht gleichzeitig mit den folgenden Applikationen installiert sein." > >-#: umc/js/appcenter/requirements.js:166 >+#: umc/js/appcenter/requirements.js:180 > #, python-format > msgid "%s conflicts with the following packages." > msgstr "%s kann nicht gleichzeitig mit den folgenden Paketen installiert sein." > >-#: umc/js/appcenter/requirements.js:115 >+#: umc/js/appcenter/requirements.js:129 > #, python-format > msgid "%s is already installed." > msgstr "%s ist bereits installiert." > >-#: umc/js/appcenter/requirements.js:193 >+#: umc/js/appcenter/requirements.js:207 > #, python-format > msgid "%s is required for the following applications to work." > msgstr "%s wird benötigt, damit die folgenden Applikationen funktionieren." > >-#: umc/js/appcenter/requirements.js:149 >+#: umc/js/appcenter/requirements.js:163 > #, python-format > msgid "%s requires the following applications." > msgstr "%s benötigt die folgenden Applikationen." > >-#: umc/js/appcenter/requirements.js:120 >+#: umc/js/appcenter/requirements.js:134 > #, python-format > msgid "%s was discontinued and may not be installed anymore." > msgstr "%s ist abgekündigt und kann nicht mehr installiert werden." >@@ -137,7 +137,7 @@ > msgid "Accept license" > msgstr "Lizenz akzeptieren" > >-#: umc/js/appcenter/requirements.js:102 >+#: umc/js/appcenter/requirements.js:116 > msgid "Activate UCS now" > msgstr "UCS jetzt aktivieren" > >@@ -188,7 +188,7 @@ > > #: umc/js/appcenter/AppConfigDialog.js:54 > #: umc/js/appcenter/AppChooseHostDialog.js:49 >-#: umc/js/appcenter/AppDetailsDialog.js:55 >+#: umc/js/appcenter/AppDetailsDialog.js:56 > #: umc/js/appcenter/AppDetailsPage.js:61 umc/js/appcenter/AppCenterPage.js:60 > msgid "App management" > msgstr "App-Verwaltung" >@@ -205,7 +205,7 @@ > msgid "Are you sure you want to delete the following components: [{ids}]" > msgstr "Möchten Sie die folgenden Komponenten wirklich löschen: [{ids}]" > >-#: umc/js/appcenter/AppDetailsDialog.js:193 >+#: umc/js/appcenter/AppDetailsDialog.js:194 > msgid "Attention!" > msgstr "Achtung!" > >@@ -237,7 +237,7 @@ > msgid "Basic settings" > msgstr "Allgemeine Einstellungen" > >-#: umc/js/appcenter/AppDetailsDialog.js:193 >+#: umc/js/appcenter/AppDetailsDialog.js:194 > msgid "" > "Be sure to execute the following command as root on all of these backup " > "servers <em>after</em> installing the application." >@@ -254,8 +254,8 @@ > #: umc/js/appcenter/AppChooseHostDialog.js:71 > #: umc/js/appcenter/SettingsPage.js:314 umc/js/appcenter/PackagesPage.js:420 > #: umc/js/appcenter/PackagesPage.js:429 >-#: umc/js/appcenter/AppDetailsDialog.js:75 >-#: umc/js/appcenter/AppDetailsDialog.js:82 >+#: umc/js/appcenter/AppDetailsDialog.js:76 >+#: umc/js/appcenter/AppDetailsDialog.js:83 > #: umc/js/appcenter/AppDetailsPage.js:450 > msgid "Cancel" > msgstr "Abbrechen" >@@ -290,7 +290,8 @@ > msgstr "Konfiguration" > > #: umc/js/appcenter/AppConfigDialog.js:57 >-#: umc/js/appcenter/AppDetailsDialog.js:116 >+#: umc/js/appcenter/AppDetailsDialog.js:117 >+#, python-format > msgid "Configure %s" > msgstr "%s konfigurieren" > >@@ -310,11 +311,11 @@ > msgid "Contact" > msgstr "Kontakt" > >-#: umc/js/appcenter/AppDetailsDialog.js:165 >+#: umc/js/appcenter/AppDetailsDialog.js:166 > msgid "Continuation is not possible" > msgstr "Fortfahren nicht möglich" > >-#: umc/js/appcenter/AppDetailsDialog.js:169 >+#: umc/js/appcenter/AppDetailsDialog.js:170 > msgid "Continuation is not recommended" > msgstr "Fortfahren nicht empfohlen" > >@@ -414,7 +415,7 @@ > msgid "Extended software management" > msgstr "Erweiterte Software-Verwaltung" > >-#: umc/js/appcenter/requirements.js:96 >+#: umc/js/appcenter/requirements.js:110 > msgid "" > "For the installation of this application, a UCS license key with a key " > "identification (Key ID) is required." >@@ -487,7 +488,7 @@ > msgid "Install the component's default package(s)" > msgstr "Die Standardpakete dieser Komponente installieren" > >-#: umc/js/appcenter/requirements.js:154 >+#: umc/js/appcenter/requirements.js:168 > msgid "Install them first." > msgstr "Installieren Sie diese zuerst." > >@@ -563,7 +564,7 @@ > msgid "No" > msgstr "Nein" > >-#: umc/js/appcenter/AppDetailsDialog.js:220 >+#: umc/js/appcenter/AppDetailsDialog.js:221 > msgid "No changes" > msgstr "Keine Ãnderungen" > >@@ -611,17 +612,21 @@ > msgid "Open" > msgstr "Ãffnen" > >-#: umc/js/appcenter/requirements.js:157 umc/js/appcenter/requirements.js:184 >-#: umc/js/appcenter/requirements.js:201 >+#: umc/js/appcenter/requirements.js:171 umc/js/appcenter/requirements.js:198 >+#: umc/js/appcenter/requirements.js:215 > #, python-format > msgid "Open %s" > msgstr "%s öffnen" > >-#: umc/js/appcenter/requirements.js:136 >+#: umc/js/appcenter/requirements.js:150 > msgid "Open Domain Join Module" > msgstr "Domänenbeitritt-Modul öffnen" > >-#: umc/js/appcenter/requirements.js:217 >+#: umc/js/appcenter/requirements.js:102 >+msgid "Open Software update Module" >+msgstr "Modul \"Software-Aktualisierung\" öffnen" >+ >+#: umc/js/appcenter/requirements.js:231 > msgid "Open the documentation" > msgstr "Dokumentation öffnen" > >@@ -705,7 +710,7 @@ > "bei der Installation von Applikationen kommen." > > #: umc/js/appcenter/SettingsPage.js:55 >-#: umc/js/appcenter/AppDetailsDialog.js:178 >+#: umc/js/appcenter/AppDetailsDialog.js:179 > msgid "Repository Settings" > msgstr "Repository-Einstellungen" > >@@ -762,7 +767,7 @@ > msgid "Show this message again" > msgstr "Diese Nachricht später wieder zeigen" > >-#: umc/js/appcenter/AppDetailsDialog.js:230 >+#: umc/js/appcenter/AppDetailsDialog.js:231 > #, python-format > msgid "" > "Software changes on %(host)s (installed/upgraded: %(installed)s, removed: " >@@ -772,7 +777,7 @@ > "entfernt: %(removed)s, fehlerhaft: %(erroneous)s%(incompatible)s)" > > #: umc/js/appcenter/AppConfigDialog.js:116 >-#: umc/js/appcenter/AppDetailsDialog.js:110 >+#: umc/js/appcenter/AppDetailsDialog.js:111 > msgid "Start the application" > msgstr "Applikationen starten" > >@@ -824,7 +829,7 @@ > msgstr "" > "Die Applikation wird automatisch beim Hochfahren des Rechners gestartet" > >-#: umc/js/appcenter/requirements.js:225 >+#: umc/js/appcenter/requirements.js:239 > #, python-format > msgid "" > "The application requires %(minimum)d MB of free RAM but only %(current)d MB " >@@ -833,7 +838,12 @@ > "Die Anwendung erfordert %(minimum)d MB freien Arbeitsspeicher, es sind aber " > "nur %(current)d MB verfügbar." > >-#: umc/js/appcenter/requirements.js:211 >+#: umc/js/appcenter/requirements.js:96 >+#, python-format >+msgid "The application requires UCS version %(required_version)s or later." >+msgstr "Die Applikation erfordert mindestens UCS-Version %(required_version)s." >+ >+#: umc/js/appcenter/requirements.js:225 > msgid "" > "The application requires the password service to be set up on the Active " > "Directory domain controller server." >@@ -854,7 +864,7 @@ > "In der Beschreibung jeder Applikation befindet sich in diesen Fällen ein " > "entsprechender Hinweis." > >-#: umc/js/appcenter/AppDetailsDialog.js:187 >+#: umc/js/appcenter/AppDetailsDialog.js:188 > msgid "" > "The following hosts cannot be reached or do not have access to the App " > "Center server:" >@@ -863,12 +873,12 @@ > "Zugriff auf den App Center-Server:" > > #: umc/js/appcenter/PackagesPage.js:401 >-#: umc/js/appcenter/AppDetailsDialog.js:216 >+#: umc/js/appcenter/AppDetailsDialog.js:217 > msgid "The following packages will be installed or upgraded:" > msgstr "Folgende Pakete werden installiert bzw. aktualisiert:" > > #: umc/js/appcenter/PackagesPage.js:405 >-#: umc/js/appcenter/AppDetailsDialog.js:217 >+#: umc/js/appcenter/AppDetailsDialog.js:218 > msgid "The following packages will be removed:" > msgstr "Folgende Pakete werden deinstalliert:" > >@@ -881,12 +891,12 @@ > "Der Kauf von Lizenzen, Maintenance oder Support ist nicht Teil von " > "Univention App Center." > >-#: umc/js/appcenter/AppDetailsDialog.js:187 >+#: umc/js/appcenter/AppDetailsDialog.js:188 > msgid "The server tried to connect to the involved systems." > msgstr "" > "Der Server hat versucht, sich mit den beteiligten Systemen zu verbinden." > >-#: umc/js/appcenter/requirements.js:214 >+#: umc/js/appcenter/requirements.js:228 > msgid "" > "The steps how to install the service on that machine are described in the " > "online documentation." >@@ -894,14 +904,18 @@ > "Die notwendigen Schritte, um den Dienst auf jener Maschine zu installieren, " > "sind in der Online-Dokumentation beschrieben." > >-#: umc/js/appcenter/requirements.js:133 >+#: umc/js/appcenter/requirements.js:99 >+msgid "The system has to be updated." >+msgstr "Das System muss aktualisiert werden." >+ >+#: umc/js/appcenter/requirements.js:147 > msgid "" > "The system has to join a domain before the application can be installed!" > msgstr "" > "Das System muss einer Domäne beigetreten sein, bevor die Applikation " > "installiert werden kann!" > >-#: umc/js/appcenter/AppDetailsDialog.js:223 >+#: umc/js/appcenter/AppDetailsDialog.js:224 > msgid "" > "The version of the remote App Center is <strong>incompatible</strong> with " > "the local one. Please update your hosts." >@@ -909,7 +923,7 @@ > "Die Version des entfernten App Center ist zu der des lokalen " > "<strong>inkompatibel</strong>. Bitte aktualisieren Sie Ihre Hosts." > >-#: umc/js/appcenter/AppDetailsDialog.js:180 >+#: umc/js/appcenter/AppDetailsDialog.js:181 > #, python-format > msgid "" > "These changes contain <strong>all package upgrades available</strong> and " >@@ -923,8 +937,8 @@ > "entsprechenden Komponenten im Tab \"%s\" des App Centers zeitweise " > "deaktiviert werden." > >-#: umc/js/appcenter/requirements.js:130 >-#: umc/js/appcenter/AppDetailsDialog.js:193 >+#: umc/js/appcenter/requirements.js:144 >+#: umc/js/appcenter/AppDetailsDialog.js:194 > msgid "This application requires an extension of the LDAP schema." > msgstr "Diese Applikation erfordert eine Erweiterung des LDAP Schemas." > >@@ -961,7 +975,7 @@ > "Kenntnis." > > #: umc/js/appcenter/PackagesPage.js:409 >-#: umc/js/appcenter/AppDetailsDialog.js:218 >+#: umc/js/appcenter/AppDetailsDialog.js:219 > msgid "" > "This operation causes problems in the following packages that cannot be " > "resolved:" >@@ -1001,8 +1015,8 @@ > msgid "Uninstall Information" > msgstr "Informationen zur Deinstallation" > >-#: umc/js/appcenter/requirements.js:171 umc/js/appcenter/requirements.js:181 >-#: umc/js/appcenter/requirements.js:198 >+#: umc/js/appcenter/requirements.js:185 umc/js/appcenter/requirements.js:195 >+#: umc/js/appcenter/requirements.js:212 > msgid "Uninstall them first." > msgstr "Deinstallieren Sie diese zuerst." > >@@ -1035,10 +1049,10 @@ > "gespeichert und nicht an Dritte weiter gegeben wird." > > #: umc/js/appcenter/SettingsPage.js:251 >-#: umc/js/appcenter/AppDetailsDialog.js:205 >-#: umc/js/appcenter/AppDetailsDialog.js:225 >+#: umc/js/appcenter/AppDetailsDialog.js:206 > #: umc/js/appcenter/AppDetailsDialog.js:226 > #: umc/js/appcenter/AppDetailsDialog.js:227 >+#: umc/js/appcenter/AppDetailsDialog.js:228 > msgid "Unknown" > msgstr "Unbekannt" > >@@ -1127,7 +1141,7 @@ > "Eine neue Lizenz muss angefordert und installiert werden, um das Univention " > "App Center zu nutzen." > >-#: umc/js/appcenter/requirements.js:99 >+#: umc/js/appcenter/requirements.js:113 > msgid "" > "You receive such a license key within a couple of minutes via email after a " > "free activation." >@@ -1139,7 +1153,7 @@ > msgid "You're editing the details of the component definition." > msgstr "Sie bearbeiten die Details der Komponenten-Definition." > >-#: umc/js/appcenter/requirements.js:220 >+#: umc/js/appcenter/requirements.js:234 > msgid "https://docs.univention.de/manual.html#ad-connector:password-dienst" > msgstr "https://docs.univention.de/handbuch.html#ad-connector:password-dienst" > >@@ -1147,7 +1161,7 @@ > msgid "https://www.univention.com/products/univention-app-center/vote-for-app/" > msgstr "https://www.univention.de/produkte/univention-app-center/vote-for-app/" > >-#: umc/js/appcenter/AppDetailsDialog.js:228 >+#: umc/js/appcenter/AppDetailsDialog.js:229 > msgid "incompatible" > msgstr "inkompatibel" > >@@ -1160,7 +1174,7 @@ > msgid "this computer" > msgstr "dieser Rechner" > >-#: umc/js/appcenter/AppDetailsDialog.js:230 >+#: umc/js/appcenter/AppDetailsDialog.js:231 > #: umc/js/appcenter/AppDetailsPage.js:563 > msgid "this host" > msgstr "diesem Rechner" >Index: umc/python/appcenter/de.po >=================================================================== >--- umc/python/appcenter/de.po (Revision 59725) >+++ umc/python/appcenter/de.po (Arbeitskopie) >@@ -3,7 +3,7 @@ > msgstr "" > "Project-Id-Version: univention-management-console-module-appcenter\n" > "Report-Msgid-Bugs-To: \n" >-"POT-Creation-Date: 2015-04-08 16:19+0200\n" >+"POT-Creation-Date: 2015-04-13 15:53+0200\n" > "PO-Revision-Date: 2011-10-25 14:38+0200\n" > "Last-Translator: Frank Greif <fg@it25.de>\n" > "Language-Team: LANGUAGE <LL@li.org>\n" >@@ -32,7 +32,7 @@ > msgid "Could not query App Center: %s" > msgstr "Konnte das App Center nicht erreichen: %s" > >-#: umc/python/appcenter/app_center.py:1501 >+#: umc/python/appcenter/app_center.py:1513 > #, python-format > msgid "Installing LDAP packages on %s" > msgstr "Installiere LDAP Pakete auf %s" >@@ -41,7 +41,7 @@ > msgid "Package not found in repository" > msgstr "Paket wurde in keinem Repository gefunden" > >-#: umc/python/appcenter/app_center.py:1413 >+#: umc/python/appcenter/app_center.py:1425 > msgid "" > "Registration of the application in LDAP failed. It will be retried every " > "time the App Center module is opened." >@@ -49,7 +49,7 @@ > "Die Registrierung der Applikation im LDAP ist fehlgeschlagen. Sie wird bei " > "jedem Ãffnen des App Center Moduls wiederholt werden." > >-#: umc/python/appcenter/app_center.py:989 >+#: umc/python/appcenter/app_center.py:1007 > #, python-format > msgid "" > "The application needs a %(needs)s-bit operating system. This server is " >Index: umc/python/appcenter/app_center.py >=================================================================== >--- umc/python/appcenter/app_center.py (Revision 59725) >+++ umc/python/appcenter/app_center.py (Arbeitskopie) >@@ -951,6 +951,24 @@ > return '<Application id="%s" name="%s (%s)" code="%s" component="%s">' % (self.id, self.name, self.version, self.code, self.component_id) > > @HardRequirement('install', 'update') >+ def must_have_fitting_ucs_version(self): >+ required_version = self.get('requireducsversion') >+ if not required_version: >+ return True >+ try: >+ version_bits = re.match(r'^(\d+)\.(\d+)-(\d+)(?: errata(\d+))?$', required_version).groups() >+ except AttributeError: >+ MODULE.warn('Incorrect RequiredUCSVersion: %r' % required_version) >+ return True >+ major, minor = ucr.get('version/version').split('.', 1) >+ patchlevel = ucr.get('version/patchlevel') >+ errata = ucr.get('version/erratalevel') >+ comparisons = zip(version_bits, [major, minor, patchlevel, errata]) >+ for required, present in comparisons: >+ if int(required or 0) > int(present): >+ return {'required_version': required_version} >+ >+ @HardRequirement('install', 'update') > def must_have_valid_license(self): > LICENSE.reload() > return LICENSE.allows_using(self.get('notifyvendor'))
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 38042
:
6821