Author: jsuchome Date: Thu Jul 24 13:04:45 2008 New Revision: 49386 URL: http://svn.opensuse.org/viewcvs/yast?rev=49386&view=rev Log: - adapted to last version of ag_anyxml (bnc#409491) - Image Creator: allow more configurations with same name - added new image type that was not in previous config.xml - 2.17.4 Modified: trunk/product-creator/VERSION trunk/product-creator/package/yast2-product-creator.changes trunk/product-creator/src/complex.ycp trunk/product-creator/src/kiwi_dialogs.ycp trunk/product-creator/src/routines.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=49386&r1=49385&r2=49386&view=diff ============================================================================== --- trunk/product-creator/VERSION (original) +++ trunk/product-creator/VERSION Thu Jul 24 13:04:45 2008 @@ -1 +1 @@ -2.17.3 +2.17.4 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=49386&r1=49385&r2=49386&view=diff ============================================================================== --- trunk/product-creator/package/yast2-product-creator.changes (original) +++ trunk/product-creator/package/yast2-product-creator.changes Thu Jul 24 13:04:45 2008 @@ -1,4 +1,12 @@ ------------------------------------------------------------------- +Thu Jul 24 10:55:06 CEST 2008 - jsuchome@suse.cz + +- adapted to last version of ag_anyxml (bnc#409491) +- Image Creator: allow more configurations with same name +- added new image type that was not in previous config.xml +- 2.17.4 + +------------------------------------------------------------------- Mon Jul 7 15:04:30 CEST 2008 - jsuchome@suse.cz - create a path to the defaultroot directory if it doesn't exists Modified: trunk/product-creator/src/complex.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/product-creator/src/complex.ycp?rev=49386&r1=49385&r2=49386&view=diff ============================================================================== --- trunk/product-creator/src/complex.ycp (original) +++ trunk/product-creator/src/complex.ycp Thu Jul 24 13:04:45 2008 @@ -576,6 +576,7 @@ sformat ("ls -A1 %1", images_dir)); if (out != $[]) { + integer i = 0; foreach (string d, splitstring(out["stdout"]:"", "\n"), { if (d == "") return; if (FileUtils::Exists (images_dir + "/" + d + "/config.xml")) @@ -594,12 +595,14 @@ config["current_task"] = task; string name = config["name"]:d; - Configurations[name] = config; + // index by order, so we can handle more configs with same name + Configurations[i] = config; overview = add (overview, `item ( - `id (name), name, + `id (i), name, get_preferences (config, "version", "1.0.0"), get_preferences (config, "size", 0) )); + i = i + 1; } }); } @@ -643,7 +646,7 @@ UI::ChangeWidget (`id (`edit), `Enabled, size (overview) > 0); if (size (overview) > 0) { - string current = (string) UI::QueryWidget(`id(`table), `CurrentItem); + integer current = (integer) UI::QueryWidget(`id(`table), `CurrentItem); string val = get_description ( Configurations[current]:$[], "specification"); UI::ChangeWidget (`id (`descr), `Value, @@ -656,7 +659,7 @@ map event = UI::WaitForEvent (); ret = event["ID"]:nil; - string current = (string) UI::QueryWidget(`id(`table), `CurrentItem ); + integer current = (integer) UI::QueryWidget(`id(`table), `CurrentItem); if(ret == `abort || ret == `cancel) { if(ProductCreator::ReallyAbort()) break; @@ -670,20 +673,24 @@ } else if(ret == `delete) { + map config = Configurations[current]:$[]; + string version = get_preferences (config, "version", ""); if (Popup::YesNo ( // yes/no popup -sformat (_("Delete configutation %1 now?"), current))) +sformat (_("Delete configutation %1 (%2) now?"), config["name"]:"", version))) { - map config = Configurations[current]:$[]; string dir = config["kiwi_configuration_"+ config["current_task"]:""]:""; - // TODO at the end? (solve possible new config with same name..) if (dir != "" && issubstring (dir, Kiwi::images_dir)) SCR::Execute (.target.bash, "rm -rf " + dir); Configurations = remove (Configurations, current); overview = filter (term it, (list<term>) overview, - ``(it[0,0]:"" != current)); + ``(it[0,0]:-1 != current || it[2]:"" != version)); UI::ChangeWidget (`id (`table), `Items, overview); + current = (integer) UI::QueryWidget(`id(`table), `CurrentItem); + UI::ChangeWidget (`id (`descr), `Value, + get_description (Configurations[current]:$[], + "specification")); } } else if (ret == `table) Modified: trunk/product-creator/src/kiwi_dialogs.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/product-creator/src/kiwi_dialogs.ycp?rev=49386&r1=49385&r2=49386&view=diff ============================================================================== --- trunk/product-creator/src/kiwi_dialogs.ycp (original) +++ trunk/product-creator/src/kiwi_dialogs.ycp Thu Jul 24 13:04:45 2008 @@ -1115,17 +1115,38 @@ // FIXME check if boot directories match current product (-> enable building // for product different from installed one) } + boolean primary_included = false; + string boot_dir = ""; // set the primary building target according to kiwi_task KiwiConfig["preferences",0,"type"] = maplist ( map typemap, (list<map>)pref[0,"type"]:[], { string type = typemap[content_key]:""; - if (typemap["primary"]:false && type != kiwi_task) + if (typemap["primary"]:"false" == "true" && type != kiwi_task) typemap = remove (typemap, "primary"); else if (type == kiwi_task) - typemap["primary"] = true; + { + typemap["primary"] = "true"; + primary_included = true; + } + if (boot_dir == "") + boot_dir = typemap["boot"]:""; return typemap; }); + // add the new type, that was not previously defined in config.xml + // FIXME the default values (format,filesystem...) are missing + if (!primary_included) + { + string prefix = kiwi_task == "pxe" ? "net" : kiwi_task; + boot_dir = substring (boot_dir, search (boot_dir, "/") + 1); + KiwiConfig["preferences",0,"type"] = add ( + KiwiConfig["preferences",0,"type"]:[], $[ + content_key : kiwi_task, + "boot" : prefix + "boot/" + boot_dir, + "primary" : "true" + ] + ); + } // save the info about packages and patterns into ProductCreator::Config // ("sources" are already there...) map sw_contents = KiwiConfig["packages",0]:$[]; @@ -1845,7 +1866,7 @@ string type = typemap[content_key]:""; if (!primary) kiwi_task = type; - if (typemap["primary"]:false) + if (typemap["primary"]:"false" == "true") primary = true; if ((supported_images == "" && !contains (present_types, type)) || supported_images == "template") Modified: trunk/product-creator/src/routines.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/product-creator/src/routines.ycp?rev=49386&r1=49385&r2=49386&view=diff ============================================================================== --- trunk/product-creator/src/routines.ycp (original) +++ trunk/product-creator/src/routines.ycp Thu Jul 24 13:04:45 2008 @@ -41,7 +41,7 @@ string task = "iso"; foreach (map typemap, (list<map>) config["preferences",0,"type"]:[], { task = typemap[Kiwi::content_key]:task; - if (typemap["primary"]:false) + if (typemap["primary"]:"false" == "true") break; }); return task; 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=49386&r1=49385&r2=49386&view=diff ============================================================================== --- trunk/product-creator/yast2-product-creator.spec.in (original) +++ trunk/product-creator/yast2-product-creator.spec.in Thu Jul 24 13:04:45 2008 @@ -1,7 +1,7 @@ @HEADER-COMMENT@ @HEADER@ -BuildRequires: perl-XML-Writer update-desktop-files yast2-devtools yast2-testsuite yast2-packager autoyast2-installation yast2-security yast2-add-on-creator +BuildRequires: perl-XML-Writer update-desktop-files yast2-devtools yast2-testsuite yast2-packager autoyast2-installation yast2-security yast2-add-on-creator yast2 PreReq: %fillup_prereq @@ -13,9 +13,8 @@ # SourceDialogs::IsPlainDir() Requires: yast2-packager >= 2.16.20 -# ag_content agent -Requires: yast2 >= 2.16.60 -BuildRequires: yast2 >= 2.16.60 +# changes in ag_anyxml agent +Requires: yast2 >= 2.17.8 # New API of StorageDevices.ycp Conflicts: yast2-storage < 2.16.1 -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org