[email protected] write:
> Author: fehr
> Date: Tue Aug 9 16:31:59 2011
> New Revision: 65294
>
> URL: http://svn.opensuse.org/viewcvs/yast?rev=65294&view=rev
> Log:
> fix bugs in subvolume handling during install
>
> Modified:
> trunk/storage/package/yast2-storage.changes
> trunk/storage/storage/src/include/custom_part_dialogs.ycp
> trunk/storage/storage/src/include/custom_part_lib.ycp
> trunk/storage/storage/src/include/ep-dialogs.ycp
> trunk/storage/storage/src/modules/Storage.ycp
>
> Modified: trunk/storage/package/yast2-storage.changes
> URL:
> http://svn.opensuse.org/viewcvs/yast/trunk/storage/package/yast2-storage.changes?rev=65294&r1=65293&r2=65294&view=diff
> ==============================================================================
> --- trunk/storage/package/yast2-storage.changes (original)
> +++ trunk/storage/package/yast2-storage.changes Tue Aug 9 16:31:59 2011
> @@ -1,4 +1,9 @@
> -------------------------------------------------------------------
> +Tue Aug 9 16:29:08 CEST 2011 - [email protected]
> +
> +- fix bugs in subvolume handling during install
> +
> +-------------------------------------------------------------------
> Fri Aug 5 12:35:24 CEST 2011 - [email protected]
>
> - fixed .desktop file (bnc #681249)
>
> Modified: trunk/storage/storage/src/include/custom_part_dialogs.ycp
> URL:
> http://svn.opensuse.org/viewcvs/yast/trunk/storage/storage/src/include/custom_part_dialogs.ycp?rev=65294&r1=65293&r2=65294&view=diff
> ==============================================================================
> --- trunk/storage/storage/src/include/custom_part_dialogs.ycp (original)
> +++ trunk/storage/storage/src/include/custom_part_dialogs.ycp Tue Aug 9
> 16:31:59 2011
> @@ -1345,13 +1345,20 @@
> {
> string pth = (string)UI::QueryWidget(`id(`subvol), `CurrentItem);
> y2milestone( "SubvolHandling remove path:%1", pth );
> + y2milestone( "SubvolHandling remove subvol:%1", new["subvol"]:[] );
> new["subvol"] = maplist( map p, new["subvol"]:[],
> {
> if( p["name"]:""==pth )
> + {
> p["delete"] = true;
> + if( haskey( p, "create" ))
> + p = remove( p, "create" );
> + }
yast2-core from 2.17.16 has nice feature to return unchanged list if key not
exist
so instead
if( haskey( p, "create" ))
p = remove( p, "create" );
}
you can write just
p = remove( p, "create" );
> return p;
> });
> + y2milestone( "SubvolHandling remove subvol:%1", new["subvol"]:[] );
> items = SubvolNames( new );
> + y2milestone( "SubvolHandling remove items:%1", items );
> changed = true;
> UI::ChangeWidget( `id(`subvol), `Items, items );
> }
> @@ -1359,9 +1366,10 @@
> {
> string pth = (string)UI::QueryWidget( `id(`new_path), `Value );
> y2milestone( "SubvolHandling add path:%1", pth );
> + y2milestone( "SubvolHandling names:%1", SubvolNames( new ) );
> if( pth==nil || size(pth)==0 )
> Popup::Message(_("Empty subvolume name not allowed."));
> - else if( size(filter( map p, new["subvol"]:[],
> ``(p["name"]:""==pth)))>0 )
> + else if( size(filter( string s, SubvolNames( new ), ``(s==pth)))>0 )
for me this looks like you want check if it contains element
so:
else if ( contains( SubvolNames( new ), pth )
Josef
--
Josef Reidinger
Appliance Toolkit team
maintaining parts of webyast and SLMS
author of rubygems - studio_api and net_observer (coauthor)
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]