Mailinglist Archive: opensuse-commit (2092 mails)

< Previous Next >
commit yast2-installation
  • From: root@xxxxxxxxxxxxxxx (h_root)
  • Date: Thu, 02 Aug 2007 22:11:12 +0200
  • Message-id: <20070802201112.9FF28678331@xxxxxxxxxxxxxxx>

Hello community,

here is the log from the commit of package yast2-installation
checked in at Thu Aug 2 22:11:12 CEST 2007.

--------
--- yast2-installation/yast2-installation.changes       2007-07-30 12:46:58.000000000 +0200
+++ /mounts/work_src_done/NOARCH/yast2-installation/yast2-installation.changes  2007-08-01 10:34:06.000000000 +0200
@@ -1,0 +2,15 @@
+Wed Aug  1 10:33:45 CEST 2007 - mvidner@xxxxxxx
+
+- Removed Provides/Obsoletes for ancient yast package names,
+  with the devel-doc subpackage they broke yast2-schema build.
+- 2.15.38
+
+-------------------------------------------------------------------
+Tue Jul 31 11:29:53 CEST 2007 - lslezak@xxxxxxx
+
+- inst_extrasources - register the extra repositories in content
+  file automatically without asking user (#290040), do not download
+  metadata from the extra sources (offline registration) (#290040,
+  #288640)
+
+-------------------------------------------------------------------

Old:
----
  yast2-installation-2.15.37.tar.bz2

New:
----
  yast2-installation-2.15.38.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ yast2-installation.spec ++++++
--- /var/tmp/diff_new_pack.L16951/_old  2007-08-02 22:09:06.000000000 +0200
+++ /var/tmp/diff_new_pack.L16951/_new  2007-08-02 22:09:06.000000000 +0200
@@ -1,5 +1,5 @@
 #
-# spec file for package yast2-installation (Version 2.15.37)
+# spec file for package yast2-installation (Version 2.15.38)
 #
 # 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.37
+Version:        2.15.38
 Release:        1
 License:        GPL v2 or later
 Group:          System/YaST
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
-Source0:        yast2-installation-2.15.37.tar.bz2
+Source0:        yast2-installation-2.15.38.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
@@ -60,28 +60,18 @@
 Recommends:    yast2-update
 Recommends:    yast2-add-on
 PreReq:         %fillup_prereq
-Provides:       yast
-Obsoletes:      yast
-Provides:       yast2-trans-inst-proposal y2t_inst
-Obsoletes:      yast2-trans-inst-proposal y2t_inst
-Provides:       yast2-trans-inst-general y2t_inst-general
-Obsoletes:      yast2-trans-inst-general y2t_inst-general
-Provides:       yast2-instsys
-Obsoletes:      yast2-instsys
 BuildArchitectures: noarch
 Summary:        YaST2 - Installation Parts
 %package devel-doc
-Version:        2.15.37
+Version:        2.15.38
 Release:        1
 License:        GPL v2 or later
 Group:          System/YaST
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
-Source0:        yast2-installation-2.15.37.tar.bz2
+Source0:        yast2-installation-2.15.38.tar.bz2
 prefix:                /usr
 Requires:       yast2-installation >= 2.15.34
 PreReq:         %fillup_prereq
-Provides:       yast
-Obsoletes:      yast
 Summary:        YaST2 - Installation Parts
 
 %description
@@ -112,7 +102,7 @@
     Lukas Ocilka <locilka@xxxxxxx>
 
 %prep
-%setup -n yast2-installation-2.15.37
+%setup -n yast2-installation-2.15.38
 
 %build
 %{prefix}/bin/y2tool y2autoconf
@@ -186,6 +176,15 @@
 %exclude %{prefix}/share/doc/packages/yast2-installation/README
 
 %changelog
+* Wed Aug 01 2007 - mvidner@xxxxxxx
+- Removed Provides/Obsoletes for ancient yast package names,
+  with the devel-doc subpackage they broke yast2-schema build.
+- 2.15.38
+* Tue Jul 31 2007 - lslezak@xxxxxxx
+- inst_extrasources - register the extra repositories in content
+  file automatically without asking user (#290040), do not download
+  metadata from the extra sources (offline registration) (#290040,
+  [#288640])
 * Mon Jul 30 2007 - locilka@xxxxxxx
 - Added inst_upgrade_urls client which offers URLs used on the
   system to be used during the upgrade as well (FATE #301785).

++++++ yast2-installation-2.15.37.tar.bz2 -> yast2-installation-2.15.38.tar.bz2 ++++++
++++ 1868 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.37/configure.in new/yast2-installation-2.15.38/configure.in
--- old/yast2-installation-2.15.37/configure.in 2007-07-25 13:51:08.000000000 +0200
+++ new/yast2-installation-2.15.38/configure.in 2007-08-01 10:34:18.000000000 +0200
@@ -1,9 +1,9 @@
 dnl configure.in for yast2-installation
 dnl
-dnl -- This file is generated by y2autoconf 2.15.0 - DO NOT EDIT! --
+dnl -- This file is generated by y2autoconf 2.15.2 - DO NOT EDIT! --
 dnl    (edit configure.in.in instead)
 
-AC_INIT(yast2-installation, 2.15.35, http://bugs.opensuse.org/, yast2-installation)
+AC_INIT(yast2-installation, 2.15.38, http://bugs.opensuse.org/, yast2-installation)
 dnl Check for presence of file 'RPMNAME'
 AC_CONFIG_SRCDIR([RPMNAME])
 
@@ -17,7 +17,7 @@
 AM_INIT_AUTOMAKE(tar-ustar) dnl searches for some needed programs
 
 dnl Important YaST2 variables
-VERSION="2.15.35"
+VERSION="2.15.38"
 RPMNAME="yast2-installation"
 MAINTAINER="Lukas Ocilka <locilka@xxxxxxx>"
 
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.37/control/docs/control-doc.xml new/yast2-installation-2.15.38/control/docs/control-doc.xml
--- old/yast2-installation-2.15.37/control/docs/control-doc.xml 2007-05-18 10:44:02.000000000 +0200
+++ new/yast2-installation-2.15.38/control/docs/control-doc.xml 2005-04-19 15:34:02.000000000 +0200
@@ -28,7 +28,7 @@
                 0.1
             </revnumber>
             <date>
-                $Date: 2004-10-27 16:25:24 +0200 (Wed, 27 Oct 2004) $
+                $Date: 2004-10-27 16:25:24 +0200 (St, 27 říj 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.37/src/clients/inst_extrasources.ycp new/yast2-installation-2.15.38/src/clients/inst_extrasources.ycp
--- old/yast2-installation-2.15.37/src/clients/inst_extrasources.ycp    2007-07-12 13:37:18.000000000 +0200
+++ new/yast2-installation-2.15.38/src/clients/inst_extrasources.ycp    2007-08-01 10:07:52.000000000 +0200
@@ -1,7 +1,7 @@
 /**
  * File:       clients/inst_extrasources.ycp
  * Package:    yast2-installation
- * Summary:    Add extra installation sources from content file
+ * Summary:    Automatically register software repositories from content file
  * Authors:    Ladislav Slezák <lslezak@xxxxxxx>
  *
  * Assumptions:
@@ -9,6 +9,8 @@
  *   (bugzilla #263289)
  * - the sources will be saved afterwards
  *   (which means that running this client alone will not work)
+ * - the added sources are disabled by default and they are added
+ *   in offline mode (no metadata is dowloaded)
  *
  * $Id$
  */
@@ -18,177 +20,22 @@
 textdomain "installation";
 
 import "GetInstArgs";
-import "Popup";
 import "SourceManager";
-import "Label";
 import "Mode";
-import "String";
-import "Internet";
 import "PackageLock";
-import "Installation";
-
-// editUrl()
-include "packager/inst_source_dialogs.ycp";
 
 // the tag providing location of the additional sources in content file
 string content_file_tag = "EXTRAURLS";
 string optional_tag = "OPTIONALURLS";
 
 /**
- * Show a confirmation dialog with list of the extra sources.
- * @param urls list of URLs
- * @return boolean true if the user wants to register the sources
- */
-list<string> ConfirmExtraSources(map<string,boolean> urls)
-{
-    list<term> items = [];
-
-    // display the enabled sources at the beginning of the list
-    foreach(string url, boolean deflt, urls,
-       {
-           if (deflt)
-           {
-               items = add(items, `item(`id(url), url, deflt));
-           }
-       }
-    );
-
-    foreach(string url, boolean deflt, urls,
-       {
-           if (!deflt)
-           {
-               items = add(items, `item(`id(url), url, deflt));
-           }
-       }
-    );
-
-    integer width = 76;
-    integer height = 8;
-
-    term popup = `HBox(
-       `HSpacing(1),
-       `VBox(
-           `VSpacing(0.2),
-           // heading in a popup window
-           `Heading(_("Additional Repositories")),
-           `VSpacing(0.2),
-           `VBox(
-               `HSpacing(width),
-               `HBox(
-                   `VSpacing(height),
-                   // label
-                   `MultiSelectionBox(`id(`multi), _("Repository to Register"), items)
-               )
-           ),
-           `VSpacing(0.2),
-           // label - use more lines for the translated message (no more than about 60 characters per line)
-           `Label(_("Later you can install additional software from these external repositories.\nRegister the repository now?")),
-           `VSpacing(0.5),
-           `HBox(
-               `HStretch(),
-               `PushButton(`id(`yes), `opt(`default, `key_F10), Label::YesButton()),
-               `HSpacing(2),
-               `PushButton(`id(`no), `opt(`key_F9), Label::NoButton()),
-               `HStretch()
-           ),
-           `VSpacing(0.5)
-           ),
-       `HSpacing(1)
-    );
-
-    UI::OpenDialog(`opt(`decorated), popup);
-
-    symbol ui = (symbol)UI::UserInput();
-    y2milestone("Extra sources confirmed: %1", ui);
-
-    list<string> selected_items = (list<string>) UI::QueryWidget(`id(`multi), `SelectedItems);
-    y2milestone("Selected items: %1", selected_items);
-
-    UI::CloseDialog();
-
-    return (ui == `yes) ? selected_items : [];
-}
-
-/**
- * Temporarily start the network
- * @return map The network status before starting
- */
-define map<string,boolean> NetworkStart()
-{
-    // network connection status
-    boolean already_up = false;
-
-    // flag: demand has been changed
-    boolean i_set_demand = false;
-
-    if (!Mode::test())
-        already_up = Internet::Status();
-
-    if (!already_up)
-    {
-       // label - text in a popup window, progress indicator
-       UI::OpenDialog(`opt(`decorated), `Label(_("Testing the Internet Connection...")));
-
-       // this code is from inst_you.ycp
-       if (!Internet::demand)
-       {
-           Internet::SetDemand (true);
-           i_set_demand = true;
-       }
-
-       Internet::Start ("");
-
-       integer i = 150;
-       while (i > 0)
-       {
-           if (!Internet::Status ())
-               break;
-
-           if (Internet::Connected ())
-               break;
-
-           // ping anything (www.suse.com) to trigger dod connections
-           //
-           // This ping should only set the network up,
-           // The IP now is different to the current www.suse.com's IP
-           // but it doesn't matter, what we need is just a network traffic.
-           SCR::Execute (.target.bash_background,
-                         "/bin/ping -c 1 -w 1 213.95.15.200");
-
-           sleep (1000);
-       }
-
-       UI::CloseDialog();
-    }
-
-    return $["already_up" : already_up, "i_set_demand" : i_set_demand];
-}
-
-/**
- * Restore the network status
- * @param original_status original status before starting the network
- */
-define void NetworkStop(map<string,boolean> original_status)
-{
-    if (!original_status["already_up"]:false)
-    {
-       Internet::Stop("");
-
-       if (original_status["i_set_demand"]:false)
-       {
-           Internet::SetDemand(false);
-       }
-    }
-}
-
-/**
  * Dowload and parse content files from current installation sources
- * @param registered
- * @return map Extra URLs for each source:  $[ string source_url : list<string> extra_urls ]
+ * @param registered URLs of already registered repositories (they will be ignored to not register the same repository one more)
+ * @return list<string> Extra URLs to register
  */
-define map<string,boolean> GetExtraURLs(list<string> registered)
+define list<string> GetExtraURLs(list<string> registered)
 {
-    map<string,boolean> extra_urls = $[];
+    list<string> extra_urls = [];
 
     list<map> products = Pkg::ResolvableProperties("", `product, "");
     y2milestone("Products: %1", products);
@@ -206,7 +53,7 @@
                        // is the URL already registered?
                        if (!contains(registered, url))
                        {
-                           extra_urls = add(extra_urls, url, true);
+                           extra_urls = add(extra_urls, url);
                        }
                        else
                        {
@@ -223,7 +70,7 @@
                        // is the URL already registered?
                        if (!contains(registered, url))
                        {
-                           extra_urls = add(extra_urls, url, false);
+                           extra_urls = add(extra_urls, url);
                        }
                        else
                        {
@@ -241,45 +88,41 @@
 }
 
 /**
- * Register the installation sources
+ * Register the installation sources in offline mode (no network connection required).
+ * The repository metadata will be downloaded by sw_single (or another yast module) when the repostory is enabled
  * @param url_list list of the sources to register
  * @return list<integer> list of created source IDs
  */
-define list<integer> RegisterSources(list<string> url_list)
+define list<integer> RegisterRepos(list<string> url_list)
 {
     list<integer> ret = [];
+    y2milestone("Repositories to register: %1", url_list);
 
     foreach(string new_url, url_list,
        {
-           boolean again = true;
-           while (again)
+           // map with repository parameters: $[ "enabled" : boolean,
+           // "autorefresh" : boolean, "name" : string, "alias" : string,
+           // "base_urls" : list<string>, "prod_dir" : string, "type" : string ]
+           map<string,any> repo_prop = $[];
+
+           // extra repos are disabled by default
+           repo_prop["enabled"] = false;
+           repo_prop["autorefresh"] = true;
+           repo_prop["name"] = new_url;
+           repo_prop["alias"] = new_url;
+           repo_prop["base_urls"] = [ new_url ];
+
+           integer new_repo_id = Pkg::RepositoryAdd(repo_prop);
+
+           if (new_repo_id >= 0)
            {
-               integer srcid = Pkg::SourceCreate(new_url, "/");
-               y2milestone ("Created source %1: %2", srcid, new_url);
+               y2milestone("Registered extra repository: %1: %2", new_repo_id, repo_prop);
 
-               if (srcid == -1)
-               {
-                   // popup message
-                   if (Popup::YesNo (_("An error occurred while creating the installation source.") + "\n"
-                       // popup message
-                       + _("Details:") + "\n" + Pkg::LastError() + "\n" + _("Try again?")))
-                   {
-                       new_url = editUrl (new_url);
-                   }
-                   else
-                   {
-                       again = false;
-                   }
-               }
-               else
-               {
-                   // disable the source
-                   Pkg::SourceSetEnabled(srcid, false);
-
-                   // remember the ID
-                   ret = add (ret, srcid);
-                   again = false;
-               }
+               ret = add(ret, new_repo_id);
+           }
+           else
+           {
+               y2error("Cannot register: %1", repo_prop);
            }
        }
     );
@@ -341,16 +184,6 @@
     return `auto;
 }
 
-// remember the original network status
-map<string,boolean> net_config = NetworkStart();
-
-if (!Internet::Connected())
-{
-    y2warning("Cannot connect to the internet, skipping extra source configuration");
-    NetworkStop(net_config);
-    return `auto;
-}
-
 // bugzilla #263289
 if (! InitializePackager()) {
     y2error ("Cannot connect to the Packager");
@@ -360,33 +193,23 @@
 list <string> already_registered = RegisteredUrls();
 
 // $[ string url : boolean default ]
-map<string,boolean> register_url = GetExtraURLs(already_registered);
-
+list<string> register_url = GetExtraURLs(already_registered);
 
 // any confirmed source to register?
 if (size(register_url) > 0)
 {
-    list<string> confirmed_sources = ConfirmExtraSources(register_url);
-    {
-       // register (create) the sources
-       list<integer> added_ids = RegisterSources(confirmed_sources);
+    // register (create) the sources
+    list<integer> added_ids = RegisterRepos(register_url);
 
-       // synchronize the sources if any source has been added
-       if (size(added_ids) > 0)
-       {
-           // reload (disable) the resolvables
-           Pkg::SourceLoad();
-
-           y2milestone ("syncing to zmd");
-           boolean synced = SourceManager::SyncAddedAndDeleted (added_ids, []);
-           y2milestone ("sync status: %1", synced);
-       }
+    // synchronize the sources if any source has been added
+    if (size(added_ids) > 0)
+    {
+       y2milestone ("syncing to zmd");
+       boolean synced = SourceManager::SyncAddedAndDeleted (added_ids, []);
+       y2milestone ("sync status: %1", synced);
     }
 }
 
-// restore the network status
-NetworkStop(net_config);
-
 return `auto;
 
 /* EOF */
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.37/VERSION new/yast2-installation-2.15.38/VERSION
--- old/yast2-installation-2.15.37/VERSION      2007-07-30 12:39:58.000000000 +0200
+++ new/yast2-installation-2.15.38/VERSION      2007-08-01 10:33:23.000000000 +0200
@@ -1 +1 @@
-2.15.37
+2.15.38


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++



Remember to have fun...

---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-commit+help@xxxxxxxxxxxx

< Previous Next >