Author: ug Date: Thu Jun 4 14:51:31 2009 New Revision: 57442 URL: http://svn.opensuse.org/viewcvs/yast?rev=57442&view=rev Log: creating directories with <files> section possible (fate #305313) Modified: trunk/autoinstallation/doc/CreateProfileDetails.xml trunk/autoinstallation/doc/examples/example.files.xml trunk/autoinstallation/package/autoyast2.changes trunk/autoinstallation/src/modules/AutoinstFile.ycp Modified: trunk/autoinstallation/doc/CreateProfileDetails.xml URL: http://svn.opensuse.org/viewcvs/yast/trunk/autoinstallation/doc/CreateProfil... ============================================================================== --- trunk/autoinstallation/doc/CreateProfileDetails.xml (original) +++ trunk/autoinstallation/doc/CreateProfileDetails.xml Thu Jun 4 14:51:31 2009 @@ -2575,6 +2575,9 @@ where the file should be retrieved from, like an HTTP server for example. That would look like this <emphasis><file_location>http://my.server.site/issue</file_location></emphasis> </para> + <para> + Since openSUSE 11.2 (not SLES11) you can create directories by specifying a file_path that ends with a slash. + </para> &example.files; <para> Modified: trunk/autoinstallation/doc/examples/example.files.xml URL: http://svn.opensuse.org/viewcvs/yast/trunk/autoinstallation/doc/examples/exa... ============================================================================== --- trunk/autoinstallation/doc/examples/example.files.xml (original) +++ trunk/autoinstallation/doc/examples/example.files.xml Thu Jun 4 14:51:31 2009 @@ -16,4 +16,13 @@ </files> ]]> </screen> - </example> \ No newline at end of file + <screen> +<![CDATA[ + <files config:type="list"> + <config_file> + <file_path>/mydir/a/b/c/</file_path> <!-- create directory (since openSUSE 11.2) --> + </config_file> + </files> +]]> + </screen> + </example> Modified: trunk/autoinstallation/package/autoyast2.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/autoinstallation/package/autoyast... ============================================================================== --- trunk/autoinstallation/package/autoyast2.changes (original) +++ trunk/autoinstallation/package/autoyast2.changes Thu Jun 4 14:51:31 2009 @@ -1,4 +1,10 @@ ------------------------------------------------------------------- +Thu Jun 4 14:48:31 CEST 2009 - ug@suse.de + +- creating directories with <files> section possible + (fate #305313) + +------------------------------------------------------------------- Thu Jun 4 12:56:15 CEST 2009 - ug@suse.de - better feedback for the common "device not found" error Modified: trunk/autoinstallation/src/modules/AutoinstFile.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/autoinstallation/src/modules/Auto... ============================================================================== --- trunk/autoinstallation/src/modules/AutoinstFile.ycp (original) +++ trunk/autoinstallation/src/modules/AutoinstFile.ycp Thu Jun 4 14:51:31 2009 @@ -96,8 +96,10 @@ ``{ string alternate_location = sformat("%1/%2", AutoinstConfig::files_dir, counter); string alter_file = sformat("file_%1", counter); - if (file["file_contents"]:"" != "") - { + if( size(file["file_path"]:"dummy")-1 == findlastof(file["file_path"]:"", "/") ) { + // directory + SCR::Execute (.target.mkdir, file["file_path"]:alternate_location); + } else if (file["file_contents"]:"" != "") { y2milestone("AutoInstall: Copying file %1", file["file_path"]:alternate_location ); list t = splitstring( file["file_path"]:alternate_location, "/"); integer pos = size(t) - 1; -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org