Hello community,
here is the log from the commit of package yast2-storage for openSUSE:Factory checked in at 2011-10-27 19:34:53
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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 2011-10-21 16:48:12.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.yast2-storage.new/yast2-storage.changes 2011-10-28 15:33:26.000000000 +0200
@@ -1,0 +2,13 @@
+Tue Oct 25 16:08:52 CEST 2011 - fehr@suse.de
+
+- version 2.21.11
+- add function IsDeviceOnNetwork to be used by Network module
+ (bnc#726057)
+
+-------------------------------------------------------------------
+Mon Oct 24 14:11:58 CEST 2011 - fehr@suse.de
+
+- fix missing proposal for /home (bnc#725577)
+- detect new transport type FcoE (bnc#726057)
+
+-------------------------------------------------------------------
Old:
----
yast2-storage-2.21.10.tar.bz2
New:
----
yast2-storage-2.21.11.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-storage.spec ++++++
--- /var/tmp/diff_new_pack.EHiDKu/_old 2011-10-28 15:33:34.000000000 +0200
+++ /var/tmp/diff_new_pack.EHiDKu/_new 2011-10-28 15:33:34.000000000 +0200
@@ -19,11 +19,11 @@
Name: yast2-storage
-Version: 2.21.10
+Version: 2.21.11
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-storage-2.21.10.tar.bz2
+Source0: yast2-storage-2.21.11.tar.bz2
Prefix: /usr
@@ -31,7 +31,7 @@
License: GPL-2.0+
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.4 yast2 >= 2.19.4 yast2-core-devel >= 2.18.1 yast2-devtools
+BuildRequires: libstorage-devel >= 2.21.11 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.10
+%setup -n yast2-storage-2.21.11
%build
%{prefix}/bin/y2tool y2autoconf
++++++ yast2-storage-2.21.10.tar.bz2 -> yast2-storage-2.21.11.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-storage-2.21.10/VERSION new/yast2-storage-2.21.11/VERSION
--- old/yast2-storage-2.21.10/VERSION 2011-10-20 17:39:44.000000000 +0200
+++ new/yast2-storage-2.21.11/VERSION 2011-10-24 16:14:57.000000000 +0200
@@ -1 +1 @@
-2.21.10
+2.21.11
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-storage-2.21.10/storage/src/include/ep-hd.ycp new/yast2-storage-2.21.11/storage/src/include/ep-hd.ycp
--- old/yast2-storage-2.21.10/storage/src/include/ep-hd.ycp 2011-10-17 13:00:30.000000000 +0200
+++ new/yast2-storage-2.21.11/storage/src/include/ep-hd.ycp 2011-10-24 14:15:54.000000000 +0200
@@ -209,7 +209,9 @@
fields = (list<symbol>) merge(fields, [ `heading_md, `raid_type, `chunk_size, `parity_algorithm ]);
}
- if (contains([ `CT_DISK ], ctype) && target_map[device, "transport"]:`unknown == `fc)
+ if (contains([ `CT_DISK ], ctype) &&
+ (target_map[device, "transport"]:`unknown == `fc ||
+ target_map[device, "transport"]:`unknown == `fcoe ))
{
fields = (list<symbol>) merge(fields, [`heading_fc, `fc_wwpn, `fc_port_id, `fc_fcp_lun ]);
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-storage-2.21.10/storage/src/modules/Storage.ycp new/yast2-storage-2.21.11/storage/src/modules/Storage.ycp
--- old/yast2-storage-2.21.10/storage/src/modules/Storage.ycp 2011-10-05 18:09:43.000000000 +0200
+++ new/yast2-storage-2.21.11/storage/src/modules/Storage.ycp 2011-10-26 00:27:52.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 66275 2011-10-05 16:09:42Z fehr $
+ * $Id: Storage.ycp 66586 2011-10-25 22:27:50Z fehr $
*/
{
module "Storage";
@@ -232,7 +232,8 @@
LibStorage::SAS() : `sas,
LibStorage::SATA() : `sata,
LibStorage::SPI() : `spi,
- LibStorage::USB() : `usb
+ LibStorage::USB() : `usb,
+ LibStorage::FCOE() : `fcoe
]
];
@@ -509,6 +510,40 @@
return LibStorage::StorageInterface::getIgnoreFstab(sint, device, val) == 0;
}
+symbol toSymbol( map conv, integer val )
+ {
+ return( conv["m",val]:(conv["def_sym"]:`invalid_conv_map) );
+ }
+
+integer fromSymbol( map conv, symbol val )
+ {
+ integer ret = conv["def_int"]:-1;
+ foreach( integer i, symbol s, conv["m"]:$[],
+ ``{
+ if( s==val )
+ ret = i;
+ });
+ return( ret );
+ }
+
+global boolean GetContVolInfo(string device, map& info)
+ {
+ any tmp = LibStorage::ContVolInfo::new("LibStorage::ContVolInfo");
+ if (LibStorage::StorageInterface::getContVolInfo(sint, device, tmp) != 0)
+ return false;
+
+ info = $[ "ctype" : toSymbol(conv_ctype, LibStorage::ContVolInfo::swig_ctype_get(tmp)),
+ "cname" : LibStorage::ContVolInfo::swig_cname_get(tmp),
+ "cdevice" : LibStorage::ContVolInfo::swig_cdevice_get(tmp),
+ "vname" : LibStorage::ContVolInfo::swig_vname_get(tmp),
+ "vdevice" : LibStorage::ContVolInfo::swig_vdevice_get(tmp),
+ "num" : LibStorage::ContVolInfo::swig_num_get(tmp) ];
+
+ y2milestone("GetContVolInfo device:%1 info:%2", device, info);
+ return true;
+ }
+
+
global define map GetTargetMap();
global define void SetTargetMap( map target );
@@ -518,8 +553,9 @@
string key );
-define list<map> GetDiskPartitionTg( string device, map tg )
+define list<map> GetDiskPartitionTg( string inpdev, map tg )
``{
+ string device = inpdev;
list<map> ret = [];
integer dlen = 0;
boolean as_string = false;
@@ -739,6 +775,23 @@
{
tmp["nr"] = "";
}
+ if( size(tg)>0 && !haskey( tg, tmp["disk"]:"" ))
+ {
+ y2milestone( "GetDiskPartitionTg tmp:%1", tmp );
+ map r = $[];
+ if( GetContVolInfo( inpdev, r ))
+ {
+ y2milestone( "GetDiskPartitionTg rtmp:%1", r );
+ if( haskey( tg, r["cdevice"]:"" ))
+ {
+ tmp["disk"] = r["cdevice"]:"";
+ if( r["num"]:-1 != -1 )
+ tmp["nr"] = r["num"]:-1;
+ else
+ tmp["nr"] = r["vname"]:"";
+ }
+ }
+ }
ret = [ tmp ];
}
else
@@ -1187,22 +1240,6 @@
return( ret );
}
-symbol toSymbol( map conv, integer val )
- {
- return( conv["m",val]:(conv["def_sym"]:`invalid_conv_map) );
- }
-
-integer fromSymbol( map conv, symbol val )
- {
- integer ret = conv["def_int"]:-1;
- foreach( integer i, symbol s, conv["m"]:$[],
- ``{
- if( s==val )
- ret = i;
- });
- return( ret );
- }
-
global define boolean CheckBackupState( string who )
{
y2milestone( "CheckBackupStates who:%1", who );
@@ -1848,7 +1885,7 @@
}
else
{
- if( haskey( mp, k ));
+ if( haskey( mp, k ))
{
y2milestone( "HandleBtrfsSimpleVolumes remove key %1", k );
tg = DelPartitionData( tg, p["device"]:"", k );
@@ -2226,23 +2263,6 @@
}
- global boolean GetContVolInfo(string device, map& info)
- {
- any tmp = LibStorage::ContVolInfo::new("LibStorage::ContVolInfo");
- if (LibStorage::StorageInterface::getContVolInfo(sint, device, tmp) != 0)
- return false;
-
- info = $[ "ctype" : toSymbol(conv_ctype, LibStorage::ContVolInfo::swig_ctype_get(tmp)),
- "cname" : LibStorage::ContVolInfo::swig_cname_get(tmp),
- "cdevice" : LibStorage::ContVolInfo::swig_cdevice_get(tmp),
- "vname" : LibStorage::ContVolInfo::swig_vname_get(tmp),
- "vdevice" : LibStorage::ContVolInfo::swig_vdevice_get(tmp) ];
-
- y2milestone("GetContVolInfo device:%1 info:%2", device, info);
- return true;
- }
-
-
global boolean IsInstallationSource(string device)
{
if (part_insts == nil)
@@ -6079,4 +6099,92 @@
return( ret );
}
+list<string> GetUsedDisks( string device )
+ {
+ y2milestone( "GetUsedDisks device:%1", device );
+ list<string> ret = [];
+ map tg = GetTargetMap();
+ map info = $[];
+ if( GetContVolInfo(device, info))
+ {
+ y2milestone( "GetUsedDisks info:%1", info );
+ list<string> to_visit = [ device ];
+ list<string> visited_devs = [];
+ do
+ {
+ visited_devs = add( visited_devs, to_visit[0]:"" );
+ to_visit = remove( to_visit, 0 );
+ list<string> add_list = [];
+ if( info["ctype"]:`CT_UNKNOWN==`CT_DISK )
+ {
+ if( !contains( ret, info["cdevice"]:"" ))
+ ret = add( ret, info["cdevice"]:"" );
+ }
+ else if( info["ctype"]:`CT_UNKNOWN==`CT_NFS )
+ {
+ ret = add( ret, "/dev/nfs" );
+ }
+ else if( info["ctype"]:`CT_UNKNOWN==`CT_BTRFS )
+ {
+ map bt = find( map p, tg["/dev/btrfs","partitions"]:[],
+ ``(contains( p["devices"]:[], info["vdevice"]:"" )));
+ y2milestone( "GetUsedDisks bt:%1", bt );
+ if( bt!=nil )
+ add_list = bt["devices"]:[];
+ }
+ else
+ {
+ add_list = tg[info["cdevice"]:"","devices"]:[];
+ }
+ if( size(add_list)>0 )
+ y2milestone( "GetUsedDisks add_list:%1", add_list );
+ foreach( string s, add_list,
+ ``{
+ if( !contains( visited_devs, s ) && !contains( to_visit, s ) &&
+ !contains( ret, s ))
+ to_visit = add( to_visit, s );
+ });
+ y2milestone( "GetUsedDisks to_visit:%1", to_visit );
+ while( size(to_visit)>0 && !GetContVolInfo(to_visit[0]:"", info))
+ {
+ visited_devs = add( visited_devs, to_visit[0]:"" );
+ to_visit = remove( to_visit, 0 );
+ }
+ if( size(to_visit)>0 )
+ y2milestone( "GetUsedDisks info:%1", info );
+ }
+ while( size(to_visit)>0 );
+ if( size(ret)>1 )
+ ret = sort( ret );
+ }
+ else if( substring(device,0,1)!="/" && search(device,":")>0 )
+ ret = [ "/dev/nfs" ];
+ y2milestone( "GetUsedDisks ret:%1", ret );
+ return( ret );
+ }
+
+global symbol IsDeviceOnNetwork( string device )
+ {
+ symbol ret = `no;
+ map tg = GetTargetMap();
+
+ list<string> disks = GetUsedDisks( device );
+ if( disks[0]:""=="/dev/nfs" )
+ ret = `nfs;
+ else
+ {
+ foreach( string s, disks,
+ ``{
+ if( ret == `no )
+ {
+ y2milestone( "disk:%1 tarnsport:%2", s, tg[s,"transport"]:`unknown );
+ if( contains( [ `fcoe, `iscsi ], tg[s,"transport"]:`unknown ))
+ ret = tg[s,"transport"]:`unknown;
+ }
+ });
+ }
+ y2milestone( "IsDeviceOnNetwork device:%1 ret:%2", device, ret );
+ return( ret );
+ }
+
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-storage-2.21.10/storage/src/modules/StorageFields.ycp new/yast2-storage-2.21.11/storage/src/modules/StorageFields.ycp
--- old/yast2-storage-2.21.10/storage/src/modules/StorageFields.ycp 2011-08-10 16:47:50.000000000 +0200
+++ new/yast2-storage-2.21.11/storage/src/modules/StorageFields.ycp 2011-10-24 14:15:54.000000000 +0200
@@ -738,7 +738,8 @@
{
map names = $[ `sbp : "Firewire", `ata : "ATA",
`fc : "Fibre Channel", `iscsi : "iSCSI", `sas : "SAS",
- `sata : "SATA", `spi : "SCSI", `usb : "USB" ];
+ `sata : "SATA", `spi : "SCSI", `usb : "USB",
+ `fcoe : "FCoE" ];
string value = names[data["transport"]:`unknown]:"";
if (style == `table)
return value;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-storage-2.21.10/storage/src/modules/StorageProposal.ycp new/yast2-storage-2.21.11/storage/src/modules/StorageProposal.ycp
--- old/yast2-storage-2.21.10/storage/src/modules/StorageProposal.ycp 2011-10-05 18:18:40.000000000 +0200
+++ new/yast2-storage-2.21.11/storage/src/modules/StorageProposal.ycp 2011-10-24 16:09:05.000000000 +0200
@@ -1879,7 +1879,7 @@
}
if( ps[index,"size"]:0==0 )
{
- diff = p[2]:0 * g["cyl_size"]:1 / (50 * 1024 * 1024);
+ diff = p[2]:0 * g["cyl_size"]:1 / (200 * 1024 * 1024);
ret = ret + diff;
y2milestone( "do_weighting after maximizes parts diff %1 ret %2",
diff, ret );
@@ -3294,7 +3294,13 @@
{
list mb = [ get_mb_sol( ps1, "/" )];
if( GetProposalHome() )
- mb = add( mb, get_mb_sol( ps1, "/home" ));
+ {
+ integer home_mb = get_mb_sol( ps1, "/home" );
+ mb = add( mb, home_mb );
+ // penalty for not having separate /home
+ if( home_mb==0 )
+ mb[0] = mb[0]:0/2;
+ }
if( mb[0]:0+mb[1]:0 > size_mb[s,0]:0 + size_mb[s,1]:0 )
{
solution[s] = ps1["disk"]:$[];
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org