[yast-commit] r48052 - in /trunk/installation: package/yast2-installation.changes src/clients/copy_files_finish.ycp src/clients/inst_license.ycp
Author: locilka Date: Wed Jun 4 12:03:29 2008 New Revision: 48052 URL: http://svn.opensuse.org/viewcvs/yast?rev=48052&view=rev Log: - Copying /license.tar.gz to /etc/YaST2/license/ (bnc #396444). Modified: trunk/installation/package/yast2-installation.changes trunk/installation/src/clients/copy_files_finish.ycp trunk/installation/src/clients/inst_license.ycp Modified: trunk/installation/package/yast2-installation.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/installation/package/yast2-installation.changes?rev=48052&r1=48051&r2=48052&view=diff ============================================================================== --- trunk/installation/package/yast2-installation.changes (original) +++ trunk/installation/package/yast2-installation.changes Wed Jun 4 12:03:29 2008 @@ -1,4 +1,9 @@ ------------------------------------------------------------------- +Wed Jun 4 11:57:07 CEST 2008 - locilka@suse.cz + +- Copying /license.tar.gz to /etc/YaST2/license/ (bnc #396444). + +------------------------------------------------------------------- Tue Jun 3 13:44:56 CEST 2008 - locilka@suse.cz - Umounting temporary directory in inst_pre_install (if already Modified: trunk/installation/src/clients/copy_files_finish.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/installation/src/clients/copy_files_finish.ycp?rev=48052&r1=48051&r2=48052&view=diff ============================================================================== --- trunk/installation/src/clients/copy_files_finish.ycp (original) +++ trunk/installation/src/clients/copy_files_finish.ycp Wed Jun 4 12:03:29 2008 @@ -177,10 +177,21 @@ SCR::Execute (.target.remove, eula_txt); } - // Copy info.txt so it can be used in firstboot (new eula.txt) - if (FileUtils::Exists ("/info.txt")) - { - SCR::Execute (.target.bash, sformat("/bin/cp /info.txt %1", eula_txt)); + string license_dir = sformat ("%1%2/license/", Installation::destdir, Directory::etcdir); + string license_file = "/license.tar.gz"; + // Copy licenses so it can be used in firstboot later + // bnc #396976 + map cmd = (map) WFM::Execute (.target.bash_output, + sformat ( + "mkdir -p '%1' && cd '%1' && rm -rf license*.txt; tar -xf '%2'", + String::Quote (license_dir), + String::Quote (license_file) + ) + ); + if (cmd["exit"]:-1 == 0) { + y2milestone ("Copying %1 to %2 was successful", license_file, license_dir); + } else { + y2error ("Copying %1 to %2 has failed: %3", license_file, license_dir, cmd); } // bugzila #328126 Modified: trunk/installation/src/clients/inst_license.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/installation/src/clients/inst_license.ycp?rev=48052&r1=48051&r2=48052&view=diff ============================================================================== --- trunk/installation/src/clients/inst_license.ycp (original) +++ trunk/installation/src/clients/inst_license.ycp Wed Jun 4 12:03:29 2008 @@ -3,6 +3,8 @@ * Package: Installation * Summary: Generic License File * Authors: Anas Nashif <nashif@suse.de> + * Jiri Srain <jsrain@suse.cz> + * Lukas Ocilka <locilka@suse.cz> * * $Id$ * @@ -18,13 +20,9 @@ import "ProductLicense"; import "Mode"; -map display = UI::GetDisplayInfo(); -integer space = display["TextMode"]:true ? 1 : 3; - // all the arguments map argmap = GetInstArgs::argmap(); - // Action if license is not accepted // abort|continue|halt // halt is the default @@ -40,22 +38,18 @@ symbol ask_ret = nil; -string text = ""; - if (Stage::initial ()) { ask_ret = ProductLicense::AskFirstStageLicenseAgreement (action); } else { - list<string> default_patterns = ["info.txt"]; - string directory = argmap["directory"]:"/var/lib/YaST2"; + string directory = argmap["directory"]:Directory::etcdir + "/license/"; if (argmap["directory"]:"" != "") directory = Directory::custom_workflow_dir + directory; - list<string> patterns = argmap["patterns"]:default_patterns; - ask_ret = ProductLicense::AskInstalledLicenseAgreement (directory, - patterns, action); + // patterns are hardcoded + ask_ret = ProductLicense::AskInstalledLicenseAgreement (directory, [], action); } if (ask_ret == nil || ask_ret == `auto) -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
locilka@svn.opensuse.org