Author: locilka Date: Mon Sep 3 09:46:41 2007 New Revision: 40677 URL: http://svn.opensuse.org/viewcvs/yast?rev=40677&view=rev Log: - Added support for LiveCD installation into ProductLicense module (#299732). Modified: trunk/packager/package/yast2-packager.changes trunk/packager/src/modules/ProductLicense.ycp Modified: trunk/packager/package/yast2-packager.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/packager/package/yast2-packager.changes?rev=40677&r1=40676&r2=40677&view=diff ============================================================================== --- trunk/packager/package/yast2-packager.changes (original) +++ trunk/packager/package/yast2-packager.changes Mon Sep 3 09:46:41 2007 @@ -1,4 +1,10 @@ ------------------------------------------------------------------- +Mon Sep 3 09:44:32 CEST 2007 - locilka@suse.cz + +- Added support for LiveCD installation into ProductLicense module + (#299732). + +------------------------------------------------------------------- Fri Aug 31 17:34:40 CEST 2007 - locilka@suse.cz - Added commandline support for inst_productsources (#304720). Modified: trunk/packager/src/modules/ProductLicense.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/packager/src/modules/ProductLicense.ycp?rev=40677&r1=40676&r2=40677&view=diff ============================================================================== --- trunk/packager/src/modules/ProductLicense.ycp (original) +++ trunk/packager/src/modules/ProductLicense.ycp Mon Sep 3 09:46:41 2007 @@ -320,6 +320,31 @@ info_file = "/info.txt"; } +void SearchForLicense_LiveCDInstallation (integer src_id, string fallback_dir) { + y2milestone ("LiveCD License"); + + if (FileUtils::Exists ("/license.tar.gz")) { + tmpdir = sformat ("%1/product-license/LiveCD/", (string) SCR::Read (.target.tmpdir)); + string license_file = "/license.tar.gz"; + + if (UnpackLicenseTgzFileToDirectory (license_file, tmpdir)) { + license_dir = tmpdir; + license_file_print = "license.tar.gz"; + } else { + CleanUpLicense (tmpdir); + license_file = nil; + } + } else { + license_dir = nil; + } + + if (FileUtils::Exists ("/README.BETA")) { + info_file = "/README.BETA"; + } else { + info_file = nil; + } +} + void SearchForLicense_NormalRunBaseProduct (integer src_id, string fallback_dir) { y2milestone ("Using default license directory %1", fallback_dir); @@ -353,7 +378,7 @@ license_dir = tmpdir; license_file_print = "license.tar.gz"; } else { - license_file = nil; + license_dir = nil; } return; @@ -407,10 +432,16 @@ y2milestone ("Searching for licenses..."); license_file_print = nil; + // Bugzilla #299732 + // Base Product - LiveCD installation + if (Mode::live_installation()) { + + SearchForLicense_LiveCDInstallation (src_id, fallback_dir); + // Base-product - license not in installation // * Stage is not initial // * source ID is not defined - if (! Stage::initial() && src_id == nil) { + } else if (! Stage::initial() && src_id == nil) { SearchForLicense_NormalRunBaseProduct (src_id, fallback_dir); -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org