
Hello community, here is the log from the commit of package yast2-installation checked in at Mon Jul 30 22:10:40 CEST 2007. -------- --- yast2-installation/yast2-installation.changes 2007-07-26 17:57:16.000000000 +0200 +++ /mounts/work_src_done/NOARCH/yast2-installation/yast2-installation.changes 2007-07-30 12:46:58.000000000 +0200 @@ -1,0 +2,14 @@ +Mon Jul 30 12:38:31 CEST 2007 - locilka@suse.cz + +- Added inst_upgrade_urls client which offers URLs used on the + system to be used during the upgrade as well (FATE #301785). +- Calling the client from control file. +- Adjusted RPM dependencies (.anyxml SCR agent). +- 2.15.37 + +------------------------------------------------------------------- +Sun Jul 29 22:39:31 CEST 2007 - locilka@suse.cz + +- Fixed curl parameters for network test in first stage (#295484). + +------------------------------------------------------------------- @@ -11 +25 @@ -- 2.13.35 +- 2.15.35 Old: ---- yast2-installation-2.15.36.tar.bz2 New: ---- yast2-installation-2.15.37.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-installation.spec ++++++ --- /var/tmp/diff_new_pack.v26481/_old 2007-07-30 22:09:33.000000000 +0200 +++ /var/tmp/diff_new_pack.v26481/_new 2007-07-30 22:09:33.000000000 +0200 @@ -1,5 +1,5 @@ # -# spec file for package yast2-installation (Version 2.15.36) +# spec file for package yast2-installation (Version 2.15.37) # # Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany. # This file and all modifications and additions to the pristine @@ -11,12 +11,12 @@ # norootforbuild Name: yast2-installation -Version: 2.15.36 +Version: 2.15.37 Release: 1 License: GPL v2 or later Group: System/YaST BuildRoot: %{_tmppath}/%{name}-%{version}-build -Source0: yast2-installation-2.15.36.tar.bz2 +Source0: yast2-installation-2.15.37.tar.bz2 prefix: /usr BuildRequires: docbook-xsl-stylesheets doxygen libxslt perl-XML-Writer sgml-skel update-desktop-files yast2-core-devel yast2-country yast2-devtools yast2-testsuite # Mode::live_installation @@ -30,8 +30,8 @@ # Language::selection_skipped, bugzilla #223258 Requires: yast2-country >= 2.15.0 Requires: yast2-network >= 2.15.37 -# inst_productsources client moved to... -Requires: yast2-packager >= 2.15.45 +# .anyxml SCR agent +Requires: yast2-packager >= 2.15.51 # Only in inst-sys # Requires: yast2-add-on # Requires: yast2-mouse @@ -71,12 +71,12 @@ BuildArchitectures: noarch Summary: YaST2 - Installation Parts %package devel-doc -Version: 2.15.36 +Version: 2.15.37 Release: 1 License: GPL v2 or later Group: System/YaST BuildRoot: %{_tmppath}/%{name}-%{version}-build -Source0: yast2-installation-2.15.36.tar.bz2 +Source0: yast2-installation-2.15.37.tar.bz2 prefix: /usr Requires: yast2-installation >= 2.15.34 PreReq: %fillup_prereq @@ -112,7 +112,7 @@ Lukas Ocilka <locilka@suse.cz> %prep -%setup -n yast2-installation-2.15.36 +%setup -n yast2-installation-2.15.37 %build %{prefix}/bin/y2tool y2autoconf @@ -186,12 +186,20 @@ %exclude %{prefix}/share/doc/packages/yast2-installation/README %changelog +* Mon Jul 30 2007 - locilka@suse.cz +- Added inst_upgrade_urls client which offers URLs used on the + system to be used during the upgrade as well (FATE #301785). +- Calling the client from control file. +- Adjusted RPM dependencies (.anyxml SCR agent). +- 2.15.37 +* Sun Jul 29 2007 - locilka@suse.cz +- Fixed curl parameters for network test in first stage (#295484). * Thu Jul 26 2007 - mzugec@suse.cz - set variables VNC and USE_SSH in S07-medium (#294485) - 2.15.36 * Wed Jul 25 2007 - mvidner@suse.cz - startup scripts: Call initviocons only if it exists (#173426). -- 2.13.35 +- 2.15.35 * Wed Jul 25 2007 - locilka@suse.cz - Renamed yast2-installation-doc to yast2-installation-devel-doc (FATE #302461). ++++++ yast2-installation-2.15.36.tar.bz2 -> yast2-installation-2.15.37.tar.bz2 ++++++ ++++ 2742 lines of diff (skipped) ++++ retrying with extended exclude list diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-installation-2.15.36/control/control.xml new/yast2-installation-2.15.37/control/control.xml --- old/yast2-installation-2.15.36/control/control.xml 2007-05-26 23:45:40.000000000 +0200 +++ new/yast2-installation-2.15.37/control/control.xml 2007-07-30 13:05:03.000000000 +0200 @@ -354,9 +354,14 @@ <enable_next>yes</enable_next> </module> <module> + <name>upgrade_urls</name> + <enable_back>yes</enable_back> + <enable_next>yes</enable_next> + </module> + <module> <label>Add-On Products</label> <name>add-on</name> - <enable_back>no</enable_back> + <enable_back>yes</enable_back> <enable_next>yes</enable_next> </module> <module> diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-installation-2.15.36/control/docs/control-doc.xml new/yast2-installation-2.15.37/control/docs/control-doc.xml --- old/yast2-installation-2.15.36/control/docs/control-doc.xml 2006-12-11 13:21:19.000000000 +0100 +++ new/yast2-installation-2.15.37/control/docs/control-doc.xml 2007-05-18 10:44:02.000000000 +0200 @@ -28,7 +28,7 @@ 0.1 </revnumber> <date> - $Date: 2004-10-27 16:25:24 +0200 (St, 27 okt 2004) $ + $Date: 2004-10-27 16:25:24 +0200 (Wed, 27 Oct 2004) $ </date> <revremark>Initial Release as PDF</revremark> </revision> diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-installation-2.15.36/src/clients/inst_network_setup.ycp new/yast2-installation-2.15.37/src/clients/inst_network_setup.ycp --- old/yast2-installation-2.15.36/src/clients/inst_network_setup.ycp 2007-07-26 17:26:59.000000000 +0200 +++ new/yast2-installation-2.15.37/src/clients/inst_network_setup.ycp 2007-07-30 12:00:42.000000000 +0200 @@ -1127,7 +1127,10 @@ "http://www.opensuse.org", "http://www.suse.com" ], { - string cmd = sformat ("curl --header --max-time=45 --connect-timeout=30 '%1' 1>/dev/null", String::Quote (www_address)); + string cmd = sformat ( + "curl --silent --show-error --max-time 45 --connect-timeout 30 '%1' 1>/dev/null", + String::Quote (www_address) + ); map run_cmd = (map) SCR::Execute (.target.bash_output, cmd); y2milestone ("Running %1 returned %2", cmd, run_cmd); diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-installation-2.15.36/src/clients/inst_upgrade_urls.ycp new/yast2-installation-2.15.37/src/clients/inst_upgrade_urls.ycp --- old/yast2-installation-2.15.36/src/clients/inst_upgrade_urls.ycp 1970-01-01 01:00:00.000000000 +0100 +++ new/yast2-installation-2.15.37/src/clients/inst_upgrade_urls.ycp 2007-07-30 12:38:03.000000000 +0200 @@ -0,0 +1,510 @@ +{ + // FATE #301785: Distribution upgrade should offer + // existing extra installation sources as Add-On + + import "Installation"; + import "FileUtils"; + import "Stage"; + import "GetInstArgs"; + import "FileUtils"; + import "Mode"; + import "Wizard"; + import "Progress"; + import "Label"; + import "NetworkService"; + import "Popup"; + import "AddOnProduct"; + + textdomain "installation"; + + symbol ret = `next; + if (GetInstArgs::going_back()) ret = `back; + + // --> Comment this out in case of testing on a running system + if (! Stage::initial()) { + y2milestone ("Not an initial stage"); + return ret; + } + if (! Mode::update()) { + y2milestone ("Not an udpate mode"); + return ret; + } + // <-- + + string dir_old = sformat ("%1/var/lib/zypp/db/sources/", Installation::destdir); + list <map <string, any> > old_urls = []; + + string dir_new = sformat ("%1/etc/zypp/repos.d/", Installation::destdir); + list <map> new_urls = []; + + list <map> already_registered_repos = []; + + void ReadOldTypeURLs () { + // Old-type URLs + list <string> all_source_files = (list <string>) SCR::Read (.target.dir, dir_old); + + if (all_source_files == nil || all_source_files == []) { + y2milestone ("No old zypp sources on the target"); + } else { + integer counter = -1; + + foreach (string one_source_file, all_source_files, { + one_source_file = sformat ("%1/%2", dir_old, one_source_file); + + if (! FileUtils::Exists (one_source_file)) { + y2error ("File doesn't exist: %1", one_source_file); + return; + } + + map xmlcontent = (map) SCR::Read (.anyxml, one_source_file); + + counter = counter + 1; + map <string, any> one_old_url = $[ + "url" : xmlcontent["source","url","value"]:nil, + "enabled" : xmlcontent["source","enabled","value"]:false, + "name" : xmlcontent["source","alias","value"]:nil, + ]; + + old_urls[counter] = one_old_url; + }); + + y2milestone ("URLs: %1", old_urls); + } + } + + void ReadNewTypeURLs () { + // New-type URLs + new_urls = (list <map>) SCR::Read (.zypp_repos, dir_new); + + if (new_urls == nil || new_urls == []) { + y2milestone ("No new zypp sources on the target"); + } else { + y2milestone ("URLs: %1", new_urls); + } + } + + void CreateListTableUI () { + Wizard::SetContents ( + // TRANSLATORS: dialog caption + _("Previously Used Repositories"), + `VBox ( + // TRANSLATORS: dialog text, possibly multiline, + // Please, do not use more than 50 characters per line. + `Left (`Label (_("These repositories were found on the system +you are just upgrading:"))), + `Table ( + `id ("table_of_repos"), + `opt (`notify), + `header ( + // TRANSLATORS: Table header item + _("Current Status"), + // TRANSLATORS: Table header item + _("Repository"), + // TRANSLATORS: Table header item + _("URL") + ), + [] + ), + `HBox ( + // TRANSLATORS: Push button + `PushButton (`id (`edit), _("&Change...")), + `HSpacing (1), + // TRANSLATORS: Push button + `PushButton (`id (`toggle), _("&Toggle Status")), + `HStretch() + ) + ), + // TRANSLATORS: help text 1/3 + _("<p>Here you can see all software repositories that were found +on the system you are just upgrading. You have better enable +those you want to include in the upgrade process.</p>") + + // TRANSLATORS: help text 2/3 + _("<p>To enable or disable an URL, click on the +<b>Toggle Status</b> button or double-click on the respective table item.</p>") + + // TRANSLATORS: help text 3/3 + _("<p>To change the URL, click on the <b>Change...</b> button.</p>"), + true, + true + ); + Wizard::SetTitleIcon ("yast-sw_source"); + } + + list <map> urls = []; + + void RedrawListTableUI () { + integer currentitem = (integer) UI::QueryWidget (`id ("table_of_repos"), `CurrentItem); + + integer counter = -1; + list <term> items = maplist (map one_url, urls, { + counter = counter + 1; + return `item ( + `id (counter), + (one_url["url_will_be_enabled"]:false ? + // TRANSLATORS: Table item status (repository) + _("Enabled") + : + // TRANSLATORS: Table item status (repository) + _("Disabled") + ), + // TRANSLATORS: Fallback name for a repository + one_url["name"]:_("Unknown"), + one_url["url"]:"" + ); + }); + + UI::ChangeWidget (`id ("table_of_repos"), `Items, items); + + if (currentitem != nil) { + UI::ChangeWidget (`id ("table_of_repos"), `CurrentItem, currentitem); + } + } + + boolean FindCurrentURLStatus (string baseurl) { + if (baseurl == "" || baseurl == nil) { + y2error ("Base URL not defined!"); + return false; + } + + boolean ret = false; + + foreach (map one_url, already_registered_repos, { + if (baseurl == one_url["media_url"]:"-A-") { + ret = true; + break; + } + }); + + return ret; + } + + integer FindURLMediaNr (string baseurl) { + if (baseurl == "" || baseurl == nil) { + y2error ("Base URL not defined!"); + return nil; + } + + integer ret = nil; + + foreach (map one_url, already_registered_repos, { + if (baseurl == one_url["media_url"]:"-A-") { + ret = one_url["media"]:-1; + break; + } + }); + + return ret; + } + + string FindURLName (string baseurl) { + if (baseurl == "" || baseurl == nil) { + y2error ("Base URL not defined!"); + return nil; + } + + string ret = nil; + + foreach (map one_url, already_registered_repos, { + if (baseurl == one_url["media_url"]:"-A-") { + ret = one_url["name"]:""; + break; + } + }); + + return ret; + } + + void EditItem (integer currentitem) { + if (currentitem == nil || currentitem < 0) { + y2error ("Cannot edit item: %1", currentitem); + return; + } + + string url = urls[currentitem, "url"]:""; + integer min_width = size (url); + + UI::OpenDialog ( + `VBox ( + // TRANSLATORS: textentry + `MinWidth (min_width, `TextEntry (`id (`url), _("&Repository URL"), url)), + `VSpacing (1), + `HBox ( + `PushButton (`id (`ok), Label::OKButton()), + `HSpacing (2), + `PushButton (`id (`cancel), Label::CancelButton()) + ) + ) + ); + + any ret = UI::UserInput (); + url = (string) UI::QueryWidget (`id (`url), `Value); + UI::CloseDialog(); + + if (ret == `cancel) { + return; + } + + urls[currentitem, "url"] = url; + } + + symbol HandleOldSources () { + urls = []; + + // If some new (since 10.3 Alpha?) URLs found, use only them + if (new_urls != nil && new_urls != []) { + foreach (map one_url_map, new_urls, { + urls = add (urls, $[ + "url" : one_url_map["baseurl"]:nil, + "name" : (one_url_map["name"]:"" == "" ? one_url_map["id"]:"" : one_url_map["name"]:""), + "enabled" : one_url_map["enabled"]:false, + ]); + }); + // Fallback, old URLs found + // 10.1, 10.2, 10.3 ... + } else if (old_urls != nil && old_urls != []) { + urls = old_urls; + } + + urls = maplist (map one_url, urls, { + one_url["url_will_be_enabled"] = FindCurrentURLStatus (tostring (one_url["url"]:"")); + one_url["initial_url_status"] = one_url["url_will_be_enabled"]:false; + return one_url; + }); + + y2milestone ("Offering: %1", urls); + y2milestone ("Already registered: %1", already_registered_repos); + + CreateListTableUI(); + RedrawListTableUI(); + + symbol ret = `next; + any ui_ret = nil; + + while (true) { + ui_ret = UI::UserInput(); + + if (ui_ret == "table_of_repos") ui_ret = `toggle; + + if (ui_ret == `toggle) { + integer currentitem = (integer) UI::QueryWidget (`id ("table_of_repos"), `CurrentItem); + if (currentitem != nil) { + urls[currentitem, "url_will_be_enabled"] = (! urls[currentitem,"url_will_be_enabled"]:false); + RedrawListTableUI(); + } + continue; + } else if (ui_ret == `next) { + ret = `next; + break; + } else if (ui_ret == `back) { + ret = `back; + break; + } else if (ui_ret == `abort) { + ret = `abort; + break; + } else if (ui_ret == `edit) { + integer currentitem = (integer) UI::QueryWidget (`id ("table_of_repos"), `CurrentItem); + EditItem (currentitem); + RedrawListTableUI(); + } else { + y2error ("Unknown UI input: %1", ui_ret); + } + } + + return ret; + } + + boolean NetworkRunning () { + boolean ret = false; + + while (true) { + if (NetworkService::isNetworkRunning()) { + ret = true; + break; + } + + // Network is not running + if (! Popup::AnyQuestion ( + // TRANSLATORS: popup header + _("Network is not Configured"), + // TRANSLATORS: popup question + _("Remote repositories require the Internet connection. + +Would you like to configure it?"), + Label::YesButton(), + Label::NoButton(), + `yes + )) { + y2milestone ("User decided not to setup the network"); + ret = false; + break; + } + + y2milestone ("User wants to setup the network"); + // Call network-setup client + any netret = WFM::call("inst_network_setup"); + + if (netret == `abort) { + y2milestone ("Aborting the network setup"); + break; + } + } + + return ret; + } + + void SetAddRemoveSourcesUI () { + Wizard::SetContents ( + // TRANSLATORS: dialog caption + _("Previously Used Repositories"), + `VBox ( + // TRANSLATORS: Progress text + `Label (_("Adding and removing repositories...")) + ), + // TRANSLATORS: help text + _("<p>Please wait while repositories are being added and removed.</p>"), + false, + false + ); + Wizard::SetTitleIcon ("yast-sw_source"); + } + + symbol AddOrRemoveSources () { + list <integer> sources_to_remove = []; + list <string> sources_to_add = []; + + + + foreach (map one_source, urls, { + string url = one_source["url"]:""; + integer current_medianr = FindURLMediaNr (url); + + // Source should be enabled at the end + if (one_source["url_will_be_enabled"]:nil == true) { + if (current_medianr == nil) { + sources_to_add = add (sources_to_add, url); + } + // Source should be disabled at the end + } else if (one_source["url_will_be_enabled"]:nil == false) { + if (current_medianr != nil) { + sources_to_remove = add (sources_to_remove, current_medianr); + } + } + }); + + if (size(sources_to_remove) > 0 || size (sources_to_add) > 0) { + SetAddRemoveSourcesUI(); + } + + y2milestone ("Deleting repos: %1", sources_to_remove); + foreach (integer one_id, sources_to_remove, { + Pkg::SourceDelete (one_id); + + AddOnProduct::add_on_products = (list <map <string, any> >) filter ( + map one_addon, AddOnProduct::add_on_products, { + return one_addon["media"]:-42 != one_id; + } + ); + + }); + + // Remote repositories need network + if ((size(sources_to_add) > 0) && NetworkRunning()) { + y2milestone ("Adding repos: %1", sources_to_add); + foreach (string one_url, sources_to_add, { + integer new_id = Pkg::SourceCreate (one_url, "/"); + if (new_id > -1) { + AddOnProduct::add_on_products = add ( + AddOnProduct::add_on_products, + $[ + "media" : new_id, + "media_url" : one_url, + "product_dir" : "/", + "product" : FindURLName (one_url), + "autoyast_product" : "", + ] + ); + } + }); + } + + return `next; + } + + void SetProgressUI () { + Progress::New ( + // TRANSLATORS: dialog caption + _("Reading Repositories Used on the System"), + " ", + 2, + [ + // TRANSLATORS: progress step + _("Read previously used repositories"), + _("Initialize package manager"), + ], + [ + // TRANSLATORS: progress step + _("Reading previously used repositories..."), + _("Initializing package manager..."), + ], + // TRANSLATORS: dialog help + _("<p>Please wait, while repositories are being read...</p>") + ); + Wizard::SetTitleIcon ("yast-sw_source"); + } + + // for testing purpose + if (Mode::normal()) Wizard::CreateDialog(); + + SetProgressUI(); + Progress::NextStage(); + + // Read the old repos (old type) + if (FileUtils::Exists (dir_old)) + ReadOldTypeURLs (); + else + y2milestone ("Skipping ReadOldTypeURLs()"); + + // Read the old repos (new type) + if (FileUtils::Exists (dir_new)) + ReadNewTypeURLs (); + else + y2milestone ("Skipping ReadNewTypeURLs()"); + Progress::NextStage(); + + boolean continue_processing = false; + if ((old_urls != nil && old_urls != []) || (new_urls != nil && new_urls != [])) { + continue_processing = true; + // initialize zypp + Pkg::TargetInitialize (Installation::destdir); + Pkg::SourceStartManager (false); + + foreach (integer one_id, Pkg::SourceGetCurrent (true), { + map source_data = Pkg::SourceGeneralData (one_id); + + already_registered_repos = add (already_registered_repos, $[ + "media_url" : source_data["url"]:"", + "product_dir" : source_data["product_dir"]:"", + "media" : one_id, + ]); + }); + } + + Progress::NextStage(); + Progress::Finish(); + + if (! continue_processing) { + y2milestone ("No sources found"); + return ret; + } + + ret = HandleOldSources(); + if (ret == `next) ret = AddOrRemoveSources(); + + // for testing purpose + if (Mode::normal()) { + if (ret == `next) Pkg::SourceSaveAll(); + Wizard::CloseDialog(); + } + + y2milestone ("Returning %1", ret); + return ret; +} \ No newline at end of file diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-installation-2.15.36/src/clients/release_notes_popup.ycp new/yast2-installation-2.15.37/src/clients/release_notes_popup.ycp --- old/yast2-installation-2.15.36/src/clients/release_notes_popup.ycp 2006-12-11 13:21:25.000000000 +0100 +++ new/yast2-installation-2.15.37/src/clients/release_notes_popup.ycp 2007-07-30 13:33:06.000000000 +0200 @@ -6,7 +6,7 @@ * * Display release notes. * - * $Id: release_notes_popup.ycp 34411 2006-11-15 13:45:11Z locilka $ + * $Id: release_notes_popup.ycp 39771 2007-07-30 11:16:59Z jsrain $ */ { @@ -25,6 +25,8 @@ string text = ""; +// FIXME similar function in packager/include/load_release_notes.ycp + /* function to load release notes */ define boolean load_release_notes () { diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-installation-2.15.36/VERSION new/yast2-installation-2.15.37/VERSION --- old/yast2-installation-2.15.36/VERSION 2007-07-26 17:51:27.000000000 +0200 +++ new/yast2-installation-2.15.37/VERSION 2007-07-30 12:39:58.000000000 +0200 @@ -1 +1 @@ -2.15.36 +2.15.37 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@Hilbert.suse.de