[yast-commit] r39888 - in /trunk/product-creator: ./ agent-kiwi/ package/ src/
Author: jsuchome Date: Thu Aug 2 11:50:37 2007 New Revision: 39888 URL: http://svn.opensuse.org/viewcvs/yast?rev=39888&view=rev Log: - "installation source" changed to "repository" - mark the output product as "base" - added simplified UI for kiwi - 2.15.1 Modified: trunk/product-creator/VERSION trunk/product-creator/agent-kiwi/ag_kiwi trunk/product-creator/package/yast2-product-creator.changes trunk/product-creator/src/Kiwi.ycp trunk/product-creator/src/Makefile.am trunk/product-creator/src/ProductCreator.ycp trunk/product-creator/src/kiwi.desktop trunk/product-creator/src/kiwi_dialogs.ycp trunk/product-creator/yast2-product-creator.spec.in Modified: trunk/product-creator/VERSION URL: http://svn.opensuse.org/viewcvs/yast/trunk/product-creator/VERSION?rev=39888&r1=39887&r2=39888&view=diff ============================================================================== --- trunk/product-creator/VERSION (original) +++ trunk/product-creator/VERSION Thu Aug 2 11:50:37 2007 @@ -1 +1 @@ -2.15.0 +2.15.1 Modified: trunk/product-creator/agent-kiwi/ag_kiwi URL: http://svn.opensuse.org/viewcvs/yast/trunk/product-creator/agent-kiwi/ag_kiwi?rev=39888&r1=39887&r2=39888&view=diff ============================================================================== --- trunk/product-creator/agent-kiwi/ag_kiwi (original) +++ trunk/product-creator/agent-kiwi/ag_kiwi Thu Aug 2 11:50:37 2007 @@ -29,7 +29,7 @@ my $optionsNodeList = $systemTree -> getElementsByTagName ("preferences"); my $usrdataNodeList = $systemTree -> getElementsByTagName ("users"); my $packageNodeList = $systemTree -> getElementsByTagName ("packages"); - my $imgnameNodeList = $systemTree -> getElementsByTagName ("image"); +# my $imgnameNodeList = $systemTree -> getElementsByTagName ("image"); my $key = "packages"; $retmap{$key} = {}; @@ -38,6 +38,8 @@ my $type = $node -> getAttribute ("type"); y2milestone ("package list type: $type"); $retmap{$key}{$type} = {}; + my $patterntype = $node -> getAttribute ("patternType"); + $retmap{$key}{$type}{"patternType"} = $patterntype if $patterntype; foreach my $tag ("package", "opensusePattern", "ignore") { my @sw_list = (); foreach my $element ($node -> getElementsByTagName ($tag)) { @@ -92,6 +94,10 @@ $retmap{$tag} = $element-> get_node(1)->textContent () if ($element); } + my $image = $systemTree -> getElementsByTagName ("image")->get_node (1); + my $image_name = $image -> getAttribute ("name"); + $retmap{"name"} = $image_name if $image_name; + $retmap{"users"} = {}; foreach my $usernode ($usrdataNodeList -> get_nodelist()) { my $group = $usernode -> getAttribute("group"); @@ -128,26 +134,25 @@ } } $key = "repository"; - $retmap{$key} = {}; + my @repolist = (); for (my $i=1;$i<= $repositNodeList->size();$i++) { my $node = $repositNodeList -> get_node($i); - my $type = $node -> getAttribute ("type"); - y2milestone ("repo type: $type"); - my $status = $node -> getAttribute ("status"); - $retmap{$key}{$type} = {}; - $retmap{$key}{$type}{"status"} = $status if $status; - foreach my $tag ("source") { - # maybe it doesn't have sense to have list of sources in one repo... - my @list = (); - foreach my $element ($node -> getElementsByTagName ($tag)) { - my %item = (); - my $path = $element -> getAttribute ("path"); - $item{"path"} = $path if $path; - push @list, \%item if %item; - } - $retmap{$key}{$type}{$tag} = \@list if @list; + my %repo = (); + foreach my $tag ("type", "status") { + my $val = $node -> getAttribute ($tag); + $repo{$tag} = $val if $val; + } + my @list = (); # maybe list is not needed here... + foreach my $element ($node -> getElementsByTagName ("source")) { + my %item = (); + my $path = $element -> getAttribute ("path"); + $item{"path"} = $path if $path; + push @list, \%item if %item; } + $repo{"source"} = \@list if @list; + push @repolist, \%repo if %repo; } + $retmap{$key} = \@repolist if @repolist; ycp::Return (\%retmap, 1); } elsif ($command eq "result") Modified: trunk/product-creator/package/yast2-product-creator.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/product-creator/package/yast2-product-creator.changes?rev=39888&r1=39887&r2=39888&view=diff ============================================================================== --- trunk/product-creator/package/yast2-product-creator.changes (original) +++ trunk/product-creator/package/yast2-product-creator.changes Thu Aug 2 11:50:37 2007 @@ -1,4 +1,12 @@ ------------------------------------------------------------------- +Thu Aug 2 09:34:21 CEST 2007 - jsuchome@suse.cz + +- "installation source" changed to "repository" +- mark the output product as "base" +- added simplified UI for kiwi +- 2.15.1 + +------------------------------------------------------------------- Wed Jul 25 09:41:05 CEST 2007 - lslezak@suse.cz - fixed "Back" button behavior in the Isolinux configuration Modified: trunk/product-creator/src/Kiwi.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/product-creator/src/Kiwi.ycp?rev=39888&r1=39887&r2=39888&view=diff ============================================================================== --- trunk/product-creator/src/Kiwi.ycp (original) +++ trunk/product-creator/src/Kiwi.ycp Thu Aug 2 11:50:37 2007 @@ -68,9 +68,7 @@ map get_source_value (string source) { string type = "yast2"; - string source_path = source; - if (substring (source, 0, 1) == "/") - source_path = "dir://" + source; + string source_path = adapt_source_path (source); foreach (map sourcemap, all_sources, { integer srcid = sourcemap["SrcId"]:-1; @@ -90,7 +88,7 @@ "__children": [ $[ "__key" : "source", - "path" : source + "path" : source_path ] ] ]; Modified: trunk/product-creator/src/Makefile.am URL: http://svn.opensuse.org/viewcvs/yast/trunk/product-creator/src/Makefile.am?rev=39888&r1=39887&r2=39888&view=diff ============================================================================== --- trunk/product-creator/src/Makefile.am (original) +++ trunk/product-creator/src/Makefile.am Thu Aug 2 11:50:37 2007 @@ -21,7 +21,8 @@ kiwi_dialogs.ycp desktop_DATA = \ - product-creator.desktop + product-creator.desktop \ + kiwi.desktop module_DATA = \ ProductCreator.ycp \ Modified: trunk/product-creator/src/ProductCreator.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/product-creator/src/ProductCreator.ycp?rev=39888&r1=39887&r2=39888&view=diff ============================================================================== --- trunk/product-creator/src/ProductCreator.ycp (original) +++ trunk/product-creator/src/ProductCreator.ycp Thu Aug 2 11:50:37 2007 @@ -93,6 +93,9 @@ // What we want to create with kiwi global string kiwi_task = "iso"; +// if the YaST sources should be enabled when opening package selector +global boolean enable_sources = true; + // original source configuration, needed to reset the package manager list<map<string,any> > original_config = nil; @@ -1493,6 +1496,9 @@ // remove the meta information from content file Exec(sformat("/usr/bin/grep -v -e '^KEY ' -e '^META ' '%1/content' > '%1/content.new'", String::Quote(skel_root))); Exec(sformat("/bin/mv '%1/content.new' '%1/content'", String::Quote(skel_root))); + // mark the final product as 'base' + if (SCR::Execute (.target.bash, sformat("/usr/bin/grep '^TYPE' '%1/content'", String::Quote(skel_root))) != 0) + Exec(sformat("echo 'TYPE base' >> '%1/content'", String::Quote(skel_root))); // recreate the index file // FIXME: use create_directory when it supports parameter with spaces @@ -1889,6 +1895,10 @@ global define void enableSources()``{ + // used by standalone kiwi UI, which does onw sources handling... + if (!enable_sources) + return; + // TODO FIXME: use better way to reset the source config in the package manager if (original_config != nil) { Modified: trunk/product-creator/src/kiwi.desktop URL: http://svn.opensuse.org/viewcvs/yast/trunk/product-creator/src/kiwi.desktop?rev=39888&r1=39887&r2=39888&view=diff ============================================================================== --- trunk/product-creator/src/kiwi.desktop (original) +++ trunk/product-creator/src/kiwi.desktop Thu Aug 2 11:50:37 2007 @@ -19,5 +19,5 @@ Exec=/sbin/yast2 kiwi Name=Live Image Creator -GenericName=Create the Live or XEN image +GenericName=Create the Live, USB or XEN image X-KDE-SubstituteUID=true Modified: trunk/product-creator/src/kiwi_dialogs.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/product-creator/src/kiwi_dialogs.ycp?rev=39888&r1=39887&r2=39888&view=diff ============================================================================== --- trunk/product-creator/src/kiwi_dialogs.ycp (original) +++ trunk/product-creator/src/kiwi_dialogs.ycp Thu Aug 2 11:50:37 2007 @@ -660,7 +660,6 @@ { if (Kiwi::WriteConfigXML (KiwiConfig, kiwi_task)) { - /* string out_dir = KiwiConfig["iso-directory"]:""; if (FileUtils::CheckAndCreatePath (out_dir) && Kiwi::PrepareAndCreate (out_dir)) { @@ -679,7 +678,6 @@ } ret = true; } - */ } } if (ret) @@ -707,12 +705,13 @@ map<string,string> content = ProductCreator::ReadContentFile(src_id); KiwiConfig = ProductCreator::Config; +y2internal ("sources: %1", KiwiConfig["sources"]:nil); // busy popup Popup::ShowFeedback (_("Reading current live image configuration..."), _("Please wait...")); map default_dirmap = $[ "iso" : sformat ("%1/kwliveDVD-suse-10.3", images_dir), - "xen" : sformat ("%1/buildhost-suse-10.1", images_dir), + "xen" : sformat ("%1/buildhost-suse-SLES10", images_dir), "usb" : sformat ("%1/kwliveDVD-suse-10.3", images_dir), "vmx" : sformat ("%1/kwliveDVD-suse-10.3", images_dir), ]; @@ -1388,7 +1387,7 @@ string kiwi_configuration = Config["kiwi_configuration_" + kiwi_task]:""; string name = Config["name"]:""; string out_dir = Config["iso-directory"]:""; - map <integer,string> repositories = $[];//Config["sources"]:[]; FIXME! + map <integer,string> repositories = $[]; // on start, disable all sources (-> move to client?) if (Config == $[]) @@ -1442,7 +1441,6 @@ kiwi_configuration = dir; Config = eval (Kiwi::ReadConfigXML (kiwi_configuration)); name = Config["name"]:""; -// repositories = []; repositories = $[]; foreach (map repo, (list<map>) Config["repository"]:[], { string source = repo["source",0,"path"]:""; @@ -1459,7 +1457,7 @@ else id = Pkg::SourceCreate (url + source, ""); if (id != -1) - repositories[id] = source;// FIXME or url? + repositories[id] = url + source; } }); UI::ChangeWidget (`id (`config), `Value, name); @@ -1652,6 +1650,7 @@ integer id, string repo, repositories, ``(repo)); ProductCreator::kiwi_task = kiwi_task; ProductCreator::Config = Config; + ProductCreator::enable_sources = false; } y2milestone("Returning %1", ret); return (symbol) ret; Modified: trunk/product-creator/yast2-product-creator.spec.in URL: http://svn.opensuse.org/viewcvs/yast/trunk/product-creator/yast2-product-creator.spec.in?rev=39888&r1=39887&r2=39888&view=diff ============================================================================== --- trunk/product-creator/yast2-product-creator.spec.in (original) +++ trunk/product-creator/yast2-product-creator.spec.in Thu Aug 2 11:50:37 2007 @@ -30,9 +30,11 @@ %dir @yncludedir@/product-creator @yncludedir@/product-creator/* @clientdir@/product-creator.ycp +@clientdir@/kiwi.ycp @moduledir@/*.ycp @moduledir@/*.ybc @desktopdir@/product-creator.desktop +@desktopdir@/kiwi.desktop @ybindir@/y2mkiso %doc @docdir@ %dir @ydatadir@/product-creator -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
jsuchome@svn.opensuse.org