Author: kmachalkova Date: Thu Jul 23 13:16:13 2009 New Revision: 58137 URL: http://svn.opensuse.org/viewcvs/yast?rev=58137&view=rev Log: juhliarik's patch for preventing multiple calls of Storage::Update Modified: trunk/storage/VERSION trunk/storage/package/yast2-storage.changes trunk/storage/storage/src/modules/Storage.ycp Modified: trunk/storage/VERSION URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/VERSION?rev=58137&r1=58136&r2=58137&view=diff ============================================================================== --- trunk/storage/VERSION (original) +++ trunk/storage/VERSION Thu Jul 23 13:16:13 2009 @@ -1 +1 @@ -2.18.14 +2.18.16 Modified: trunk/storage/package/yast2-storage.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/package/yast2-storage.changes?rev=58137&r1=58136&r2=58137&view=diff ============================================================================== --- trunk/storage/package/yast2-storage.changes (original) +++ trunk/storage/package/yast2-storage.changes Thu Jul 23 13:16:13 2009 @@ -1,4 +1,12 @@ ------------------------------------------------------------------- +Thu Jul 23 13:35:57 CEST 2009 - kmachalkova@suse.cz + +- Added called_update flag to prevent multiple calls of + Storage::Update (breaks bootloader on kernel update - bnc#477778) + (patch by juhliarik) +- 2.18.16 + +------------------------------------------------------------------- Thu Jul 23 09:40:45 CEST 2009 - aschnell@suse.de - show ignore_fstab flag in mount-by information (fate #305150) Modified: trunk/storage/storage/src/modules/Storage.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/storage/src/modules/Storage.ycp?rev=58137&r1=58136&r2=58137&view=diff ============================================================================== --- trunk/storage/storage/src/modules/Storage.ycp (original) +++ trunk/storage/storage/src/modules/Storage.ycp Thu Jul 23 13:16:13 2009 @@ -82,6 +82,7 @@ // end of resizing functions + global void UpdateClassified(string key, string pwd); @@ -5075,6 +5076,10 @@ return( DiskMap ); } +// flag indicates calling Storage::Update() +global boolean called_update = false; + + /** * Updates fstab on disk * @@ -5088,85 +5093,94 @@ * ] */ global define void Update( map oldv, map newv ) - ``{ - y2milestone( "Update old:%1 new:%2", oldv, newv ); - - // Enterprise products do not have minor release number - // map enterprise releases to corresponding code bases of SL - map sles_major_to_minor = $[ 8 : 2, 9 : 1, 10 : 1 ]; - if( haskey( oldv, "major" ) && !haskey( oldv, "minor" ) ) - { - oldv["minor"] = sles_major_to_minor[oldv["major"]:0]:0; - y2milestone( "Update old:%1", oldv ); - } - if( haskey( newv, "major" ) && !haskey( newv, "minor" ) ) + { + if (!called_update) { - newv["minor"] = sles_major_to_minor[newv["major"]:0]:0; - y2milestone( "Update new:%1", newv ); - } - if( !haskey( oldv, "major" ) || !haskey( newv, "major" ) ) - y2error( "Missing key major or minor" ); + y2milestone( "Update old:%1 new:%2", oldv, newv ); - if( oldv["major"]:0<=9 ) - { - UpdateFstabSysfs(); - } - if( oldv["major"]:0<9 ) - { - UpdateFstabUsbdevfs(); - } - if( oldv["major"]:0==9 ) - { - UpdateFstabPersistentNames(); - } + // Enterprise products do not have minor release number + // map enterprise releases to corresponding code bases of SL + map sles_major_to_minor = $[ 8 : 2, 9 : 1, 10 : 1 ]; + if( haskey( oldv, "major" ) && !haskey( oldv, "minor" ) ) + { + oldv["minor"] = sles_major_to_minor[oldv["major"]:0]:0; + y2milestone( "Update old:%1", oldv ); + } + if( haskey( newv, "major" ) && !haskey( newv, "minor" ) ) + { + newv["minor"] = sles_major_to_minor[newv["major"]:0]:0; + y2milestone( "Update new:%1", newv ); + } + if( !haskey( oldv, "major" ) || !haskey( newv, "major" ) ) + y2error( "Missing key major or minor" ); - // remove EVMS - // FIXME add appropriate condition if needed (does not seem so) - UpdateFstabEvms2Lvm(); + if( oldv["major"]:0<=9 ) + { + UpdateFstabSysfs(); + } + if( oldv["major"]:0<9 ) + { + UpdateFstabUsbdevfs(); + } + if( oldv["major"]:0==9 ) + { + UpdateFstabPersistentNames(); + } - map dm = BuildDiskmap( oldv ); - if( size(dm)>0 ) - { - UpdateFstabDiskmap( dm ); - UpdateMdadm(); - } - if( oldv["major"]:0<9 || (oldv["major"]:0==9 && oldv["minor"]:0<=2)) - { - Storage::UpdateCryptoType(); - } - if( oldv["major"]:0<10 || (oldv["major"]:0==10 && oldv["minor"]:0==0) ) - { - string of = "/etc/udev/rules.d/20-cdrom.rules"; - y2milestone( "removing obsolete %1", of ); - SCR::Execute( .target.remove, of ); - of = "/etc/udev/rules.d/55-cdrom.rules"; - y2milestone( "removing obsolete %1", of ); - SCR::Execute( .target.remove, of ); - } - if( oldv["major"]:0<10 || (oldv["major"]:0==10 && oldv["minor"]:0<=2) ) - { - string of = "/etc/udev/rules.d/65-cdrom.rules"; - y2milestone( "removing obsolete %1", of ); - SCR::Execute( .target.remove, of ); - } - if( oldv["major"]:0<10 || (oldv["major"]:0==10 && oldv["minor"]:0==0)) - UpdateFstabSubfs(); - if( oldv["major"]:0<9 || (oldv["major"]:0==9 && oldv["minor"]:0==0)) - { - if( Arch::board_iseries () ) + // remove EVMS + // FIXME add appropriate condition if needed (does not seem so) + UpdateFstabEvms2Lvm(); + + map dm = BuildDiskmap( oldv ); + if( size(dm)>0 ) { - UpdateFstabIseriesVd(); + UpdateFstabDiskmap( dm ); + UpdateMdadm(); } - string cmd = "cd / && /sbin/insserv -r /etc/init.d/boot.evms"; - y2milestone( "Update cmd %1", cmd ); - map bo = (map)SCR::Execute (.target.bash_output, cmd ); - y2milestone( "Update bo %1", bo ); - } - if( oldv["major"]:0<10 || (oldv["major"]:0==10 && oldv["minor"]:0<=2)) + if( oldv["major"]:0<9 || (oldv["major"]:0==9 && oldv["minor"]:0<=2)) + { + Storage::UpdateCryptoType(); + } + if( oldv["major"]:0<10 || (oldv["major"]:0==10 && oldv["minor"]:0==0) ) + { + string of = "/etc/udev/rules.d/20-cdrom.rules"; + y2milestone( "removing obsolete %1", of ); + SCR::Execute( .target.remove, of ); + of = "/etc/udev/rules.d/55-cdrom.rules"; + y2milestone( "removing obsolete %1", of ); + SCR::Execute( .target.remove, of ); + } + if( oldv["major"]:0<10 || (oldv["major"]:0==10 && oldv["minor"]:0<=2) ) + { + string of = "/etc/udev/rules.d/65-cdrom.rules"; + y2milestone( "removing obsolete %1", of ); + SCR::Execute( .target.remove, of ); + } + if( oldv["major"]:0<10 || (oldv["major"]:0==10 && oldv["minor"]:0==0)) + UpdateFstabSubfs(); + if( oldv["major"]:0<9 || (oldv["major"]:0==9 && oldv["minor"]:0==0)) + { + if( Arch::board_iseries () ) + { + UpdateFstabIseriesVd(); + } + string cmd = "cd / && /sbin/insserv -r /etc/init.d/boot.evms"; + y2milestone( "Update cmd %1", cmd ); + map bo = (map)SCR::Execute (.target.bash_output, cmd ); + y2milestone( "Update bo %1", bo ); + } + if( oldv["major"]:0<10 || (oldv["major"]:0==10 && oldv["minor"]:0<=2)) + { + string cmd = "cd / && /sbin/insserv /etc/init.d/boot.crypto"; + map bo = (map)SCR::Execute (.target.bash_output, cmd ); + y2milestone( "Update bo %1", bo ); + } + // set flag -> it indicates that Update was already called + called_update = true; + } + else { - string cmd = "cd / && /sbin/insserv /etc/init.d/boot.crypto"; - map bo = (map)SCR::Execute (.target.bash_output, cmd ); - y2milestone( "Update bo %1", bo ); + y2milestone("Skip calling Update() -> It was already called"); } } -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org