Author: ug Date: Wed Sep 3 16:58:41 2008 New Revision: 50626 URL: http://svn.opensuse.org/viewcvs/yast?rev=50626&view=rev Log: relurl for file_location added Modified: trunk/autoinstallation/package/autoyast2.changes trunk/autoinstallation/src/modules/AutoinstFile.ycp trunk/autoinstallation/src/modules/ProfileLocation.ycp Modified: trunk/autoinstallation/package/autoyast2.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/autoinstallation/package/autoyast2.changes?rev=50626&r1=50625&r2=50626&view=diff ============================================================================== --- trunk/autoinstallation/package/autoyast2.changes (original) +++ trunk/autoinstallation/package/autoyast2.changes Wed Sep 3 16:58:41 2008 @@ -1,4 +1,9 @@ ------------------------------------------------------------------- +Wed Sep 3 16:56:58 CEST 2008 - ug@suse.de + +- relurl for file_location added + +------------------------------------------------------------------- Tue Sep 2 17:12:43 CEST 2008 - ug@suse.de - Read() button added to UI Modified: trunk/autoinstallation/src/modules/AutoinstFile.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/autoinstallation/src/modules/AutoinstFile.ycp?rev=50626&r1=50625&r2=50626&view=diff ============================================================================== --- trunk/autoinstallation/src/modules/AutoinstFile.ycp (original) +++ trunk/autoinstallation/src/modules/AutoinstFile.ycp Wed Sep 3 16:58:41 2008 @@ -106,6 +106,22 @@ SCR::Write (.target.string, file["file_path"]:alternate_location , file["file_contents"]:""); } else if( file["file_location"]:"" != "" ) { + if( issubstring( file["file_location"]:"", "relurl://" ) ) { + string l = file["file_location"]:""; + l = substring ( l, 9 ); + string newloc = ""; + if( AutoinstConfig::scheme == "relurl" ) { + y2milestone("autoyast profile was relurl too"); + newloc = (string)SCR::Read(.etc.install_inf.ayrelurl); + map tok = URL::Parse(newloc); + y2milestone("tok = %1", tok); + newloc = tok["scheme"]:"" + "://" + tok["host"]:"" + "/" + dirname(tok["path"]:"") + l; + } else { + newloc = AutoinstConfig::scheme + "://" + AutoinstConfig::host + "/" + AutoinstConfig::directory + l; + } + file["file_location"] = newloc; + y2milestone("changed relurl to %1 for file", newloc); + } y2milestone("trying to get file from %1 storing in %2", file["file_location"]:"", file["file_path"]:alternate_location); if (!GetURL(file["file_location"]:"", file["file_path"]:alternate_location ) ) { y2error("file could not be retrieved"); Modified: trunk/autoinstallation/src/modules/ProfileLocation.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/autoinstallation/src/modules/ProfileLocation.ycp?rev=50626&r1=50625&r2=50626&view=diff ============================================================================== --- trunk/autoinstallation/src/modules/ProfileLocation.ycp (original) +++ trunk/autoinstallation/src/modules/ProfileLocation.ycp Wed Sep 3 16:58:41 2008 @@ -74,6 +74,8 @@ } y2milestone("relurl for profile changed to: %1://%2%3",AutoinstConfig::scheme, AutoinstConfig::host, AutoinstConfig::filepath); + SCR::Write ( .etc.install_inf.ayrelurl, sformat("%1://%2/%3",AutoinstConfig::scheme, AutoinstConfig::host, AutoinstConfig::filepath) ); + SCR::Write (.etc.install_inf, nil); } string filename = basename(AutoinstConfig::filepath); -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org