Author: aschnell Date: Mon Aug 4 11:39:31 2008 New Revision: 49617 URL: http://svn.opensuse.org/viewcvs/yast?rev=49617&view=rev Log: - fixed handling of renamed devices during update (bnc #392086) Modified: trunk/storage/package/yast2-storage.changes 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=49617&r1=49616&r2=49617&view=diff ============================================================================== --- trunk/storage/package/yast2-storage.changes (original) +++ trunk/storage/package/yast2-storage.changes Mon Aug 4 11:39:31 2008 @@ -1,4 +1,9 @@ ------------------------------------------------------------------- +Mon Aug 04 11:37:49 CEST 2008 - aschnell@suse.de + +- fixed handling of renamed devices during update (bnc #392086) + +------------------------------------------------------------------- Sun Aug 03 16:01:46 CEST 2008 - aschnell@suse.de - implemented global lock for libstorage (fate #302971) Modified: trunk/storage/storage/src/modules/Storage.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/storage/src/modules/Storage.ycp?rev=49617&r1=49616&r2=49617&view=diff ============================================================================== --- trunk/storage/storage/src/modules/Storage.ycp (original) +++ trunk/storage/storage/src/modules/Storage.ycp Mon Aug 4 11:39:31 2008 @@ -210,6 +210,14 @@ return( ret ); }; + +global boolean IsKernelDeviceName(string device) +{ + return substring(device, 0, 6) != "LABEL=" && + substring(device, 0, 5) != "UUID=" && + substring(device, 0, 13) != "/dev/disk/by-"; +} + /** * Returns ... * @@ -5703,11 +5711,14 @@ global string HdDiskMap( string input, map diskmap ) ``{ string ret = input; - map d = GetDiskPartition( input ); - if( haskey( diskmap, d["disk"]:"" )) + if (IsKernelDeviceName(input)) + { + map d = GetDiskPartition( input ); + if( haskey( diskmap, d["disk"]:"" )) { - ret = GetDeviceName( diskmap[d["disk"]:""]:"", d["nr"]:(any)0 ); + ret = GetDeviceName( diskmap[d["disk"]:""]:"", d["nr"]:(any)0 ); } + } y2milestone( "HdDiskMap input:%1 ret:%2", input, ret ); return( ret ); } @@ -7133,14 +7144,6 @@ } -global boolean IsKernelDeviceName(string device) -{ - return substring(device, 0, 6) != "LABEL=" && - substring(device, 0, 5) != "UUID=" && - substring(device, 0, 13) != "/dev/disk/by-"; -} - - global boolean DeviceMatchFstab( string device, string fstab_spec ) { boolean ret = false; -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org