Bug 23737 - UCR-Templates/Info-Files bei Paket-Update: dpkg-divert entfernen
UCR-Templates/Info-Files bei Paket-Update: dpkg-divert entfernen
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: UCR
UCS 3.0
Other Linux
: P1 normal (vote)
: UCS 4.2
Assigned To: Philipp Hahn
Janek Walkenhorst
: interim-1
Depends on: 21263
Blocks: 47356
  Show dependency treegraph
 
Reported: 2011-09-21 14:44 CEST by Philipp Hahn
Modified: 2018-07-16 14:05 CEST (History)
5 users (show)

See Also:
What kind of report is it?: Development Internal
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):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philipp Hahn univentionstaff 2011-09-21 14:44:46 CEST
+++ This bug was initially created as a clone of Bug #21263 Comment 3 +++

Bei Updates treten weitere Probleme auf:

1. Da "ucr unregister" nur bei "remove" und "purge" aufgerufen wird, nicht aber
"upgrade", geht die Information über Templates verloren, die in der alten
Version noch vorhanden sind, in der neuen allerdings nicht mehr (z.B. wegen
Umbenennung). Damit bleibt dann auch das "dpkg-divert" darauf bestehen. (Für
das neue Template wird ein neues "dpkg-divert" hinzugefügt, weil das "ucr
register" immer aufgerufen wird.)

Das "ucr unregister" darf dagegen nur im Falle der Deinstallation des Pakets
aufgerufen werden, da ansonsten bei einem Update ggf. kurzzeitig keine
Templates mehr vorhanden sind und die Datei auf den ursprünglichen Zustand aus
dem Debian-Paket zurückgesetzt würde.



Möglichkeiten:
1. Umstellen von "dpkg-divert" auf "dpkg-divert $package", um eine Zuordnung zu Paketen zu bekommen (Bug #5653). Dadurch wäre es ucr möglich zu erkennen, ob noch diversions vorhanden sind, die dann rückgängig gemacht werden können.
2. ucs/base/univention-lib/shell/ucr.sh um entsprechende Helper erweitern, un das leichter per PostInst machen zu können.
3.
Comment 1 Philipp Hahn univentionstaff 2016-09-06 13:59:59 CEST
Just call "ucr update"? 

ucr then will find the discrepancy between the installed diversions and the ones listed in the .info files and will fix it.

Current workaround: Call "ucr update" in .postinst.
Comment 2 Florian Best univentionstaff 2016-09-06 14:00:15 CEST
Please let's fix this.
Comment 3 Philipp Hahn univentionstaff 2016-09-06 17:32:56 CEST
r72310 | Bug #23737 ucr: remove debian/*.dirs
r72309 | Bug #23737 ucr: Handle updates .info files
r72308 | Bug #23737 ucr: Remove update code
r72307 | Bug #23737 ucr: Remove update wrapper

Package: univention-config-registry
Version: 12.0.0-1A~4.2.0.201609061711
Version: 12.0.0-1A~4.2.0.201609061726
Branch: ucs_4.2-0

r72324 | Bug #23737,Bug #27872 UCR: changelog
Comment 4 Janek Walkenhorst univentionstaff 2017-02-02 18:50:48 CET
Code changes look good.
Comment 5 Stefan Gohmann univentionstaff 2017-04-04 18:29:28 CEST
UCS 4.2 has been released:
 https://docs.software-univention.de/release-notes-4.2-0-en.html
 https://docs.software-univention.de/release-notes-4.2-0-de.html

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