Bug 135858

Summary: using maplist on a nested structure in YCP seems to fail
Product: [openSUSE] SUSE LINUX 10.0 Reporter: Uwe Gansert <ug>
Component: YaST2Assignee: Stanislav Visnovsky <visnov>
Status: RESOLVED FIXED QA Contact: Klaus Kämpf <kkaempf>
Severity: Normal    
Priority: P5 - None CC: mvidner
Version: Final   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: Other Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: example code
shorter test case

Description Uwe Gansert 2005-11-29 15:05:30 UTC
the attached code does not work like expected.
Comment 1 Uwe Gansert 2005-11-29 15:06:05 UTC
Created attachment 58966 [details]
example code
Comment 2 JaDr. Tucny 2005-11-29 15:35:33 UTC
Created attachment 58983 [details]
shorter test case

This test case narrows down the problem. The issue is the bracket assignment operator, where first the left-hand-side map is evaluated, then the key and the new value, and then the map is augmented.
So if the new value has side effects that modify the LHS map, they are discarded.
Comment 3 Klaus Kämpf 2005-11-29 16:10:42 UTC
Right Martin. Indeed the lhs was evaluated before the rhs. Fixing this is pretty straightforward. But what will break ?
Comment 4 Klaus Kämpf 2005-11-29 16:13:00 UTC
Fixed in STABLE.