![](https://seccdn.libravatar.org/avatar/2f8a5b55b74eb727b5ee47fed82a1454.jpg?s=120&d=mm&r=g)
Author: ug Date: Wed Nov 14 12:15:26 2007 New Revision: 42038 URL: http://svn.opensuse.org/viewcvs/yast?rev=42038&view=rev Log: relative path for autoyast scripts in the location element (second part of feature #302973) Modified: trunk/autoinstallation/package/autoyast2.changes trunk/autoinstallation/src/modules/AutoinstScripts.ycp Modified: trunk/autoinstallation/package/autoyast2.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/autoinstallation/package/autoyast2.changes?rev=42038&r1=42037&r2=42038&view=diff ============================================================================== --- trunk/autoinstallation/package/autoyast2.changes (original) +++ trunk/autoinstallation/package/autoyast2.changes Wed Nov 14 12:15:26 2007 @@ -1,4 +1,10 @@ ------------------------------------------------------------------- +Wed Nov 14 12:14:21 CET 2007 - ug@suse.de + +- relative path for autoyast scripts in the location element + (second part of feature #302973) + +------------------------------------------------------------------- Tue Nov 13 14:40:21 CET 2007 - ug@suse.de - relative path for autoyast profile Modified: trunk/autoinstallation/src/modules/AutoinstScripts.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/autoinstallation/src/modules/AutoinstScripts.ycp?rev=42038&r1=42037&r2=42038&view=diff ============================================================================== --- trunk/autoinstallation/src/modules/AutoinstScripts.ycp (original) +++ trunk/autoinstallation/src/modules/AutoinstScripts.ycp Wed Nov 14 12:15:26 2007 @@ -181,6 +181,20 @@ } + global define list<map> Resolve_relurl( list<map> d ) { + d = maplist (map script , d, ``{ + if( issubstring( script["location"]:"", "relurl://" ) ) { + string l = script["location"]:""; + l = substring ( l, 9 ); + string newloc = AutoinstConfig::scheme + "://" + AutoinstConfig::host + "/" + AutoinstConfig::directory + l; + script["location"] = newloc; + y2milestone("changed relurl to %1 for script", newloc); + } + return script; + }); + + return d; + } /** * Get all the configuration from a map. @@ -196,6 +210,12 @@ init = s["init-scripts"]:[]; post = s["post-scripts"]:[]; chroot = s["chroot-scripts"]:[]; + + pre = Resolve_relurl(pre); + init = Resolve_relurl(init); + post = Resolve_relurl(post); + chroot = Resolve_relurl(chroot); + merged = mergeScripts(); y2debug("merged: %1", merged); return true; -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org