Hello community, here is the log from the commit of package yast2-storage for openSUSE:Factory checked in at Fri Aug 12 09:42:41 CEST 2011. -------- --- yast2-storage/yast2-storage.changes 2011-07-14 13:57:39.000000000 +0200 +++ /mounts/work_src_done/STABLE/yast2-storage/yast2-storage.changes 2011-08-11 17:33:52.000000000 +0200 @@ -1,0 +2,25 @@ +Wed Aug 10 16:36:17 CEST 2011 - fehr@suse.de + +- allow label on btrfs when format is true +- do not allow to partition disks used by LVM in disk selection +- show popup if proposal of separate /home is not possible +- enforce that all subvolume names starting with "@/" +- version 2.21.4 + +------------------------------------------------------------------- +Tue Aug 9 16:29:08 CEST 2011 - fehr@suse.de + +- fix bugs in subvolume handling during install + +------------------------------------------------------------------- +Fri Aug 5 12:35:24 CEST 2011 - tgoettlicher@suse.de + +- fixed .desktop file (bnc #681249) + +------------------------------------------------------------------- +Thu Jul 28 12:38:19 CEST 2011 - fehr@suse.de + +- fix proposal to change disklabel to gpt when EFI is + required (bnc#707472) + +------------------------------------------------------------------- calling whatdependson for head-i586 Old: ---- yast2-storage-2.21.3.tar.bz2 New: ---- yast2-storage-2.21.4.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-storage.spec ++++++ --- /var/tmp/diff_new_pack.76J8Hy/_old 2011-08-12 09:41:18.000000000 +0200 +++ /var/tmp/diff_new_pack.76J8Hy/_new 2011-08-12 09:41:18.000000000 +0200 @@ -19,11 +19,11 @@ Name: yast2-storage -Version: 2.21.3 +Version: 2.21.4 Release: 1 BuildRoot: %{_tmppath}/%{name}-%{version}-build -Source0: yast2-storage-2.21.3.tar.bz2 +Source0: yast2-storage-2.21.4.tar.bz2 Prefix: /usr @@ -31,7 +31,7 @@ License: GPL v2 or later BuildRequires: blocxx-devel boost-devel gcc-c++ libxcrypt-devel openssl-devel sablot swig BuildRequires: docbook-xsl-stylesheets doxygen libxslt perl-XML-Writer sgml-skel update-desktop-files -BuildRequires: libstorage-devel >= 2.21.3 yast2 >= 2.19.4 yast2-core-devel >= 2.18.1 yast2-devtools +BuildRequires: libstorage-devel >= 2.21.4 yast2 >= 2.19.4 yast2-core-devel >= 2.18.1 yast2-devtools BuildRequires: yast2-perl-bindings yast2-testsuite >= 2.19.0 Requires: yast2-perl-bindings perl = %{perl_version} Requires: yast2-core >= 2.18.3 yast2 >= 2.19.4 yast2-libyui >= 2.18.7 @@ -55,7 +55,7 @@ devices during installation and on an installed system. %prep -%setup -n yast2-storage-2.21.3 +%setup -n yast2-storage-2.21.4 %build %{prefix}/bin/y2tool y2autoconf ++++++ yast2-storage-2.21.3.tar.bz2 -> yast2-storage-2.21.4.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-storage-2.21.3/VERSION new/yast2-storage-2.21.4/VERSION --- old/yast2-storage-2.21.3/VERSION 2011-07-14 12:10:38.000000000 +0200 +++ new/yast2-storage-2.21.4/VERSION 2011-08-11 11:32:05.000000000 +0200 @@ -1 +1 @@ -2.21.3 +2.21.4 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-storage-2.21.3/disk/src/disk.desktop new/yast2-storage-2.21.4/disk/src/disk.desktop --- old/yast2-storage-2.21.3/disk/src/disk.desktop 2010-11-04 17:10:27.000000000 +0100 +++ new/yast2-storage-2.21.4/disk/src/disk.desktop 2011-08-09 16:29:54.000000000 +0200 @@ -2,7 +2,6 @@ Type=Application Categories=Settings;System;Qt;X-SuSE-YaST;X-SuSE-YaST-System; -X-KDE-RootOnly=true X-KDE-HasReadOnlyMode=true X-SuSE-YaST-Call=disk diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-storage-2.21.3/storage/src/include/auto_part_create.ycp new/yast2-storage-2.21.4/storage/src/include/auto_part_create.ycp --- old/yast2-storage-2.21.3/storage/src/include/auto_part_create.ycp 2009-11-05 11:03:35.000000000 +0100 +++ new/yast2-storage-2.21.4/storage/src/include/auto_part_create.ycp 2011-07-28 12:39:43.000000000 +0200 @@ -7,7 +7,7 @@ * Purpose: This module creates the neccessary partitions * in the targetMap * - * $Id: auto_part_create.ycp 57914 2009-07-07 13:56:29Z aschnell $ + * $Id: auto_part_create.ycp 65067 2011-07-28 10:39:42Z fehr $ * * used globals * @@ -31,6 +31,11 @@ string vm = StorageProposal::GetProposalVM(); y2milestone( "create_partitions flex %1 vm %2", has_flex, vm ); disk["partitions"] = partitions; + if( StorageProposal::NeedNewDisklabel(disk) ) + { + tgmap[disk["device"]:"","disklabel"] = "gpt"; + tgmap[disk["device"]:"","del_ptable"] = true; + } map keep = find( map p, partitions, ``(!p["delete"]:false&&p["type"]:`unknown!=`free)); if( size(vm)==0 ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-storage-2.21.3/storage/src/include/custom_part_dialogs.ycp new/yast2-storage-2.21.4/storage/src/include/custom_part_dialogs.ycp --- old/yast2-storage-2.21.3/storage/src/include/custom_part_dialogs.ycp 2011-07-04 15:34:11.000000000 +0200 +++ new/yast2-storage-2.21.4/storage/src/include/custom_part_dialogs.ycp 2011-08-10 16:48:49.000000000 +0200 @@ -16,7 +16,7 @@ * ************************************************************* - $Id: custom_part_dialogs.ycp 64688 2011-07-01 07:55:54Z aschnell $ + $Id: custom_part_dialogs.ycp 65305 2011-08-10 14:48:48Z fehr $ */ { @@ -551,9 +551,11 @@ map enab = $[]; boolean tmp = !contains( no_mountby_type, new["type"]:`primary ); enab[`label] = tmp && FileSystems::MountLabel( new["used_fs"]:`unknown ) && + (new["used_fs"]:`unknown!=`btrfs||new["format"]:false) && new["enc_type"]:`none==`none; enab[`uuid] = tmp && (new["format"]:false || size(new["uuid"]:"")>0) && - FileSystems::MountUuid( new["used_fs"]:`unknown ); + FileSystems::MountUuid( new["used_fs"]:`unknown ) && + new["enc_type"]:`none==`none; tmp = contains(mountby_id_path_type, new["type"]:`none); enab[`id] = tmp && size(new["udev_id"]:[])>0; enab[`path] = tmp && size(new["udev_path"]:"")>0; @@ -1345,13 +1347,19 @@ { 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; + 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 +1367,16 @@ { 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( substring( pth, 0, 2 )!="@/" ) + { + Popup::Message( _("Only subvolume names starting with "@/" currently allowed! +Automatically prepending "@/" to name of subvolume.")); + pth = "@/" + pth; + } + if( contains( SubvolNames( new ), pth )) Popup::Message(sformat(_("Subvolume name %1 already exists."),pth)); else { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-storage-2.21.3/storage/src/include/custom_part_helptexts.ycp new/yast2-storage-2.21.4/storage/src/include/custom_part_helptexts.ycp --- old/yast2-storage-2.21.3/storage/src/include/custom_part_helptexts.ycp 2009-11-05 11:03:35.000000000 +0100 +++ new/yast2-storage-2.21.4/storage/src/include/custom_part_helptexts.ycp 2011-07-28 12:39:43.000000000 +0200 @@ -20,7 +20,7 @@ * ************************************************************* - $Id: custom_part_helptexts.ycp 54333 2008-12-22 13:40:13Z aschnell $ + $Id: custom_part_helptexts.ycp 65067 2011-07-28 10:39:42Z fehr $ */ @@ -135,4 +135,13 @@ If you need to use this disk for installation, you should destroy the disk label in the expert partitioner.") ); } + +define string ia64_gpt_fix_text() + { + return( _("Warning: Your system states that is reqires an EFI +boot setup. Since the selected disk does not contain a +GPT disk label we create a GPT label on this disk. + +You need to mark all partitions on this disk for removal.") ); + } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-storage-2.21.3/storage/src/include/custom_part_lib.ycp new/yast2-storage-2.21.4/storage/src/include/custom_part_lib.ycp --- old/yast2-storage-2.21.3/storage/src/include/custom_part_lib.ycp 2011-03-03 18:06:31.000000000 +0100 +++ new/yast2-storage-2.21.4/storage/src/include/custom_part_lib.ycp 2011-08-09 16:32:00.000000000 +0200 @@ -13,7 +13,7 @@ * ************************************************************* * - $Id: custom_part_lib.ycp 63507 2011-03-03 17:06:29Z fehr $ + $Id: custom_part_lib.ycp 65294 2011-08-09 14:31:59Z fehr $ * */ @@ -24,6 +24,7 @@ import "Partitions"; import "Product"; import "FileSystems"; + import "Greasemonkey"; include "partitioning/partition_defines.ycp"; @@ -370,6 +371,49 @@ return( ret ); } +define term SubvolPart( boolean can_do_subvol ) + { + term subvol = `Empty(); + if( can_do_subvol ) + subvol = `FrameWithMarginBox("", `PushButton( `id(`subvol), `opt(`hstretch), + // button text + _("Subvolume Handling"))); + return( Greasemonkey::Transform(subvol) ); + } + +map<string,any> HandleSubvol( map<string,any> data ) + { + map<string,any> ret = data; + if( ret["mount"]:""=="/" ) + { + y2milestone( "before HandleSubvol fs:%1", ret["used_fs"]:`unknown ); + y2milestone( "before HandleSubvol subvol:%1", ret["subvol"]:[] ); + if( ret["used_fs"]:`unknown==`btrfs ) + { + if( ret["format"]:false ) + { + list<map> lsc = filter( map s, ret["subvol"]:[], + ``(s["create"]:false)); + y2milestone( "HandleSubvol list:%1", lsc ); + if( size(lsc)==0 ) + { + ret = (map<string,any>)Storage::AddSubvolRoot( ret ); + y2milestone( "HandleSubvol AddSubvolRoot subvol:%1", ret["subvol"]:[] ); + } + } + else + ret["subvol"] = filter( map s, ret["subvol"]:[], + ``(!s["create"]:false&&!s["delete"]:false)); + } + else + ret["subvol"] = []; + y2milestone( "after HandleSubvol subvol:%1", ret["subvol"]:[] ); + } + else + ret["subvol"] = []; + return( ret ); + } + map pkg_for_fs = $[ `ext2 : [ "e2fsprogs" ], `ext3 : [ "e2fsprogs" ], @@ -432,7 +476,7 @@ if( apply_change && UI::WidgetExists( `id(`crypt_fs)) ) { boolean cr = selected_fs[`crypt]:true && - new["type"]:`primary!=`btrfs; + new["used_fs"]:`unknown!=`btrfs; y2milestone( "HandleFsChanged cr:%1", cr ); UI::ChangeWidget( `id(`crypt_fs), `Enabled, cr ); @@ -443,6 +487,15 @@ } } + if( !init && apply_change && UI::WidgetExists( `id(`subvol_rp)) ) + { + boolean sv = new["used_fs"]:`unknown==`btrfs; + y2milestone( "HandleFsChanged sv:%1", sv ); + UI::ReplaceWidget( `id(`subvol_rp), SubvolPart(sv) ); + if( UI::WidgetExists( `id(`subvol)) ) + UI::ChangeWidget( `id(`subvol), `Enabled, sv ); + } + if( apply_change ) { //////////////////////////////////////////////// @@ -494,6 +547,8 @@ { new["fs_options"] = FileSystems::DefaultFormatOptions(new); new["fstopt"] = fstopt; + y2milestone( "HandleFsChanged fstopt:%1 new["fstopt"]:%2", + fstopt, new["fstopt"]:"" ); integer max_len = FileSystems::LabelLength( used_fs ); if( size(new["label"]:"") > max_len ) @@ -510,6 +565,8 @@ { new["label"] = ""; } + if( used_fs!=`btrfs ) + new["subvol"] = []; } } y2milestone( "HandleFsChanged new %1", new ); @@ -535,11 +592,16 @@ new = filter(string key, any value, new, ``( key != "fstopt")); } } - if( !init && ret == `mount_point && - UI::WidgetExists( `id(`fstab_options) )) + if( !init && ret==`mount_point ) { string mp = (string)UI::QueryWidget(`id(`mount_point), `Value); - UI::ChangeWidget( `id(`fstab_options), `Enabled, !isempty(mp) ); + if( new["mount"]:""!=mp ) + { + new["mount"] = mp; + new = HandleSubvol( new ); + } + if( UI::WidgetExists( `id(`fstab_options) )) + UI::ChangeWidget( `id(`fstab_options), `Enabled, !isempty(mp) ); } if( (init && UI::WidgetExists( `id(`format))) || ret == `do_format || ret == `do_not_format) @@ -577,6 +639,7 @@ if( new["used_fs"]:`unknown != old["used_fs"]:`unknown ) new = HandleFsChanged( init, new, old["used_fs"]:`unknown, file_systems ); + new = HandleSubvol( new ); if( format ) { new["fs_options"] = FileSystems::DefaultFormatOptions(new); @@ -644,6 +707,7 @@ UI::ChangeWidget( `id(`fsid_point), `Value, selected_fs[`fsid_item]:""); } + new = HandleSubvol( new ); } } } @@ -709,7 +773,6 @@ } if( ret == `fstab_options ) { - new["mount"] = UI::QueryWidget( `id(`mount_point), `Value ); new = FstabOptions( old, new ); } if( ret == `subvol ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-storage-2.21.3/storage/src/include/ep-dialogs.ycp new/yast2-storage-2.21.4/storage/src/include/ep-dialogs.ycp --- old/yast2-storage-2.21.3/storage/src/include/ep-dialogs.ycp 2011-05-30 19:08:59.000000000 +0200 +++ new/yast2-storage-2.21.4/storage/src/include/ep-dialogs.ycp 2011-08-09 16:28:35.000000000 +0200 @@ -181,18 +181,16 @@ _("Do not mount partition")); } - term subvol = `Empty(); - if( data["used_fs"]:`unknown==`btrfs ) - { - subvol = `FrameWithMarginBox("", `PushButton( `id(`subvol), `opt(`hstretch), - // button text - _("Subvolume Handling"))); - } + term subvol = + `ReplacePoint( `id(`subvol_rp), + SubvolPart(data["used_fs"]:`unknown==`btrfs) ); list mountpoints = ProposeMountpoints( used_fs, mount ); - term contents = `HVSquash(`VStackFrames( - fmt, + term contents = `HVSquash( + `HBox( fmt, + `HSpacing(1), + `VStackFrames( `FrameWithMarginBox(_("Mounting Options"), `RadioButtonGroup(`id(`mount), `VBox( @@ -210,9 +208,10 @@ notmnt )) ), - subvol - ) - ); + subvol, + `VStretch() + )) + ); MiniWorkflow::SetContents(Greasemonkey::Transform(contents), MiniWorkflowStepFormatMountHelptext()); @@ -449,18 +448,6 @@ if (!data["format"]:false) data = filter(string key, any value, data, { return key != "fs_options"; }); - if( data["mount"]:""=="/" && data["used_fs"]:`unknown==`btrfs && - data["format"]:false ) - { - y2milestone( "before AddSubvolRoot subvol:%1", data["subvol"]:[] ); - list<map> lsc = filter( map s, data["subvol"]:[], ``(s["create"]:false)); - y2milestone( "before AddSubvolRoot list:%1", lsc ); - if( size(lsc)==0 ) - { - data = (map<string,any>)Storage::AddSubvolRoot( data ); - y2milestone( "after AddSubvolRoot subvol:%1", data["subvol"]:[] ); - } - } if (contains([`primary, `extended, `logical], data["type"]:`unknown)) if (data["fsid"]:0 != orig_data["fsid"]:0) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-storage-2.21.3/storage/src/include/ep-settings.ycp new/yast2-storage-2.21.4/storage/src/include/ep-settings.ycp --- old/yast2-storage-2.21.3/storage/src/include/ep-settings.ycp 2010-11-04 17:10:26.000000000 +0100 +++ new/yast2-storage-2.21.4/storage/src/include/ep-settings.ycp 2011-07-21 18:07:45.000000000 +0200 @@ -63,8 +63,8 @@ return `item(`id(item_id), label); }); - list<symbol> filesystems = filter(symbol fs, [ `ext2, `ext3, `ext4, `reiser, `xfs ], { - return FileSystems::IsSupported(fs) && !FileSystems::IsUnsupported(fs); + list<symbol> filesystems = filter(symbol fs, [ `ext2, `ext3, `ext4, `reiser, `xfs, `btrfs ], { + return FileSystems::IsSupported(fs) && !FileSystems::IsUnsupported(fs); }); list<term> filesystem_items = maplist(symbol fs, filesystems, { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-storage-2.21.3/storage/src/inst_target_part.ycp new/yast2-storage-2.21.4/storage/src/inst_target_part.ycp --- old/yast2-storage-2.21.3/storage/src/inst_target_part.ycp 2011-02-17 15:49:13.000000000 +0100 +++ new/yast2-storage-2.21.4/storage/src/inst_target_part.ycp 2011-08-10 16:48:27.000000000 +0200 @@ -9,7 +9,7 @@ * -Ask the user which partition to use. * -Check the input and return error-messages. * - * $Id: inst_target_part.ycp 63439 2011-02-17 14:49:12Z fehr $ + * $Id: inst_target_part.ycp 65304 2011-08-10 14:48:26Z fehr $ */ { textdomain "storage"; @@ -247,7 +247,8 @@ } else if( ret == `next ) { - if( win_partition != $[] ) + ok = true; + if( ok && win_partition != $[] ) { if( UI::QueryWidget( `id(`resize), `Value) == true) { @@ -354,6 +355,7 @@ // now loop through partitions and check // if the partition is selected + boolean all_del = true; partitions = maplist( map p, partitions, ``{ y2milestone( "p:%1", p ); @@ -382,21 +384,40 @@ y2milestone ("Trailing `free partition marked for deletion"); } p["delete"] = selection; + if( all_del && (!selection && p["type"]:`dummy!=`free)) + all_del = false; } return( p ); }); - partitions = StorageProposal::try_remove_sole_extended( partitions ); - - y2milestone ("partitions '%1'", partitions); - ok = create_partitions( targetMap, target, partitions ); - if( !ok ) + if( !all_del && StorageProposal::NeedNewDisklabel(target) ) { - string reason = _("Too few partitions are marked for removal -or the disk is too small. + Popup::Error( ia64_gpt_fix_text() ); + ok = false; + } + if( ok ) + { + partitions = StorageProposal::try_remove_sole_extended( partitions ); + y2milestone ("partitions '%1'", partitions); + + ok = create_partitions( targetMap, target, partitions ); + if( !ok ) + { + string reason = _("Too few partitions are marked for removal or +the disk is too small. To install Linux, select more partitions to remove or select a larger disk."); - display_error_box (reason); + display_error_box (reason); + } + list<map> pl = Storage::GetTargetMap()[target_is,"partitions"]:[]; + y2milestone( "proposed partitions:%1", pl ); + if( StorageProposal::GetProposalHome() && + size(filter( map p, pl, ``(p["mount"]:""=="/home")))==0 ) + { + ok = false; + string reason = _("Not enough space available to propose separate /home."); + Popup::Error( reason ); + } } } } // while (true) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-storage-2.21.3/storage/src/inst_target_selection.ycp new/yast2-storage-2.21.4/storage/src/inst_target_selection.ycp --- old/yast2-storage-2.21.3/storage/src/inst_target_selection.ycp 2010-03-24 11:37:44.000000000 +0100 +++ new/yast2-storage-2.21.4/storage/src/inst_target_selection.ycp 2011-08-10 16:48:06.000000000 +0200 @@ -12,7 +12,7 @@ * "target_is":<devicename> (key to "targets" map) * if custom, set "target_is":"CUSTOM" * - * $Id: inst_target_selection.ycp 61451 2010-03-23 10:40:49Z aschnell $ + * $Id: inst_target_selection.ycp 65303 2011-08-10 14:48:04Z fehr $ */ { textdomain "storage"; @@ -24,6 +24,7 @@ import "Partitions"; import "Wizard"; import "Storage"; + import "StorageFields"; include "partitioning/custom_part_helptexts.ycp"; @@ -230,9 +231,10 @@ Popup::Error( Partitions::RdonlyText( (string)option, true )); sym = `again; } - else if( (Partitions::EfiBoot() || Arch::ia64()) && targetMap[(string)option,"label"]:"gpt"!="gpt" ) + else if( Storage::IsUsedBy(targetMap[(string)option]:$[])) { - Popup::Error( ia64_gpt_text() ); + string s = StorageFields::UsedByString(targetMap[(string)option,"used_by",0]:$[] ); + Popup::Error( sformat(_("Disk %1 is in use by %2"), (string)option, s )); sym = `again; } else diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-storage-2.21.3/storage/src/modules/FileSystems.ycp new/yast2-storage-2.21.4/storage/src/modules/FileSystems.ycp --- old/yast2-storage-2.21.3/storage/src/modules/FileSystems.ycp 2011-07-04 15:34:11.000000000 +0200 +++ new/yast2-storage-2.21.4/storage/src/modules/FileSystems.ycp 2011-08-10 16:47:19.000000000 +0200 @@ -8,7 +8,7 @@ * These module contains the supported filesystems and their settings. * * - * $Id: FileSystems.ycp 64688 2011-07-01 07:55:54Z aschnell $ + * $Id: FileSystems.ycp 65302 2011-08-10 14:47:19Z fehr $ */ { module "FileSystems"; @@ -68,7 +68,7 @@ global list<string> crypt_m_points() { return [ "/", Partitions::BootMount(), "/usr" ]; } global const list<string> swap_m_points = [ "swap" ]; global const list<string> tmp_m_points = [ "/tmp", "/var/tmp" ]; - global string default_subvol = "A"; + global string default_subvol = "UNDEFINED"; list<string> suggest_m_points = []; list<string> suggest_tmp_points = []; @@ -999,8 +999,7 @@ { string ret = LibStorage::StorageInterface::getDefaultSubvolName(sint); y2milestone( "InitSlib libstorage default_subvol:"%1"", ret ); - ret = "@"; - //ret = ""; + ret = ""; LibStorage::StorageInterface::setDefaultSubvolName(sint,ret); ret = LibStorage::StorageInterface::getDefaultSubvolName(sint); default_subvol = ret; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-storage-2.21.3/storage/src/modules/Partitions.ycp new/yast2-storage-2.21.4/storage/src/modules/Partitions.ycp --- old/yast2-storage-2.21.3/storage/src/modules/Partitions.ycp 2011-04-21 11:17:09.000000000 +0200 +++ new/yast2-storage-2.21.4/storage/src/modules/Partitions.ycp 2011-07-21 18:07:45.000000000 +0200 @@ -6,7 +6,7 @@ * * Purpose: Provides information about partitions * - * $Id: Partitions.ycp 63848 2011-04-21 09:17:08Z fehr $ + * $Id: Partitions.ycp 64880 2011-07-19 10:14:06Z aschnell $ */ { module "Partitions"; @@ -120,7 +120,7 @@ if (default_fs == `unknown) { string tmp = (string) SCR::Read(.sysconfig.storage.DEFAULT_FS); - if (tmp == nil || !contains([ "ext2", "ext3", "ext4", "reiser", "xfs" ], tolower(tmp))) + if (tmp == nil || !contains([ "ext2", "ext3", "ext4", "reiser", "xfs", "btrfs" ], tolower(tmp))) tmp = "ext4"; default_fs = tosymbol(tolower(tmp)); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-storage-2.21.3/storage/src/modules/Storage.ycp new/yast2-storage-2.21.4/storage/src/modules/Storage.ycp --- old/yast2-storage-2.21.3/storage/src/modules/Storage.ycp 2011-07-14 13:56:08.000000000 +0200 +++ new/yast2-storage-2.21.4/storage/src/modules/Storage.ycp 2011-08-09 16:32:00.000000000 +0200 @@ -19,7 +19,7 @@ * wurde versucht "intelligent" zu gestallten und ist im einzelen bei den * entspechenden Funktionen n�her erkl�rt. * - * $Id: Storage.ycp 64808 2011-07-14 11:56:07Z fehr $ + * $Id: Storage.ycp 65294 2011-08-09 14:31:59Z fehr $ */ { module "Storage"; @@ -1220,6 +1220,9 @@ d["cyl_count"] = LibStorage::DiskInfo::swig_cyl_get(dinfo); d["sector_size"] = LibStorage::DiskInfo::swig_sectorSize_get(dinfo); d["label"] = LibStorage::DiskInfo::swig_disklabel_get(dinfo); + string tmp = LibStorage::DiskInfo::swig_orig_disklabel_get(dinfo); + if( size(tmp)>0 ) + d["orig_label"] = tmp; d["max_logical"] = LibStorage::DiskInfo::swig_maxLogical_get(dinfo); d["max_primary"] = LibStorage::DiskInfo::swig_maxPrimary_get(dinfo); @@ -1704,9 +1707,34 @@ ls = splitstring( LibStorage::BtrfsInfo::swig_devices_rem_get(info), "\n" ); if( size(ls)>0 ) c["devices_rem"] = ls; + list<map> li = []; + p["subvol"] = li; ls = splitstring(LibStorage::BtrfsInfo::swig_subvol_get(info), "\n"); if( !isempty(ls) ) - p["subvol"] = maplist( string s, ls, ``{ map m = $[ "name" : s ]; return( m ); }); + { + li = maplist( string s, ls, + ``{ map m = $[ "name" : s ]; return( m ); }); + p["subvol"] = li; + y2milestone( "subvol:%1", p["subvol"]:[] ); + } + ls = splitstring(LibStorage::BtrfsInfo::swig_subvol_add_get(info), "\n"); + if( !isempty(ls) ) + { + li = maplist( string s, ls, + ``{ map m = $[ "create":true, "name" : s ]; + return( m ); }); + p["subvol"] = union( p["subvol"]:[], li ); + y2milestone( "subvol:%1", p["subvol"]:[] ); + } + ls = splitstring(LibStorage::BtrfsInfo::swig_subvol_rem_get(info), "\n"); + if( !isempty(ls) ) + { + li = maplist( string s, ls, + ``{ map m = $[ "delete":true, "name" : s ]; + return( m ); }); + p["subvol"] = union( p["subvol"]:[], li ); + y2milestone( "subvol:%1", p["subvol"]:[] ); + } if( size(p["devices"]:[])+size(p["devices_add"]:[])>1 ) p["device"] = "UUID=" + p["uuid"]:""; c["partitions"] = add( c["partitions"]:[], p ); @@ -1738,7 +1766,7 @@ map toDiskMap( map disk, map cinfo ) { - list<string> l = [ "size_k", "cyl_size", "cyl_count", "sector_size", "label", "name", "device", + list<string> l = [ "size_k", "cyl_size", "cyl_count", "sector_size", "label", "orig_label", "name", "device", "max_logical", "max_primary", "type", "readonly", "transport", "iscsi", "used_by", "used_by_type", "used_by_device", "partitions", "dasdfmt", "udev_id", "udev_path" ]; @@ -2644,29 +2672,35 @@ y2milestone( "ChangeVolumeProperties cre:%1", cre ); while( ret==0 && size(rem)>0 ) { - changed = true; string pth = rem[0,"name"]:""; - ret = LibStorage::StorageInterface::removeSubvolume( sint, d, pth ); - if( ret<0 ) - y2error( "ChangeVolumeProperties sint ret:%1", ret ); - else + if( LibStorage::StorageInterface::existSubvolume( sint, d, pth )) { - y2milestone( "ChangeVolumeProperties sint ret:%1", ret ); - rem = remove( rem, 0 ); + changed = true; + ret = LibStorage::StorageInterface::removeSubvolume( sint, d, pth ); + if( ret<0 ) + y2error( "ChangeVolumeProperties sint ret:%1", ret ); + else + { + y2milestone( "ChangeVolumeProperties sint ret:%1", ret ); + } } + rem = remove( rem, 0 ); } while( ret==0 && size(cre)>0 ) { - changed = true; string pth = cre[0,"name"]:""; - ret = LibStorage::StorageInterface::createSubvolume( sint, d, pth ); - if( ret<0 ) - y2error( "ChangeVolumeProperties sint ret:%1", ret ); - else + if( !LibStorage::StorageInterface::existSubvolume( sint, d, pth )) { - y2milestone( "ChangeVolumeProperties sint ret:%1", ret ); - cre = remove( cre, 0 ); + changed = true; + ret = LibStorage::StorageInterface::createSubvolume( sint, d, pth ); + if( ret<0 ) + y2error( "ChangeVolumeProperties sint ret:%1", ret ); + else + { + y2milestone( "ChangeVolumeProperties sint ret:%1", ret ); + } } + cre = remove( cre, 0 ); } } if( ret==0 ) @@ -5074,12 +5108,12 @@ y2error("PackagesProposal::SetResolvables() for %1 failed", pkgs); Report::Error(sformat(_("Add the following resolvables failed: %1"), pkgs)); } - Pkg::PkgSolve(true); if( Stage::initial() ) { SaveUsedFs(); } + Pkg::PkgSolve(true); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-storage-2.21.3/storage/src/modules/StorageFields.ycp new/yast2-storage-2.21.4/storage/src/modules/StorageFields.ycp --- old/yast2-storage-2.21.3/storage/src/modules/StorageFields.ycp 2011-04-21 11:12:42.000000000 +0200 +++ new/yast2-storage-2.21.4/storage/src/modules/StorageFields.ycp 2011-08-10 16:47:50.000000000 +0200 @@ -57,7 +57,7 @@ } - string UsedByString(map<string, any> used_by) +global string UsedByString(map<string, any> used_by) { symbol type = used_by["type"]:`UB_NONE; string device = used_by["device"]:""; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-storage-2.21.3/storage/src/modules/StorageProposal.ycp new/yast2-storage-2.21.4/storage/src/modules/StorageProposal.ycp --- old/yast2-storage-2.21.3/storage/src/modules/StorageProposal.ycp 2011-06-01 18:36:29.000000000 +0200 +++ new/yast2-storage-2.21.4/storage/src/modules/StorageProposal.ycp 2011-07-28 12:39:19.000000000 +0200 @@ -333,6 +333,19 @@ return no_propose_disks; } +global boolean NeedNewDisklabel( map entry ) + { + boolean ret = Partitions::EfiBoot(); + if( ret ) + { + string lab = entry["orig_label"]:""; + if( size(lab)==0 ) + lab = entry["label"]:"gpt"; + ret = lab!="gpt"; + } + y2milestone( "NeedNewDisklabel dev:%1 ret:%2", entry["device"]:"", ret ); + return( ret ); + } boolean ignore_disk(string dev, map entry, boolean soft) { @@ -342,6 +355,10 @@ { ret = true; } + if( !ret && soft && NeedNewDisklabel(entry) ) + { + ret = true; + } if( !ret && soft && Arch::board_iseries () && search( dev, "/dev/sd" )==0 ) { ret = true; @@ -2800,6 +2817,7 @@ { list linux_pid = [ Partitions::fsid_native, Partitions::fsid_swap, Partitions::fsid_lvm, Partitions::fsid_raid ]; + list<string> remk = ["del_ptable", "disklabel"]; foreach( string s, ddev, ``{ tg[s,"partitions"] = @@ -2817,6 +2835,11 @@ p["linux"] = false; return( p ); }); + foreach( string k, remk, + ``{ + if( haskey( tg[s]:$[], k )) + tg[s] = remove( tg[s]:$[], k ); + }); }); return( tg ); } @@ -2994,7 +3017,6 @@ map opts = GetControlCfg(); list<string> ddev = get_disk_try_list( target, true ); string sol_disk = ""; - list modes = [ `free, `reuse, `remove, `resize, `desparate ]; map<string,boolean> valid = $[]; map<string,list> size_mb = listmap( string s, ddev, ``($[s:[]])); map solution = listmap( string s, ddev, ``($[s:[]])); @@ -3014,11 +3036,17 @@ ``{ target[s,"partitions"] = remove_p_settings( target[s,"partitions"]:[], [] ); + if( NeedNewDisklabel(target[s]:$[]) ) + { + target[s,"disklabel"] = "gpt"; + target[s,"del_ptable"] = true; + } target[s,"partitions"] = maplist( map p, target[s,"partitions"]:[], ``{ - if( !contains( Partitions::do_not_delete, - p["fsid"]:0 ) && + if( (NeedNewDisklabel(target[s]:$[]) || + !contains( Partitions::do_not_delete, + p["fsid"]:0 )) && Storage::CanDelete( p, target[s]:$[], false)) { if( usable_for_win_resize(p,false) ) @@ -3742,7 +3770,6 @@ } list<string> ddev = get_disk_try_list( target, true ); string sol_disk = ""; - list modes = [ `free, `remove, `resize, `desparate ]; map<string,boolean> valid = $[]; map<string,integer> size_mb = listmap( string s, ddev, ``($[s:0])); map<string,boolean> keep_vg = $[]; @@ -3763,11 +3790,17 @@ ``{ target[s,"partitions"] = remove_p_settings( target[s,"partitions"]:[], [] ); + if( NeedNewDisklabel(target[s]:$[]) ) + { + target[s,"disklabel"] = "gpt"; + target[s,"del_ptable"] = true; + } target[s,"partitions"] = maplist( map p, target[s,"partitions"]:[], ``{ - if( !contains( Partitions::do_not_delete, - p["fsid"]:0 ) && + if( (NeedNewDisklabel(target[s]:$[]) || + !contains( Partitions::do_not_delete, + p["fsid"]:0 )) && Storage::CanDelete( p, target[s]:$[], false)) { if( usable_for_win_resize(p,false) ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-storage-2.21.3/storage/src/storage_finish.ycp new/yast2-storage-2.21.4/storage/src/storage_finish.ycp --- old/yast2-storage-2.21.3/storage/src/storage_finish.ycp 2011-07-04 15:34:11.000000000 +0200 +++ new/yast2-storage-2.21.4/storage/src/storage_finish.ycp 2011-08-09 16:29:33.000000000 +0200 @@ -8,7 +8,7 @@ * Authors: * Jiri Srain <jsrain@suse.cz> * - * $Id: storage_finish.ycp 64510 2011-06-21 15:18:00Z aschnell $ + * $Id: storage_finish.ycp 65243 2011-08-05 12:42:32Z aschnell $ * */ @@ -78,7 +78,7 @@ if (part["used_fs"]:`unknown == `btrfs) { y2milestone("configuring snapper"); - SCR::Execute(.target.bash, "/usr/bin/snapper create-config /"); + SCR::Execute(.target.bash, "/usr/bin/snapper create-config --fstype=btrfs /"); SCR::Write(.sysconfig.yast2.USE_SNAPPER, "yes"); } } ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org