Univention Bugzilla – Full Text Bug Listing |
Summary: | ucr set doesn't set local variable if exists already in another UCR scope | ||
---|---|---|---|
Product: | UCS | Reporter: | Florian Best <best> |
Component: | UCR | Assignee: | Jürn Brodersen <brodersen> |
Status: | CLOSED FIXED | QA Contact: | Philipp Hahn <hahn> |
Severity: | normal | ||
Priority: | P5 | CC: | brodersen, gohmann, klaeser |
Version: | UCS 4.1 | ||
Target Milestone: | UCS 4.1-2-errata | ||
Hardware: | Other | ||
OS: | Linux | ||
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: | |||
Bug Depends on: | |||
Bug Blocks: | 40913, 41631 | ||
Attachments: |
proposed patch
test |
Description
Florian Best
2016-02-18 15:47:38 CET
Part of the original feedback: Wenn die Variable also lokal nicht vorhanden ist, aber durch den LDAP-Scope bereits vorgegeben ist, wird sie auch lokal nicht gesetzt. Das könnte vielleicht in manchen Situationen zu Problemen führen, wenn der LDAP-Wert später wieder entfernt wird. I can't imagine a problem which might be caused by this. (In reply to Florian Best from comment #1) > ... > I can't imagine a problem which might be caused by this. Wrong, c.f. Bug 41415 and Bug 40913 :) . *** Bug 41415 has been marked as a duplicate of this bug. *** *** Bug 40913 has been marked as a duplicate of this bug. *** When this behavior is corrected, base/univention-system-activation/scripts/univention-system-activation needs to be adjusted slightly, e.g., as the dpkg-reconfigure call can be removed. Please also add a test case for this behavior. Created attachment 7757 [details]
proposed patch
Is it ok to use has_key() here?
Or should I use '$key in ucr._registry[$scope]' directly? Alternatively I could add a scope keyword to the get() function.
Created attachment 7759 [details]
test
Test for conditional set
r70502: Make conditional "ucr set $key?$value" layer dependent Package: univention-config-registry Version: 11.0.0-4.498.201606211603 r70504: YAML Sorry if my description in the yaml file is to long. *** Bug 41631 has been marked as a duplicate of this bug. *** OK: aptitude install '?source-package(univention-config-registry)~i OK: zless /usr/share/doc/univention-config-registry/changelog.Debian.gz FIXED: univention-config-registry.yaml r70505 | Bug #40728 ucr: Fix YAML OK: errata-announce -V --only univention-config-registry.yaml OK: ucr set --force foo?forced # Create foo ucr set --schedule foo?schedule # Create foo ucr set --ldap-policy foo?ldap # Create foo ucr set foo?default # Create foo ucr get foo # forced ucr unset --force foo ucr get foo # schedule ucr unset --schedule foo ucr get foo # ldap ucr unset --ldap-policy foo ucr get foo # default ucr unset foo ucr get foo # OK: ucs-test -s ucr -E dangerous OK: /usr/share/ucs-test/03_ucr/53ucs_set_layer -vvvf r70507 | Bug #40728 test: Add 03/53ucs_set_layer Package: ucs-test Version: 6.0.33-73.1487.201606211721 Branch: ucs_4.1-0 Scope: errata4.1-2 |