Bug 135858 - using maplist on a nested structure in YCP seems to fail
Summary: using maplist on a nested structure in YCP seems to fail
Status: RESOLVED FIXED
Alias: None
Product: SUSE LINUX 10.0
Classification: openSUSE
Component: YaST2 (show other bugs)
Version: Final
Hardware: Other Other
: P5 - None : Normal
Target Milestone: ---
Assignee: Stanislav Visnovsky
QA Contact: Klaus Kämpf
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-11-29 15:05 UTC by Uwe Gansert
Modified: 2005-11-29 16:13 UTC (History)
1 user (show)

See Also:
Found By: Other
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
example code (217 bytes, text/plain)
2005-11-29 15:06 UTC, Uwe Gansert
Details
shorter test case (93 bytes, text/plain)
2005-11-29 15:35 UTC, JaDr. Tucny
Details

Note You need to log in before you can comment on or make changes to this bug.
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.