Bug 34556 - ucs_registerLDAPExtension: error: --messagecatalog can only be used after --udm_module
ucs_registerLDAPExtension: error: --messagecatalog can only be used after --u...
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: univention-lib
UCS 3.2
Other Linux
: P5 normal (vote)
: UCS 4.1-0-errata
Assigned To: Daniel Tröder
Florian Best
:
Depends on: 35839 35840
Blocks: 42089
  Show dependency treegraph
 
Reported: 2014-04-15 15:42 CEST by Janek Walkenhorst
Modified: 2016-08-23 09:04 CEST (History)
2 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):
Max CVSS v3 score:


Attachments
univention-lib-messagecatalog.patch (5.04 KB, patch)
2014-09-08 13:27 CEST, Arvid Requate
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Janek Walkenhorst univentionstaff 2014-04-15 15:42:38 CEST
Calling
  ucs_registerLDAPExtension "$@" \
    --messagecatalog /usr/share/univention-radius/50_networkaccess.mo
leads to
  ucs_registerLDAPExtension: error: --messagecatalog can only be used after
   --udm_module
.

This precludes shipping translations for syntax extensions.
Comment 1 Arvid Requate univentionstaff 2014-09-08 13:27:03 CEST
Created attachment 6100 [details]
univention-lib-messagecatalog.patch

univention-ldap and univention-directory-manager-modules need to be extended as well for this new feature, see blocking Bugs.
Comment 2 Stefan Gohmann univentionstaff 2014-10-28 22:19:07 CET
Moved to UCS 3.2-4-errata.
Comment 3 Daniel Tröder univentionstaff 2016-01-19 11:30:42 CET
This patch and the one from #35839 applied.

Code: 66879, 66880 (66881)
YAML: 66879, 66880, 66882
Comment 4 Florian Best univentionstaff 2016-01-20 15:35:40 CET
OK: ucs_registerLDAPExtension --udm_syntax_messagecatalog
OK: ucs_registerLDAPExtension --udm_hook_messagecatalog
REOPEN: ucs_unregisterLDAPExtension does not remove the message catalog (both syntax and hooks)

root@master30:~/test# python -c 'from univention.lib import ldap_extension; ldap_extension.ucs_registerLDAPExtension()' --packagename python-italc --packageversion 10.0.0-1 --udm_syntax example2.py --udm_syntax_messagecatalog=de.mo 
Object exists: cn=udm_syntax,cn=univention,dc=saml,dc=dev
Object created: cn=example2,cn=udm_syntax,cn=univention,dc=saml,dc=dev

Waiting for activation of the extension object example2:.OK
Waiting for file example2.py: OK

root@master30:~/test# md5sum /usr/share/pyshared/univention/admin/syntax.d/example2.py example2.py 
2a6e1884b9cfd857165f8c9fc5bc663d  /usr/share/pyshared/univention/admin/syntax.d/example2.py
2a6e1884b9cfd857165f8c9fc5bc663d  example2.py

root@master30:~/test# md5sum /usr/share/locale/de/LC_MESSAGES/univention-admin-syntax-example2.mo de.mo 
1c30e0c1ee4b5f1182854311f6cabad5  /usr/share/locale/de/LC_MESSAGES/univention-admin-syntax-example2.mo
1c30e0c1ee4b5f1182854311f6cabad5  de.mo

root@master30:~/test# python -c 'from univention.lib import ldap_extension; ldap_extension.ucs_unregisterLDAPExtension()' --udm_syntax example2
Object removed: cn=example2,cn=udm_syntax,cn=univention,dc=saml,dc=dev

root@master30:~/test# md5sum /usr/share/pyshared/univention/admin/syntax.d/example2.py example2.py 
md5sum: /usr/share/pyshared/univention/admin/syntax.d/example2.py: Datei oder Verzeichnis nicht gefunden
2a6e1884b9cfd857165f8c9fc5bc663d  example2.py
root@master30:~/test# md5sum /usr/share/locale/de/LC_MESSAGES/univention-admin-syntax-example2.mo de.mo 
1c30e0c1ee4b5f1182854311f6cabad5  /usr/share/locale/de/LC_MESSAGES/univention-admin-syntax-example2.mo
1c30e0c1ee4b5f1182854311f6cabad5  de.mo
Comment 5 Florian Best univentionstaff 2016-01-20 16:14:48 CET
(In reply to Florian Best from comment #4)
> OK: ucs_registerLDAPExtension --udm_syntax_messagecatalog
> OK: ucs_registerLDAPExtension --udm_hook_messagecatalog
> REOPEN: ucs_unregisterLDAPExtension does not remove the message catalog
> (both syntax and hooks)
This seems no regression as it also doesn't work for udm_module.

@Arvid: what's your opinion on this? Should the foo.mo files be removed when unregistering? Or are they left on purpose?
Comment 6 Arvid Requate univentionstaff 2016-01-20 19:38:37 CET
> Or are they left on purpose?

No, the may get removed, that would be cleaner.
Comment 7 Daniel Tröder univentionstaff 2016-01-21 09:00:46 CET
Fixed a typo in r66917 (11.0.2-15.1368.201601210858) that hopefully solves the uninstall problem. Please test it for me, as I have no test setup at hand.
Comment 8 Daniel Tröder univentionstaff 2016-01-22 16:40:52 CET
r66917 fixed a typo that prevented the removal of message catalogs.
Comment 9 Florian Best univentionstaff 2016-01-22 16:41:19 CET
(In reply to Daniel Tröder from comment #7)
> Fixed a typo in r66917 (11.0.2-15.1368.201601210858) that hopefully solves
> the uninstall problem. Please test it for me, as I have no test setup at
> hand.
yes.

YAML: OK
Comment 10 Daniel Tröder univentionstaff 2016-01-27 13:00:51 CET
Fixed build number in advisory in 66993.