Bug 30904 - Remove appcenter errata repositories from UCR settings
Remove appcenter errata repositories from UCR settings
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: App Center
UCS 3.1
All Linux
: P1 normal (vote)
: UCS 3.2
Assigned To: Lukas Walter
Dirk Wiesenthal
: interim-3
Depends on: 30899
Blocks:
  Show dependency treegraph
 
Reported: 2013-03-26 13:03 CET by Sönke Schwardt-Krummrich
Modified: 2013-11-19 06:43 CET (History)
4 users (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional): Cleanup
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sönke Schwardt-Krummrich univentionstaff 2013-03-26 13:03:26 CET
During update to UCS 3.1-2 all appcenter errata repositories should be removed from UCR settings automatically. See bug 30899 for further details.

+++ This bug was initially created as a clone of Bug #30899 +++

There are Currently no Errata Updates for UCS@School 3.1. However the errata
Archive is required to install the Update to UCS 3.1-1. Putting even an empty
errata Archive is therefore necessary.
Comment 1 Moritz Muehlenhoff univentionstaff 2013-05-31 10:45:48 CEST
We will not ship a UCS 3.1-2 release; the next UCS release will be UCS 3.2.

As such, this bug is moved to the new target milestone.
Comment 2 Lukas Walter univentionstaff 2013-10-17 14:03:10 CEST
A script has been added which will be executed once when updating from a version below 3.0.40-1.

It will remove all repository/online/component/.* UCR variables except repository/online/component/3.2-0-errata/.*



