Hello community,
here is the log from the commit of package yast2-storage for openSUSE:Factory checked in at 2013-04-03 23:46:55
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-storage (Old)
and /work/SRC/openSUSE:Factory/.yast2-storage.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-storage", Maintainer is "ASchnell@suse.com"
Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-storage/yast2-storage.changes 2013-03-05 16:38:01.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.yast2-storage.new/yast2-storage.changes 2013-04-03 23:46:56.000000000 +0200
@@ -1,0 +2,28 @@
+Tue Mar 26 13:00:10 CET 2013 - fehr@suse.de
+
+- allow mountby id in /etc/fstab for md devices (bnc#811619)
+
+-------------------------------------------------------------------
+Wed Mar 20 16:37:24 CET 2013 - aschnell@suse.de
+
+- use consistent wording in messages (bnc#808541)
+
+-------------------------------------------------------------------
+Tue Mar 19 18:41:08 CET 2013 - fehr@suse.de
+
+- give more meaningful error message when resize is not supported
+ by underlying partition, e.g. on DASD (bnc#808721)
+
+-------------------------------------------------------------------
+Thu Mar 14 14:50:41 CET 2013 - fehr@suse.de
+
+- version 2.24.0
+- do not suggest to format /boot/efi in fstab import (bnc#809853)
+- button to demand swap suited for suspend to proposal (bnc#809190)
+
+-------------------------------------------------------------------
+Tue Mar 12 14:20:20 CET 2013 - fehr@suse.de
+
+- do not use codepage= option when mounting EFI boot (bnc#808028)
+
+-------------------------------------------------------------------
Old:
----
yast2-storage-2.23.9.tar.bz2
New:
----
yast2-storage-2.24.0.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-storage.spec ++++++
--- /var/tmp/diff_new_pack.YTE8s7/_old 2013-04-03 23:46:57.000000000 +0200
+++ /var/tmp/diff_new_pack.YTE8s7/_new 2013-04-03 23:46:57.000000000 +0200
@@ -17,7 +17,7 @@
Name: yast2-storage
-Version: 2.23.9
+Version: 2.24.0
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
++++++ yast2-storage-2.23.9.tar.bz2 -> yast2-storage-2.24.0.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-storage-2.23.9/VERSION new/yast2-storage-2.24.0/VERSION
--- old/yast2-storage-2.23.9/VERSION 2013-03-05 12:13:35.000000000 +0100
+++ new/yast2-storage-2.24.0/VERSION 2013-03-14 18:18:30.000000000 +0100
@@ -1 +1 @@
-2.23.9
+2.24.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-storage-2.23.9/configure new/yast2-storage-2.24.0/configure
--- old/yast2-storage-2.23.9/configure 2013-03-05 12:37:37.000000000 +0100
+++ new/yast2-storage-2.24.0/configure 2013-03-26 17:48:54.000000000 +0100
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for yast2-storage 2.23.9.
+# Generated by GNU Autoconf 2.69 for yast2-storage 2.24.0.
#
# Report bugs to http://bugs.opensuse.org/.
#
@@ -590,8 +590,8 @@
# Identity of this package.
PACKAGE_NAME='yast2-storage'
PACKAGE_TARNAME='yast2-storage'
-PACKAGE_VERSION='2.23.9'
-PACKAGE_STRING='yast2-storage 2.23.9'
+PACKAGE_VERSION='2.24.0'
+PACKAGE_STRING='yast2-storage 2.24.0'
PACKAGE_BUGREPORT='http://bugs.opensuse.org/'
PACKAGE_URL=''
@@ -1380,7 +1380,7 @@
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures yast2-storage 2.23.9 to adapt to many kinds of systems.
+\`configure' configures yast2-storage 2.24.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1451,7 +1451,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of yast2-storage 2.23.9:";;
+ short | recursive ) echo "Configuration of yast2-storage 2.24.0:";;
esac
cat <<\_ACEOF
@@ -1569,7 +1569,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-yast2-storage configure 2.23.9
+yast2-storage configure 2.24.0
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2022,7 +2022,7 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by yast2-storage $as_me 2.23.9, which was
+It was created by yast2-storage $as_me 2.24.0, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -2961,7 +2961,7 @@
# Define the identity of the package.
PACKAGE='yast2-storage'
- VERSION='2.23.9'
+ VERSION='2.24.0'
cat >>confdefs.h <<_ACEOF
@@ -3084,7 +3084,7 @@
-VERSION="2.23.9"
+VERSION="2.24.0"
RPMNAME="yast2-storage"
MAINTAINER="Arvin Schnell "
@@ -16825,7 +16825,7 @@
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by yast2-storage $as_me 2.23.9, which was
+This file was extended by yast2-storage $as_me 2.24.0, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -16891,7 +16891,7 @@
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-yast2-storage config.status 2.23.9
+yast2-storage config.status 2.24.0
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-storage-2.23.9/configure.in new/yast2-storage-2.24.0/configure.in
--- old/yast2-storage-2.23.9/configure.in 2013-03-05 12:37:27.000000000 +0100
+++ new/yast2-storage-2.24.0/configure.in 2013-03-26 17:48:42.000000000 +0100
@@ -3,7 +3,7 @@
dnl -- This file is generated by y2autoconf 2.23.2 - DO NOT EDIT! --
dnl (edit configure.in.in instead)
-AC_INIT(yast2-storage, 2.23.9, http://bugs.opensuse.org/, yast2-storage)
+AC_INIT(yast2-storage, 2.24.0, http://bugs.opensuse.org/, yast2-storage)
dnl Check for presence of file 'RPMNAME'
AC_CONFIG_SRCDIR([RPMNAME])
@@ -18,7 +18,7 @@
AM_INIT_AUTOMAKE(tar-ustar -Wno-portability)
dnl Important YaST2 variables
-VERSION="2.23.9"
+VERSION="2.24.0"
RPMNAME="yast2-storage"
MAINTAINER="Arvin Schnell "
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-storage-2.23.9/storage/src/include/auto_part_create.ycp new/yast2-storage-2.24.0/storage/src/include/auto_part_create.ycp
--- old/yast2-storage-2.23.9/storage/src/include/auto_part_create.ycp 2013-01-22 12:12:36.000000000 +0100
+++ new/yast2-storage-2.24.0/storage/src/include/auto_part_create.ycp 2013-03-14 18:06:37.000000000 +0100
@@ -107,7 +107,8 @@
}
else
{
- partitions = StorageProposal::get_proposal( size(r)>0, disk );
+ boolean have_swap = size(r)>0 && !StorageProposal::GetProposalSuspend();
+ partitions = StorageProposal::get_proposal( have_swap, disk );
}
}
y2milestone( "create_partitions %1", partitions );
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-storage-2.23.9/storage/src/include/auto_part_prepare.ycp new/yast2-storage-2.24.0/storage/src/include/auto_part_prepare.ycp
--- old/yast2-storage-2.23.9/storage/src/include/auto_part_prepare.ycp 2013-01-22 12:12:36.000000000 +0100
+++ new/yast2-storage-2.24.0/storage/src/include/auto_part_prepare.ycp 2013-03-14 18:06:37.000000000 +0100
@@ -48,7 +48,7 @@
bytes_per_unit, disk_size );
integer size_of_boot = Partitions::ProposedBootsize();
- integer size_of_swap = 1024 * 1024 * Partitions::SwapSizeMb(0);
+ integer size_of_swap = 1024 * 1024 * Partitions::SwapSizeMb(0,StorageProposal::GetProposalSuspend());
// The minimum size needed to install a default system
integer required_size = 1500 * 1024 * 1024 + size_of_boot + size_of_swap;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-storage-2.23.9/storage/src/include/custom_part_check_generated.ycp new/yast2-storage-2.24.0/storage/src/include/custom_part_check_generated.ycp
--- old/yast2-storage-2.23.9/storage/src/include/custom_part_check_generated.ycp 2013-01-22 12:12:36.000000000 +0100
+++ new/yast2-storage-2.24.0/storage/src/include/custom_part_check_generated.ycp 2013-03-14 18:06:37.000000000 +0100
@@ -213,7 +213,8 @@
}
if( !part["format"]:false && part["used_fs"]:`unknown!=`nfs &&
- FileSystems::IsSystemMp( part["mount"]:"", false ) )
+ FileSystems::IsSystemMp( part["mount"]:"", false ) &&
+ part["mount"]:""!="/boot/efi" )
{
partition_mounted_but_not_formated = true;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-storage-2.23.9/storage/src/include/custom_part_dialogs.ycp new/yast2-storage-2.24.0/storage/src/include/custom_part_dialogs.ycp
--- old/yast2-storage-2.23.9/storage/src/include/custom_part_dialogs.ycp 2013-02-28 12:41:35.000000000 +0100
+++ new/yast2-storage-2.24.0/storage/src/include/custom_part_dialogs.ycp 2013-03-26 13:06:36.000000000 +0100
@@ -627,7 +627,8 @@
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[`id] = (tmp && size(new["udev_id"]:[])>0) ||
+ substring(new["device"]:"",0,7)=="/dev/md";
enab[`path] = tmp && size(new["udev_path"]:"")>0;
y2milestone( "FstabOptions enab %1", enab );
UI::ChangeWidget( `id(`label), `Enabled, enab[`label]:false );
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-storage-2.23.9/storage/src/include/ep-dialogs.ycp new/yast2-storage-2.24.0/storage/src/include/ep-dialogs.ycp
--- old/yast2-storage-2.23.9/storage/src/include/ep-dialogs.ycp 2013-01-22 12:12:36.000000000 +0100
+++ new/yast2-storage-2.24.0/storage/src/include/ep-dialogs.ycp 2013-03-20 12:16:36.000000000 +0100
@@ -661,15 +661,25 @@
map possible = Storage::IsResizable(data);
y2milestone( "DlgResize data: %1", data );
- if (!data["format"]:false && !possible["shrink"]:false && !possible["extend"]:false)
- {
+ string txt="";
+ if( !possible["device"]:true )
+ {
// popup text
- Popup::Message(_("
+ txt = _("Resize not supported by underlying device.");
+ }
+ else if (!data["format"]:false && !possible["shrink"]:false && !possible["extend"]:false)
+ {
+ // popup text
+ txt = _("
You cannot resize the selected partition because the file system
on this partition does not support resizing.
-"));
+");
+ }
+ if( !isempty(txt) )
+ {
+ Popup::Message(txt);
return false;
- }
+ }
integer cyl_size = 0;
integer free_cyl_after = 0;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-storage-2.23.9/storage/src/include/ep-graph.ycp new/yast2-storage-2.24.0/storage/src/include/ep-graph.ycp
--- old/yast2-storage-2.23.9/storage/src/include/ep-graph.ycp 2013-01-22 12:12:36.000000000 +0100
+++ new/yast2-storage-2.24.0/storage/src/include/ep-graph.ycp 2013-03-20 16:41:37.000000000 +0100
@@ -63,7 +63,7 @@
`Graph(`id(`graph), `opt(`notify, `notifyContextMenu), filename, "dot"),
`HBox(
// button text
- `PushButton(`id(`export), _("Export Device Graph...")),
+ `PushButton(`id(`save), _("Save Device Graph...")),
`HStretch()
)
))
@@ -124,7 +124,7 @@
}
break;
- case `export:
+ case `save:
{
string filename = UI::AskForSaveFileName("/tmp", "*.gv", "Save as...");
if (filename != nil)
@@ -155,7 +155,7 @@
`Graph(`id(`graph), `opt(`notify, `notifyContextMenu), filename, "dot"),
`HBox(
// button text
- `PushButton(`id(`export), _("Export Mount Graph...")),
+ `PushButton(`id(`save), _("Save Mount Graph...")),
`HStretch()
)
))
@@ -198,7 +198,7 @@
}
break;
- case `export:
+ case `save:
{
string filename = UI::AskForSaveFileName("/tmp", "*.gv", "Save as...");
if (filename != nil)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-storage-2.23.9/storage/src/include/ep-import.ycp new/yast2-storage-2.24.0/storage/src/include/ep-import.ycp
--- old/yast2-storage-2.23.9/storage/src/include/ep-import.ycp 2013-01-22 12:12:36.000000000 +0100
+++ new/yast2-storage-2.24.0/storage/src/include/ep-import.ycp 2013-03-14 18:06:37.000000000 +0100
@@ -213,7 +213,7 @@
if (dev_fstab == part_device)
{
partition["mount"] = mount_fstab;
- if (format_sys && FileSystems::IsSystemMp(mount_fstab, false))
+ if (format_sys && FileSystems::IsSystemMp(mount_fstab, false) && mount_fstab!="/boot/efi")
partition["format"] = true;
if (format_sys && partition["mount"]:"" == "/" &&
partition["detected_fs"]:`unknown == `BTRFS)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-storage-2.23.9/storage/src/include/ep-lvm-dialogs.ycp new/yast2-storage-2.24.0/storage/src/include/ep-lvm-dialogs.ycp
--- old/yast2-storage-2.23.9/storage/src/include/ep-lvm-dialogs.ycp 2013-02-18 15:26:56.000000000 +0100
+++ new/yast2-storage-2.24.0/storage/src/include/ep-lvm-dialogs.ycp 2013-03-21 15:16:35.000000000 +0100
@@ -714,8 +714,10 @@
// ChangeVolumeProperties and thus addLogicalVolume need the device
data["device"] = "/dev/" + vg_name + "/" + data["name"]:"";
- data = remove( data, "used_pool" );
- data = remove( data, "pool" );
+ if( haskey(data, "used_pool"))
+ data = remove( data, "used_pool" );
+ if( haskey(data, "pool"))
+ data = remove( data, "pool" );
if( (boolean)UI::QueryWidget(`id(`pool), `Value) )
data["pool"] = true;
if( (boolean)UI::QueryWidget(`id(`thin), `Value) )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-storage-2.23.9/storage/src/inst_disk_proposal.ycp new/yast2-storage-2.24.0/storage/src/inst_disk_proposal.ycp
--- old/yast2-storage-2.23.9/storage/src/inst_disk_proposal.ycp 2013-01-22 12:12:36.000000000 +0100
+++ new/yast2-storage-2.24.0/storage/src/inst_disk_proposal.ycp 2013-03-14 18:06:37.000000000 +0100
@@ -162,6 +162,17 @@
}
}
+boolean EnableSuspend()
+ {
+ list swaps = Storage::GetCreatedSwaps();
+ integer susps = Partitions::SwapSizeMb(0,true);
+ boolean ret = size(swaps)==1 && swaps[0,"size_k"]:0/1024 targetMap = Storage::GetTargetMap();
if( Mode::test() && size(targetMap)==0 )
@@ -307,6 +318,7 @@
Wizard::SetTitleIcon( "yast-partitioning" );
UI::ChangeWidget(`id(`encrypt), `Enabled, StorageProposal::GetProposalLvm());
+ UI::ChangeWidget(`id(`suspend), `Enabled, EnableSuspend() );
repeat
{
@@ -318,7 +330,7 @@
if( ret == `abort && Popup::ReallyAbort(true) )
return `abort;
- if( contains( [ `lvm, `home, `btrfs, `encrypt ], ret ) )
+ if( contains( [ `lvm, `home, `btrfs, `encrypt, `suspend ], ret ) )
{
val = (boolean) UI::QueryWidget(`id(ret), `Value);
if( AskOverwriteChanges() )
@@ -405,6 +417,9 @@
StorageProposal::GetProposalHome() );
UI::ChangeWidget(`id(`btrfs), `Value,
StorageProposal::GetProposalBtrfs() );
+ UI::ChangeWidget(`id(`suspend), `Value,
+ StorageProposal::GetProposalSuspend() );
+ UI::ChangeWidget(`id(`suspend), `Enabled, EnableSuspend() );
}
} until ( ret == `next || ret == `back || ret == `cancel );
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-storage-2.23.9/storage/src/inst_target_part.ycp new/yast2-storage-2.24.0/storage/src/inst_target_part.ycp
--- old/yast2-storage-2.23.9/storage/src/inst_target_part.ycp 2013-01-22 12:12:36.000000000 +0100
+++ new/yast2-storage-2.24.0/storage/src/inst_target_part.ycp 2013-03-14 18:06:37.000000000 +0100
@@ -237,6 +237,10 @@
UI::ChangeWidget( `id(`full), `Enabled, false );
UI::ChangeWidget(`id(`encrypt), `Enabled, (boolean) UI::QueryWidget(`id(`lvm), `Value));
+ boolean susp_enab = Partitions::SwapSizeMb(0,false) opt = $[
// label text
- `widget : `TextEntry(`id("opt_arbitrary"), _("Arbitrary Option &Value"), ""),
+ `widget : `TextEntry(`id("opt_arbitrary"), `opt(`hstretch), _("Arbitrary Option &Value"), ""),
`query_key : "opt_arbitrary",
`invalid_chars : "\t ",
`error_text : _("Invalid characters in arbitrary option value. Do not use spaces or tabs. Try again."),
@@ -1322,10 +1322,11 @@
global define boolean IsSystemMp( string mount, boolean prefix )
``{
- boolean ret = contains( system_m_points(), mount );
+ list<string> mp = (list<string>)union(system_m_points(),["/boot"]);
+ boolean ret = contains( mp, mount );
if( !ret && prefix )
{
- list<string> mp = filter(string s, system_m_points(), ``(s!="/") );
+ mp = filter(string s, mp, ``(s!="/") );
foreach(string s, mp,
``{
ret = ret || search( mount, s + "/" )==0;
@@ -1396,7 +1397,8 @@
else if( !Arch::ia64() && contains( [`vfat, `ntfs], fsys ) )
{
fst_default = "";
- if( substring(part["mount"]:"",0,5)!="/boot" )
+ boolean is_boot = substring(part["mount"]:"",0,5)=="/boot";
+ if( !is_boot )
fst_default = "users,gid=users";
string enc = LangTypicalEncoding();
string code = Encoding::GetCodePage(enc);
@@ -1421,7 +1423,7 @@
fst_default = fst_default + ",locale=" + deletechars(sl[1]:"", "\"" );
}
}
- if( size(code)>0 && code != "437" && fsys!=`ntfs )
+ if( size(code)>0 && code != "437" && fsys!=`ntfs && !is_boot)
{
fst_default = fst_default + ",codepage=" + code;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-storage-2.23.9/storage/src/modules/Partitions.ycp new/yast2-storage-2.24.0/storage/src/modules/Partitions.ycp
--- old/yast2-storage-2.23.9/storage/src/modules/Partitions.ycp 2013-02-15 10:33:44.000000000 +0100
+++ new/yast2-storage-2.24.0/storage/src/modules/Partitions.ycp 2013-03-14 18:06:38.000000000 +0100
@@ -73,6 +73,7 @@
integer fsid_boot = 0;
integer boot_cyl = 0;
string boot_mount_point = "";
+ integer memory_size = 0;
global boolean no_fsid_menu = Arch::s390 ();
@@ -362,47 +363,42 @@
return( !IsDosWinNtPartition( fsid ) && fsid==fsid_swap );
}
-global integer SwapSizeMb( integer slot_size )
+integer SwapSizeMbforSwap( integer slot_size )
{
- map mem_info_map = (map) SCR::Read(.proc.meminfo);
- integer mem = mem_info_map["memtotal"]:0 / 1024;
- y2milestone("mem_info_map:%1 mem:%2", mem_info_map, mem);
-
- // a good approach swap == mem x 2
integer swap_size = 0;
if( slot_size==0 )
{
- if( mem <= 256 )
+ if( memory_size <= 256 )
{
- swap_size = mem * 2;
+ swap_size = memory_size * 2;
}
else
{
- swap_size = mem + mem/2;
+ swap_size = memory_size + memory_size/2;
}
}
else
{
- if( mem * 9 < slot_size )
+ if( memory_size * 9 < slot_size )
{
- swap_size = mem * 2;
+ swap_size = memory_size * 2;
}
- else if( mem * 5 < slot_size )
+ else if( memory_size * 5 < slot_size )
{
- swap_size = mem;
+ swap_size = memory_size;
}
- else if( mem * 3 < slot_size )
+ else if( memory_size * 3 < slot_size )
{
- swap_size = mem / 2;
+ swap_size = memory_size / 2;
}
- else if( mem * 2 < slot_size )
+ else if( memory_size * 2 < slot_size )
{
- swap_size = mem / 3;
+ swap_size = memory_size / 3;
}
else
{
- swap_size = mem / 4;
+ swap_size = memory_size / 4;
}
}
@@ -422,32 +418,57 @@
// 10G -> 512MB
// 40G -> 1GB
- if( slot_size > (40 * 1024) && (swap_size + mem) < 1024 )
+ if( slot_size > (40 * 1024) && (swap_size + memory_size) < 1024 )
{
- swap_size = 1024 - mem;
+ swap_size = 1024 - memory_size;
}
- else if( slot_size > (10 * 1024) && (swap_size + mem) < 512 )
+ else if( slot_size > (10 * 1024) && (swap_size + memory_size) < 512 )
{
- swap_size = 512 - mem;
+ swap_size = 512 - memory_size;
}
- else if( slot_size > (2 * 1024) && (swap_size + mem) < 256 )
+ else if( slot_size > (2 * 1024) && (swap_size + memory_size) < 256 )
{
- swap_size = 256 - mem;
+ swap_size = 256 - memory_size;
}
- else if( slot_size > (1 * 1024) && (swap_size + mem) < 128 )
+ else if( slot_size > (1 * 1024) && (swap_size + memory_size) < 128 )
{
- swap_size = 128 - mem;
+ swap_size = 128 - memory_size;
}
if( swap_size == 0 )
{
swap_size = -1;
}
- y2milestone( "SwapSizeMb mem %1 slot_size %2 swap_size %3", mem,
- slot_size, swap_size );
+ y2milestone( "SwapSizeMbforSwap mem %1 slot_size %2 swap_size %3",
+ memory_size, slot_size, swap_size );
return( swap_size );
}
+integer SwapSizeMbforSuspend()
+ {
+ integer ret = (memory_size+511)/512*512;
+ y2milestone( "SwapSizeMbforSuspend %1", ret );
+ return( ret );
+ }
+
+global integer SwapSizeMb( integer slot_size, boolean suspend )
+ {
+ if( memory_size==0 )
+ {
+ map mem_info_map = (map) SCR::Read(.proc.meminfo);
+ memory_size = mem_info_map["memtotal"]:0 / 1024;
+ y2milestone("mem_info_map:%1 mem:%2", mem_info_map, memory_size);
+ }
+ integer sw = SwapSizeMbforSwap(slot_size);
+ if( suspend )
+ {
+ integer news = SwapSizeMbforSuspend();
+ if( news>sw )
+ sw = news;
+ }
+ y2milestone( "SwapSizeMb suspend:%1 ret:%2", suspend, sw );
+ return( sw );
+ }
global define boolean IsResizable( integer fsid )
``{
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-storage-2.23.9/storage/src/modules/Storage.ycp new/yast2-storage-2.24.0/storage/src/modules/Storage.ycp
--- old/yast2-storage-2.23.9/storage/src/modules/Storage.ycp 2013-02-27 18:43:36.000000000 +0100
+++ new/yast2-storage-2.24.0/storage/src/modules/Storage.ycp 2013-03-20 12:16:36.000000000 +0100
@@ -5372,6 +5372,9 @@
ret = FileSystems::IsResizable(part["used_fs"]:`unknown);
}
}
+ ret["device"] = Partitions::IsResizable(part["fsid"]:0) &&
+ substring(part["device"]:"",0,9)!="/dev/dasd";
+ y2milestone( "sub:%1 is:%2", substring(part["device"]:"",0,9), substring(part["device"]:"",0,9)!="/dev/dasd" );
y2milestone( "IsResizable part:%1 ret:%2", part, ret );
return( ret );
}
@@ -6339,4 +6342,17 @@
return( ret );
}
+global list GetCreatedSwaps()
+ {
+ map tg = GetTargetMap();
+ list ret = [];
+ foreach( string k, map d, tg,
+ {
+ ret = union( ret,
+ filter( map p, d["partitions"]:[],
+ ``(p["create"]:false&&p["mount"]:""=="swap")));
+ });
+ return( ret );
+ }
+
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-storage-2.23.9/storage/src/modules/StorageProposal.ycp new/yast2-storage-2.24.0/storage/src/modules/StorageProposal.ycp
--- old/yast2-storage-2.23.9/storage/src/modules/StorageProposal.ycp 2013-02-11 18:28:19.000000000 +0100
+++ new/yast2-storage-2.24.0/storage/src/modules/StorageProposal.ycp 2013-03-14 18:06:38.000000000 +0100
@@ -72,6 +72,7 @@
boolean proposal_lvm = false;
boolean proposal_encrypt = false;
boolean proposal_btrfs = false;
+ boolean proposal_suspend = false;
string proposal_password = "";
boolean proposal_create_vg = false;
@@ -128,6 +129,17 @@
y2milestone("SetProposalBtrfs val:%1", val);
}
+ global boolean GetProposalSuspend()
+ {
+ return proposal_suspend;
+ }
+
+ global void SetProposalSuspend(boolean val)
+ {
+ proposal_suspend = val;
+ y2milestone("SetProposalSuspend val:%1", val);
+ }
+
global string GetProposalPassword()
{
return proposal_password;
@@ -147,11 +159,12 @@
SetProposalLvm(cfg_xml["prop_lvm"]:false);
SetProposalEncrypt(false);
SetProposalPassword("");
+ SetProposalSuspend(cfg_xml["suspend"]:false);
}
SetProposalBtrfs(cfg_xml["btrfs"]:false);
- y2milestone("SetProposalDefault home:%1 lvm:%2 encypt:%3 home_only:%4 btrfs:%5",
+ y2milestone("SetProposalDefault home:%1 lvm:%2 encypt:%3 home_only:%4 btrfs:%5 suspend:%6",
proposal_home, proposal_lvm, proposal_encrypt, home_only,
- proposal_btrfs);
+ proposal_btrfs,proposal_suspend);
}
@@ -202,7 +215,8 @@
cfg_xml["btrfs_increase_percentage"] = itmp;
if (cfg_xml["btrfs_increase_percentage"]:0 == nil || cfg_xml["btrfs_increase_percentage"]:0 < 0)
cfg_xml["btrfs_increase_percentage"] = 100;
-
+ btmp = ProductFeatures::GetBooleanFeature("partitioning", "swap_for_suspend");
+ cfg_xml["suspend"] = btmp ? true : false;
SetProposalDefault(false);
y2milestone("GetControlCfg cfg_xml:%1", cfg_xml);
}
@@ -2276,7 +2290,7 @@
if( partition["size"]:0 == -1 && partition["mount"]:"" == "swap" )
{
- partition["size"] = 1024*1024*Partitions::SwapSizeMb(0);
+ partition["size"] = 1024*1024*Partitions::SwapSizeMb(0,StorageProposal::GetProposalSuspend());
}
if( partition["mount"]:"" == Partitions::BootMount() )
{
@@ -2495,7 +2509,7 @@
y2milestone( "part %1", part );
if( part["size"]:0 == -1 && part["mount"]:"" == "swap" )
{
- part["size"] = 1024*1024*Partitions::SwapSizeMb(0);
+ part["size"] = 1024*1024*Partitions::SwapSizeMb(0,StorageProposal::GetProposalSuspend());
}
if( part["mount"]:"" == Partitions::BootMount() )
{
@@ -2755,7 +2769,8 @@
list<integer> get_swap_sizes(integer space)
{
- list<integer> l = [ Partitions::SwapSizeMb(0), Partitions::SwapSizeMb(space) ];
+ list<integer> l = [ Partitions::SwapSizeMb(0,StorageProposal::GetProposalSuspend()),
+ Partitions::SwapSizeMb(space,StorageProposal::GetProposalSuspend()) ];
y2milestone("get_swap_sizes space %1 ret %2", space, l);
return l;
}
@@ -4231,6 +4246,12 @@
// Label text
_("Use &Btrfs as Default File System"),
GetProposalBtrfs() ))));
+ vb = add( vb, `VSpacing(space) );
+ vb = add( vb,
+ `Left(`HBox(`HSpacing(3), `CheckBox(`id(`suspend), `opt(`notify),
+ // Label text
+ _("Enlarge &Swap for Suspend"),
+ GetProposalSuspend() ))));
term frame = `VBox( `VSpacing(3*space),
`HVCenter( `VBox( `Left(`Label( `opt(`boldFont), _("Proposal settings"))), `VSpacing(0.3), `HVCenter(vb)) ));
//`HVCenter(`Frame( _("Proposal settings"), `HVCenter(vb) )));
@@ -4354,6 +4375,11 @@
StorageProposal::SetProposalHome(val);
ret = true;
break;
+
+ case `suspend:
+ StorageProposal::SetProposalSuspend(val);
+ ret = true;
+ break;
}
return( ret );
}
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org