Author: ug Date: Tue Dec 4 11:42:12 2007 New Revision: 42647 URL: http://svn.opensuse.org/viewcvs/yast?rev=42647&view=rev Log: remember password for encrypted profile Modified: trunk/autoinstallation/src/include/conftree.ycp trunk/autoinstallation/src/modules/AutoinstConfig.ycp trunk/autoinstallation/src/modules/Profile.ycp Modified: trunk/autoinstallation/src/include/conftree.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/autoinstallation/src/include/conftree.ycp?rev=42647&r1=42646&r2=42647&view=diff ============================================================================== --- trunk/autoinstallation/src/include/conftree.ycp (original) +++ trunk/autoinstallation/src/include/conftree.ycp Tue Dec 4 11:42:12 2007 @@ -566,6 +566,7 @@ } else if (ret == "change_encryption" ) { AutoinstConfig::ProfileEncrypted = !AutoinstConfig::ProfileEncrypted; + AutoinstConfig::ProfilePassword = ""; Wizard::DeleteMenus(); // FIXME: sucks sucks sucks sucks sucks menus(); } Modified: trunk/autoinstallation/src/modules/AutoinstConfig.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/autoinstallation/src/modules/AutoinstConfig.ycp?rev=42647&r1=42646&r2=42647&view=diff ============================================================================== --- trunk/autoinstallation/src/modules/AutoinstConfig.ycp (original) +++ trunk/autoinstallation/src/modules/AutoinstConfig.ycp Tue Dec 4 11:42:12 2007 @@ -25,6 +25,7 @@ global string Repository = ""; global boolean ProfileEncrypted = false; + global string ProfilePassword = ""; // Package Repository global string PackageRepository = ""; Modified: trunk/autoinstallation/src/modules/Profile.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/autoinstallation/src/modules/Profile.ycp?rev=42647&r1=42646&r2=42647&view=diff ============================================================================== --- trunk/autoinstallation/src/modules/Profile.ycp (original) +++ trunk/autoinstallation/src/modules/Profile.ycp Tue Dec 4 11:42:12 2007 @@ -323,27 +323,31 @@ if( AutoinstConfig::ProfileEncrypted ) { string xml = XML::YCPToXMLString(`profile, current); if( size(xml) > 0 ) { - string p = ""; - string q = ""; - do { - UI::OpenDialog( - `VBox( - `Label("Encrypted AutoYaST profile. Please enter the password twice"), - `Password(`id(`password), ""), - `Password(`id(`password2), ""), - `PushButton(`id(`ok), "&OK") - ) - ); - any button = nil; - repeat { - button = UI::UserInput(); - p = (string) UI::QueryWidget(`id(`password), `Value); - q = (string) UI::QueryWidget(`id(`password2), `Value); - } until ( button == `ok ); - UI::CloseDialog(); - } while( p != q ); + if( AutoinstConfig::ProfilePassword == "" ) { + string p = ""; + string q = ""; + do { + UI::OpenDialog( + `VBox( + `Label("Encrypted AutoYaST profile. Please enter the password twice"), + `Password(`id(`password), ""), + `Password(`id(`password2), ""), + `PushButton(`id(`ok), "&OK") + ) + ); + any button = nil; + repeat { + button = UI::UserInput(); + p = (string) UI::QueryWidget(`id(`password), `Value); + q = (string) UI::QueryWidget(`id(`password2), `Value); + } until ( button == `ok ); + UI::CloseDialog(); + } while( p != q ); + AutoinstConfig::ProfilePassword = p; + } string dir = (string)SCR::Read(.target.tmpdir); - string command = sformat("gpg2 -c --armor --batch --passphrase \"%1\" --output %2/encrypted_autoyast.xml",p,dir); + string command = sformat("gpg2 -c --armor --batch --passphrase \"%1\" --output %2/encrypted_autoyast.xml", + AutoinstConfig::ProfilePassword,dir); SCR::Execute(.target.bash_input, command, xml); if( SCR::Read(.target.size, dir+"/encrypted_autoyast.xml") > 0 ) { command = sformat( "mv %1/encrypted_autoyast.xml %2", dir, file ); -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org