svn 45238: univention-management-console-module-appcenter (3.0.40-1)
Comment 3 Stefan Gohmann univentionstaff 2013-10-17 14:30:25 CEST
(In reply to Lukas Walter from comment #2)
> A script has been added which will be executed once when updating from a
> version below 3.0.40-1.
> 
> It will remove all repository/online/component/.* UCR variables except
> repository/online/component/3.2-0-errata/.*
> 
> 
> 
> svn 45238: univention-management-console-module-appcenter (3.0.40-1)

Please remove only the keys generated by the app center module. Maybe a static list is the best solution.
Comment 4 Lukas Walter univentionstaff 2013-10-17 17:16:42 CEST
(In reply to Stefan Gohmann from comment #3)
> (In reply to Lukas Walter from comment #2)
> > A script has been added which will be executed once when updating from a
> > version below 3.0.40-1.
> > 
> > It will remove all repository/online/component/.* UCR variables except
> > repository/online/component/3.2-0-errata/.*
> > 
> > 
> > 
> > svn 45238: univention-management-console-module-appcenter (3.0.40-1)
> 
> Please remove only the keys generated by the app center module. Maybe a
> static list is the best solution.

Adapted as suggested, but using a dynamically generated list apps.


svn 45276: univention-management-console-module-appcenter (3.0.41-1)
Comment 5 Stefan Gohmann univentionstaff 2013-10-17 17:26:33 CEST
(In reply to Lukas Walter from comment #4)
> (In reply to Stefan Gohmann from comment #3)
> > (In reply to Lukas Walter from comment #2)
> > > A script has been added which will be executed once when updating from a
> > > version below 3.0.40-1.
> > > 
> > > It will remove all repository/online/component/.* UCR variables except
> > > repository/online/component/3.2-0-errata/.*
> > > 
> > > 
> > > 
> > > svn 45238: univention-management-console-module-appcenter (3.0.40-1)
> > 
> > Please remove only the keys generated by the app center module. Maybe a
> > static list is the best solution.
> 
> Adapted as suggested, but using a dynamically generated list apps.

Then please create a new bug that the script has to be removed with a further release.
Comment 6 Dirk Wiesenthal univentionstaff 2013-10-24 15:17:28 CEST
The script is buggy:
 * ucr.save() does not commit sources.list, you need to use the correct handlers
 * Not all ucr variables that were set are to be unset. See univention-management-console-module-appcenter/umc/python/appcenter/constants.py#COMP_PARAMS

Furthermore it does not contain any copyright and has many blank lines...

Important:
Users having the -errata components registered will not be able to update to UCS 3.2 because of the missing repositories. Is it possible to delete the UCR variables _before_ updating to UCS 3.2 - even before checking if all components are present in the new release?

Otherwise we need to ship the -errata components in UCS 3.2
Comment 7 Alexander Kläser univentionstaff 2013-10-25 10:11:09 CEST
(In reply to Dirk Wiesenthal from comment #6)
> ...
> Important:
> Users having the -errata components registered will not be able to update to
> UCS 3.2 because of the missing repositories. Is it possible to delete the
> UCR variables _before_ updating to UCS 3.2 - even before checking if all
> components are present in the new release?
> 
> Otherwise we need to ship the -errata components in UCS 3.2

Theoretically this would be possible in the preup script.
Comment 8 Stefan Gohmann univentionstaff 2013-10-25 10:18:14 CEST
(In reply to Alexander Kläser from comment #7)
> (In reply to Dirk Wiesenthal from comment #6)
> > ...
> > Important:
> > Users having the -errata components registered will not be able to update to
> > UCS 3.2 because of the missing repositories. Is it possible to delete the
> > UCR variables _before_ updating to UCS 3.2 - even before checking if all
> > components are present in the new release?
> > 
> > Otherwise we need to ship the -errata components in UCS 3.2
> 
> Theoretically this would be possible in the preup script.

No, the updater blocks the upgrade and no preup script will be executed. But as discussed with Lukas yesterday: The customer needs to upgrade to the latest app version before upgrading to UCS 3.2. And the latest apps don't have errata components. My guess is that we can simple remove the static list in the appcenter postinst.
Comment 9 Dirk Wiesenthal univentionstaff 2013-10-25 10:21:45 CEST
(In reply to Stefan Gohmann from comment #8)
> (In reply to Alexander Kläser from comment #7)
> > (In reply to Dirk Wiesenthal from comment #6)
> > > ...
> > > Important:
> > > Users having the -errata components registered will not be able to update to
> > > UCS 3.2 because of the missing repositories. Is it possible to delete the
> > > UCR variables _before_ updating to UCS 3.2 - even before checking if all
> > > components are present in the new release?
> > > 
> > > Otherwise we need to ship the -errata components in UCS 3.2
> > 
> > Theoretically this would be possible in the preup script.
> 
> No, the updater blocks the upgrade and no preup script will be executed. But
> as discussed with Lukas yesterday: The customer needs to upgrade to the
> latest app version before upgrading to UCS 3.2. And the latest apps don't
> have errata components. My guess is that we can simple remove the static
> list in the appcenter postinst.

If all initial applications (those that have an -errata repository in 3.1) now have newer versions, this whole bug is WORKSFORME: The errata repositories are removed when updating in UCS 3.1.

See https://billy.knut.univention.de/websvn/filedetails.php?repname=dev&path=%2Fbranches%2Fucs-3.1%2Fucs-3.1-1%2Fmanagement%2Funivention-management-console-module-appcenter%2Fumc%2Fpython%2Fappcenter%2Futil.py ComponentManager.remove_app
Comment 10 Dirk Wiesenthal univentionstaff 2013-10-25 10:35:37 CEST
(In reply to Dirk Wiesenthal from comment #9)
> If all initial applications (those that have an -errata repository in 3.1)
> now have newer versions, this whole bug is WORKSFORME

No, sorry. The user may have installed the application with 3.1-0errata0. In this case the errata components are registered (may only happen once: In errata0 all UCS-errata updates are installed, too).

My guess is that this is no real problem, though.
Comment 11 Alexander Kläser univentionstaff 2013-10-25 11:21:49 CEST
(In reply to Alexander Kläser from comment #7)
> (In reply to Dirk Wiesenthal from comment #6)
> > ...
> > Important:
> > Users having the -errata components registered will not be able to update to
> > UCS 3.2 because of the missing repositories. Is it possible to delete the
> > UCR variables _before_ updating to UCS 3.2 - even before checking if all
> > components are present in the new release?
> > 
> > Otherwise we need to ship the -errata components in UCS 3.2
> 
> Theoretically this would be possible in the preup script.

Nope, it is not possible. We need to ship the corresponding errata components.

As discussed, all necessary errata components (i.e. for apps that are shipped with an errata component in there latest version for 3.1) will be added to 3.2, as well in the repository. The 3.2 appcenter posinst script will then remove these few UCR variables for the errata components manually.
Comment 12 Lukas Walter univentionstaff 2013-10-25 15:57:00 CEST
I've created symbolic "component-errata" links to their related components in the test appcenter.

The component-errata UCRVs (every one that could at least possibly be set) will be removed in univention-management-console-module-appcenter.postinst directly, not using an external script.
Comment 13 Florian Best univentionstaff 2013-10-30 14:32:58 CET
While updating:

/var/lib/dpkg/info/univention-management-console-module-appcenter.postinst: Zeile 52:
/usr/share/univention-management-console-module-appcenter/remove-app-errata-repositories-from-ucr: Datei oder Verzeichnis nicht gefunden
Comment 14 Lukas Walter univentionstaff 2013-10-30 14:42:15 CET
svn r45711:

univention-management-console-module-appcenter (3.0.48-3) unstable; urgency=low

  * removed obsolete code (Bug #30904)
Comment 15 Dirk Wiesenthal univentionstaff 2013-10-31 17:49:58 CET
Please add the following -errata repositories:
 * ucsschool_20131007

Not all -errata components are removed after upgrade, notably fetchmail-errata.

Some non-errata (aka real) components are removed, e.g. agorumcore-pro
Comment 16 Lukas Walter univentionstaff 2013-10-31 17:56:52 CET
(In reply to Dirk Wiesenthal from comment #15)
> Please add the following -errata repositories:
>  * ucsschool_20131007
> 
> Not all -errata components are removed after upgrade, notably
> fetchmail-errata.
> 
> Some non-errata (aka real) components are removed, e.g. agorumcore-pro

Instead of agorumcore-pro-errata and fetchmail-errata, agorumcore-pro and fetechmail were included in the list of component IDs to iterate over.

This is corrected now.
Comment 17 Dirk Wiesenthal univentionstaff 2013-10-31 19:29:48 CET
(In reply to Lukas Walter from comment #16)
> (In reply to Dirk Wiesenthal from comment #15)
> > Please add the following -errata repositories:
> >  * ucsschool_20131007
> > 
> > Not all -errata components are removed after upgrade, notably
> > fetchmail-errata.
> > 
> > Some non-errata (aka real) components are removed, e.g. agorumcore-pro
> 
> Instead of agorumcore-pro-errata and fetchmail-errata, agorumcore-pro and
> fetechmail were included in the list of component IDs to iterate over.
> 
> This is corrected now.

But fetchmail has to be removed: Bug#32541
Comment 18 Dirk Wiesenthal univentionstaff 2013-10-31 19:32:48 CET
ucsschool_20131007-errata is still missing in 3.2 App Center
Comment 19 Dirk Wiesenthal univentionstaff 2013-10-31 19:51:48 CET
(In reply to Dirk Wiesenthal from comment #17)
> But fetchmail has to be removed: Bug#32541

My fault. Is removed by fetchmail itself. ucsschool_20131007-errata remains. Do not forget to add it in the postinst list
Comment 20 Lukas Walter univentionstaff 2013-11-01 10:19:33 CET
(In reply to Dirk Wiesenthal from comment #19)
> (In reply to Dirk Wiesenthal from comment #17)
> > But fetchmail has to be removed: Bug#32541
> 
> My fault. Is removed by fetchmail itself. ucsschool_20131007-errata remains.
> Do not forget to add it in the postinst list

Added in SVN r45789
Comment 21 Dirk Wiesenthal univentionstaff 2013-11-01 16:52:00 CET
Works
Comment 22 Stefan Gohmann univentionstaff 2013-11-19 06:43:40 CET
UCS 3.2 has been released:
 http://docs.univention.de/release-notes-3.2-en.html
 http://docs.univention.de/release-notes-3.2-de.html

If this error occurs again, please use "Clone This Bug".