Bug 32570 - UCR script handler inconsistently called
UCR script handler inconsistently called
Status: RESOLVED WONTFIX
Product: UCS
Classification: Unclassified
Component: UCR
UCS 3.2
Other Linux
: P5 normal (vote)
: UCS 3.2-x
Assigned To: UCS maintainers
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-09-12 09:46 CEST by Philipp Hahn
Modified: 2018-04-14 13:29 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:
best: Patch_Available+


Attachments
Change implementation to always call script handler (1.15 KB, patch)
2013-09-12 09:55 CEST, Philipp Hahn
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Philipp Hahn univentionstaff 2013-09-12 09:46:23 CEST
python/univention/config_registry/handler.py:140#run_script()
		if value and len(value) > 1 and value[0] and value[1]:

The handler is only called, when the variable is currently set to a non-empty string and is again set to a non-empty string, but not on
  None → "value"
  None → ""
  "" → "value"
  "" → None
  "value" → None
  "value" → None

This doesn't match with what is described in the DeveloperReference and what I would expect:

developer-reference/ucr/ucr.xml:486#ucr:script
> A script template allows an external program to be called when specific <acronym>UCR</acronym> variables are changed.
...
> It receives the list of changed variables on standard input.
Comment 1 Philipp Hahn univentionstaff 2013-09-12 09:55:18 CEST
Created attachment 5426 [details]
Change implementation to always call script handler

1. UNTESTED
2. This is an API change, as the script is now called in more cases.
3. STDIN is not terminated by a \n anymore (lazy me)
Comment 2 Stefan Gohmann univentionstaff 2017-06-16 20:40:29 CEST
This issue has been filed against UCS 3. UCS 3 is out of the normal maintenance and many UCS components have vastly changed in UCS 4.

If this issue is still valid, please change the version to a newer UCS version otherwise this issue will be automatically closed in the next weeks.
Comment 3 Stefan Gohmann univentionstaff 2017-08-08 07:11:03 CEST
This issue has been filed against UCS 3.2.

UCS 3.2 is out of maintenance and many UCS components have vastly changed in later releases. Thus, this issue is now being closed.

If this issue still occurs in newer UCS versions, please use "Clone this bug" or reopen this issue. In this case please provide detailed information on how this issue is affecting you.