Hello community,

here is the log from the commit of package yast2-packager for openSUSE:Factory
checked in at Mon Jun 27 12:03:48 CEST 2011.



--------
--- yast2-packager/yast2-packager.changes       2011-04-23 13:37:10.000000000 
+0200
+++ /mounts/work_src_done/STABLE/yast2-packager/yast2-packager.changes  
2011-06-23 12:10:29.000000000 +0200
@@ -1,0 +2,31 @@
+Thu Jun 23 10:05:37 UTC 2011 - [email protected]
+
+- display installation summary when installation is aborted by user
+  (part of bnc#673629)
+- 2.21.3
+
+-------------------------------------------------------------------
+Tue Jun 14 08:37:57 UTC 2011 - [email protected]
+
+- support for download in advance mode in yast2-wagon (fate#308951)
+- 2.21.2
+
+-------------------------------------------------------------------
+Mon Jun 13 13:28:56 UTC 2011 - [email protected]
+
+- properly count to be downloaded packages (bnc#683977)
+- update download progress also for delta rpm files
+- 2.21.1
+
+-------------------------------------------------------------------
+Fri Jun 10 09:34:21 CEST 2011 - [email protected]
+
+- Added support for add_on_products[.xml] also in inst-sys
+  (FATE #312263). File need to be in the root of inst-sys.
+
+-------------------------------------------------------------------
+Fri Jun  3 11:47:24 CEST 2011 - [email protected]
+
+- Enhanced AddOnProduct Import functionality (FATE #311374)
+
+-------------------------------------------------------------------

calling whatdependson for head-i586


Old:
----
  yast2-packager-2.21.0.tar.bz2

New:
----
  yast2-packager-2.21.3.tar.bz2

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

Other differences:
------------------
++++++ yast2-packager.spec ++++++
--- /var/tmp/diff_new_pack.HVSthJ/_old  2011-06-27 12:01:20.000000000 +0200
+++ /var/tmp/diff_new_pack.HVSthJ/_new  2011-06-27 12:01:20.000000000 +0200
@@ -19,16 +19,16 @@
 
 
 Name:           yast2-packager
-Version:        2.21.0
+Version:        2.21.3
 Release:        1
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
-Source0:        yast2-packager-2.21.0.tar.bz2
+Source0:        yast2-packager-2.21.3.tar.bz2
 
 Prefix:         /usr
 
 Group:          System/YaST
-License:        GPLv2+
+License:        GPL v2 or later
 BuildRequires:  gcc-c++ libxcrypt-devel perl-XML-Writer update-desktop-files 
yast2-country-data yast2-devtools yast2-slp yast2-testsuite yast2-xml
 
 # HTTP.ycp
@@ -38,13 +38,13 @@
 BuildRequires:  yast2 >= 2.18.1
 
 # changed StartPackage callback signature
-BuildRequires:  yast2-pkg-bindings >= 2.20.3
+BuildRequires:  yast2-pkg-bindings >= 2.21.1
 
 # Newly added RPM
 Requires:       yast2-country-data >= 2.16.3
 
 # changed StartPackage callback signature
-Requires:       yast2-pkg-bindings >= 2.20.3
+Requires:       yast2-pkg-bindings >= 2.21.1
 
 # Installation summary in PackagesUI::
 Requires:       yast2 >= 2.18.1
@@ -86,7 +86,7 @@
 Summary:        YaST2 - Package Library
 
 %package webpin
-License:        GPLv2+
+
 
 Group:          System/YaST
 Summary:        YaST2 - Webpin package search client
@@ -100,7 +100,7 @@
 (webpin) and installing them via OneClickInstall
 
 %prep
-%setup -n yast2-packager-2.21.0
+%setup -n yast2-packager-2.21.3
 
 %build
 %{prefix}/bin/y2tool y2autoconf

++++++ yast2-packager-2.21.0.tar.bz2 -> yast2-packager-2.21.3.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-packager-2.21.0/agents/etc_zypp_conf.scr 
new/yast2-packager-2.21.3/agents/etc_zypp_conf.scr
--- old/yast2-packager-2.21.0/agents/etc_zypp_conf.scr  2010-12-10 
16:34:13.000000000 +0100
+++ new/yast2-packager-2.21.3/agents/etc_zypp_conf.scr  2011-06-09 
19:18:06.000000000 +0200
@@ -1,35 +1,24 @@
 /**
  * File:
  *   etc_zypp_conf.scr
+ *
  * Summary:
  *   SCR Agent for reading/writing /etc/zypp/zypp.conf file
  *   using the ini-agent
+ *
  * Access:
  *   read/write
+ *
  * Authors:
  *   Ladislav Slezak <[email protected]>
- * Example:
- *
- *   Read list of available files
- *   SCR::Dir(.etc.zypp_conf)
- *
- *   Read list of sections in a file
- *   
SCR::Dir(.etc.policykit.section."/etc/PolicyKit/privilege.d/hal-power-hibernate.privilege")
- *   (["Privilege"])
- *
- *   Read list of options in a section
- *   
SCR::Dir(.etc.policykit.value."/etc/PolicyKit/privilege.d/hal-power-hibernate.privilege"."Privilege")
- *   (["RequiredPrivileges", "SufficientPrivileges", "Allow", "Deny", 
"CanObtain", "CanGrant", "ObtainRequireRoot"])
- *
- *   Read an option
- *   
SCR::Read(.etc.policykit.value."/etc/PolicyKit/privilege.d/hal-power-hibernate.privilege"."Privilege"."RequiredPrivileges")
- *   ("desktop-console")
  *
+ * Example:
  *
- *   Write an option
- *   
SCR::Write(.etc.policykit.value."/etc/PolicyKit/privilege.d/hal-power-hibernate.privilege"."Privilege"."RequiredPrivileges",
 "")
- *   (true)
+ *   Get list of sections
+ *   SCR::Dir(.etc.zypp_conf.section)
  *
+ *   Get a value
+ *   SCR::Read(.etc.zypp_conf.value.main."commit.downloadMode")
  *
  *   Flush the changes
  *   SCR::Write(.etc.zypp_conf, nil)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-packager-2.21.0/configure 
new/yast2-packager-2.21.3/configure
--- old/yast2-packager-2.21.0/configure 2011-04-23 13:34:29.000000000 +0200
+++ new/yast2-packager-2.21.3/configure 2011-06-23 12:08:30.000000000 +0200
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for yast2-packager 2.21.0.
+# Generated by GNU Autoconf 2.68 for yast2-packager 2.21.3.
 #
 # Report bugs to <http://bugs.opensuse.org/>.
 #
@@ -559,8 +559,8 @@
 # Identity of this package.
 PACKAGE_NAME='yast2-packager'
 PACKAGE_TARNAME='yast2-packager'
-PACKAGE_VERSION='2.21.0'
-PACKAGE_STRING='yast2-packager 2.21.0'
+PACKAGE_VERSION='2.21.3'
+PACKAGE_STRING='yast2-packager 2.21.3'
 PACKAGE_BUGREPORT='http://bugs.opensuse.org/'
 PACKAGE_URL=''
 
@@ -1229,7 +1229,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures yast2-packager 2.21.0 to adapt to many kinds of 
systems.
+\`configure' configures yast2-packager 2.21.3 to adapt to many kinds of 
systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1300,7 +1300,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of yast2-packager 2.21.0:";;
+     short | recursive ) echo "Configuration of yast2-packager 2.21.3:";;
    esac
   cat <<\_ACEOF
 
@@ -1380,7 +1380,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-yast2-packager configure 2.21.0
+yast2-packager configure 2.21.3
 generated by GNU Autoconf 2.68
 
 Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1397,7 +1397,7 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by yast2-packager $as_me 2.21.0, which was
+It was created by yast2-packager $as_me 2.21.3, which was
 generated by GNU Autoconf 2.68.  Invocation command line was
 
   $ $0 $@
@@ -2327,7 +2327,7 @@
 
 # Define the identity of the package.
  PACKAGE='yast2-packager'
- VERSION='2.21.0'
+ VERSION='2.21.3'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -2449,7 +2449,7 @@
 
 
 
-VERSION="2.21.0"
+VERSION="2.21.3"
 RPMNAME="yast2-packager"
 MAINTAINER="Ladislav Slezak <[email protected]>"
 
@@ -3379,7 +3379,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by yast2-packager $as_me 2.21.0, which was
+This file was extended by yast2-packager $as_me 2.21.3, which was
 generated by GNU Autoconf 2.68.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -3432,7 +3432,7 @@
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; 
s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-yast2-packager config.status 2.21.0
+yast2-packager config.status 2.21.3
 configured by $0, generated by GNU Autoconf 2.68,
   with options \\"\$ac_cs_config\\"
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-packager-2.21.0/configure.in 
new/yast2-packager-2.21.3/configure.in
--- old/yast2-packager-2.21.0/configure.in      2011-04-23 13:34:23.000000000 
+0200
+++ new/yast2-packager-2.21.3/configure.in      2011-06-23 12:08:28.000000000 
+0200
@@ -3,7 +3,7 @@
 dnl -- This file is generated by y2autoconf 2.18.11 - DO NOT EDIT! --
 dnl    (edit configure.in.in instead)
 
-AC_INIT(yast2-packager, 2.21.0, http://bugs.opensuse.org/, yast2-packager)
+AC_INIT(yast2-packager, 2.21.3, http://bugs.opensuse.org/, yast2-packager)
 dnl Check for presence of file 'RPMNAME'
 AC_CONFIG_SRCDIR([RPMNAME])
 
@@ -18,7 +18,7 @@
 AM_INIT_AUTOMAKE(tar-ustar -Wno-portability)
 
 dnl Important YaST2 variables
-VERSION="2.21.0"
+VERSION="2.21.3"
 RPMNAME="yast2-packager"
 MAINTAINER="Ladislav Slezak <[email protected]>"
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-packager-2.21.0/packager.pot 
new/yast2-packager-2.21.3/packager.pot
--- old/yast2-packager-2.21.0/packager.pot      1970-01-01 01:00:00.000000000 
+0100
+++ new/yast2-packager-2.21.3/packager.pot      2008-09-10 10:47:12.000000000 
+0200
@@ -0,0 +1,99 @@
+# translation of packager.po to
+# Copyright (C) YEAR SuSE Linux Products GmbH, Nuernberg
+# This file is distributed under the same license as the PACKAGE package.
+#
+# Andrew Spackman <[email protected]>, 2008.
+msgid ""
+msgstr ""
+"Project-Id-Version: packager\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2008-08-04 13:54+0200\n"
+"PO-Revision-Date: 2008-08-27 21:38+1200\n"
+"Last-Translator: Andrew Spackman <[email protected]>\n"
+"Language-Team:  <[email protected]>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.11.4\n"
+
+#: src/clients/inst_packages.ycp:76
+msgid ""
+"<p>\n"
+"\t\t This dialog allows you to define this system's tasks and what software 
to install.\n"
+"\t\t Available tasks and software for this system are shown by category in 
the left\n"
+"\t\t column.  To view a description for an item, select it in the list.\n"
+"\t\t </p>"
+msgstr ""
+"<p>\n"
+"\t\t This dialog allows you to define this system's tasks and the software 
that has to be installed.\n"
+"\t\t Available tasks and software for this system are shown by category in 
the left\n"
+"\t\t column. To view a description for an item, select it in the list.\n"
+"\t\t </p>"
+
+#. TRANSLATORS: dialog help
+#: src/clients/inst_productsources.ycp:600
+msgid ""
+"<p>Please wait while the packager is being initialized\n"
+"and the list of servers dowloaded from Web.</p>\n"
+msgstr ""
+"<p>Please wait while the packager is being initialized\n"
+"and the list of servers downloaded from the Web.</p>\n"
+
+#. help, continued
+#: src/clients/repositories.ycp:486
+msgid ""
+"<p>\n"
+"<b>Synchronize Changes with ZENworks</b> will call <tt>rug</tt>\n"
+"to also perform the changes in that package management system.</p>\n"
+msgstr ""
+"<p>\n"
+"<b>Synchronize Changes with ZENworks</b> will also call <tt>rug</tt>\n"
+"to perform the changes in that package management system.</p>\n"
+
+#: src/clients/webpin_package_search.ycp:223
+msgid ""
+"<p><big><b>Security</b></big><br>\n"
+"The software found is often not part of the distribution itself and the level 
of trust\n"
+"depends on yourself. We do not take any responsibilities for installing\n"
+"such software.</p>"
+msgstr ""
+"<p><big><b>Security</b></big><br>\n"
+"The software found is often not part of the distribution itself and the level 
of trust\n"
+"depends on yourself. We do not take any responsibility for installing\n"
+"such software.</p>"
+
+#. help text - media check 2/8
+#: src/include/checkmedia/ui.ycp:279
+msgid ""
+"<P>When you have a problem with\n"
+"the installation and are using a CD or DVD installation medium, you should 
check\n"
+"whether the medium is broken.</P>\n"
+msgstr ""
+"<P>When you have a problem with\n"
+"the installation and you are using a CD or DVD installation medium, you 
should check\n"
+"whether the medium is broken.</P>\n"
+
+#: src/include/checkmedia/ui.ycp:432
+msgid ""
+"The medium does not contain MD5 checksum.\n"
+"The content of the medium cannot be verified.\n"
+"\n"
+"Only readability of the medium will be checked."
+msgstr ""
+"The medium does not contain a MD5 checksum.\n"
+"The content of the medium cannot be verified.\n"
+"\n"
+"Only readability of the medium will be checked."
+
+#. (see bnc#178357 why these numbers)
+#. translators: help text for software proposal
+#: src/modules/Packages.ycp:302
+msgid "<P>The propsal contains total size of files which will be installed to 
the system. However, the system will contain some other files (temporary and 
working files) so the used space will be slighltly larger than the proposed 
value. Therefore it is a good idea to have at least 25% (or 300MB) free space 
before starting the installation.</P>"
+msgstr "<P>The propsal reports the total size of files which will be installed 
to the system. However, the system will contain some other files (temporary and 
working files) so the used space will be slighltly larger than the proposed 
value. Therefore it is a good idea to have at least 25% (or 300MB) free space 
before starting the installation.</P>"
+
+#. help text for software proposal
+#: src/modules/Packages.ycp:304
+msgid "<P>The total size to download is size of packages which will be 
downloaded from remote (network) repositories. This value is important when the 
connection is slow or when there is a data limit for downloading.</P>"
+msgstr ""
+"<P>The total 'size to download' is the size of the packages which will be 
downloaded from remote (network) repositories.\n"
+"  This value is important when the connection is slow or when there is a data 
limit for downloading.</P>"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-packager-2.21.0/src/clients/install_test.ycp 
new/yast2-packager-2.21.3/src/clients/install_test.ycp
--- old/yast2-packager-2.21.0/src/clients/install_test.ycp      1970-01-01 
01:00:00.000000000 +0100
+++ new/yast2-packager-2.21.3/src/clients/install_test.ycp      2010-01-12 
11:48:56.000000000 +0100
@@ -0,0 +1,6 @@
+{
+    import "Package";
+
+
+    Package::InstallAll(["yast2-nfs-server"]);
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-packager-2.21.0/src/clients/inst_rpmcopy.ycp 
new/yast2-packager-2.21.3/src/clients/inst_rpmcopy.ycp
--- old/yast2-packager-2.21.0/src/clients/inst_rpmcopy.ycp      2010-10-21 
11:23:14.000000000 +0200
+++ new/yast2-packager-2.21.3/src/clients/inst_rpmcopy.ycp      2011-06-16 
10:18:12.000000000 +0200
@@ -13,7 +13,7 @@
  * Packages module :
  *                     "installed"
  *
- * $Id: inst_rpmcopy.ycp 62480 2010-09-10 12:37:54Z lslezak $
+ * $Id: inst_rpmcopy.ycp 64339 2011-06-14 11:48:59Z lslezak $
  */
 
 {
@@ -199,7 +199,15 @@
        }
 
        // returns [ int successful, list failed, list remaining ]
-       list commit_result = PackageInstallation::CommitPackages( 
current_cd_no, 0 );
+       map<string,any> config = $[ "medium_nr" : current_cd_no ];
+       if (PackageInstallation::DownloadInAdvance() == true)
+       {
+           config["download_mode"] = `download_in_advance;
+       }
+
+       y2milestone("Commit config: %1", config);
+
+       list commit_result = PackageInstallation::Commit(config);
 
        if (commit_result == nil || size (commit_result) == 0)
        {
@@ -434,8 +442,13 @@
     // sync package manager FIXME
     if (result != `abort && ! Stage::initial ())
     {
-       y2milestone ("Calling PkgCommit (%1)", 9999);
-       Pkg::PkgCommit (9999);
+       map<string,any> config = $[];
+       if (PackageInstallation::DownloadInAdvance() == true)
+       {
+           config["download_mode"] = `download_in_advance;
+       }
+       y2milestone ("Calling Pkg::Commit(%1)", config);
+       Pkg::Commit(config);
     }
 
     // BNC #443755
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-packager-2.21.0/src/clients/sw_single.ycp 
new/yast2-packager-2.21.3/src/clients/sw_single.ycp
--- old/yast2-packager-2.21.0/src/clients/sw_single.ycp 2010-12-10 
16:34:13.000000000 +0100
+++ new/yast2-packager-2.21.3/src/clients/sw_single.ycp 2011-06-23 
12:08:13.000000000 +0200
@@ -7,7 +7,7 @@
  * Purpose:            contains dialog loop for workflows:
  *     "Install/Remove software"
  *
- * $Id: sw_single.ycp 62709 2010-11-01 16:34:10Z lslezak $
+ * $Id: sw_single.ycp 64560 2011-06-23 10:08:16Z lslezak $
  *
  * Note: sw_single accepts a map parameter: $[ "dialog_type" : symbol,
  *   "repo_mgmt" : boolean ]
@@ -657,6 +657,8 @@
           list commit_result = PackageInstallation::CommitPackages (0, 0);     
                        // Y: commit them !
           integer newvmlinuzsize = (integer) SCR::Read(.target.size, 
"/boot/vmlinuz");
 
+          y2milestone("Commit result: %1", commit_result);
+
           SlideShow::CloseDialog();
 
           if (Mode::normal ()                          // run SuSEconfig only 
in normal system, not during installation
@@ -707,8 +709,10 @@
                // or if it's enabled in sysconfig
                if (PKGMGR_ACTION_AT_EXIT == "summary"
                    || force_summary
+                   || commit_result == [-1] // aborted by user
                    || size(commit_result[1]:[]) > 0)
                {
+                   y2milestone("Summary dialog needed");
                    if (PackagesUI::ShowInstallationSummary() == `back && 
size(packagelist) == 0)
                    {
                        force_restart = true;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-packager-2.21.0/src/modules/AddOnProduct.ycp 
new/yast2-packager-2.21.3/src/modules/AddOnProduct.ycp
--- old/yast2-packager-2.21.0/src/modules/AddOnProduct.ycp      2010-10-21 
11:23:15.000000000 +0200
+++ new/yast2-packager-2.21.3/src/modules/AddOnProduct.ycp      2011-06-16 
10:18:19.000000000 +0200
@@ -1013,23 +1013,6 @@
     return true;
 }
 
-string preselected_add_ons = "plain";
-
-/**
- * Sets an add_on_products file type ("plain" or "xml")
- * @see FATE #303675
- *
- * @param string type "plain" or "xml"
- */
-global void SetPreselectedAddOnProductsType (string type) {
-    if (type == "xml" || type == "plain") {
-       preselected_add_ons = type;
-       y2milestone ("add_on_products type set: %1", preselected_add_ons);
-    } else {
-       y2error ("Unknown type: %1", type);
-    }
-}
-
 /**
  * Reads temporary add_on_products file, parses supported products,
  * merges base URL if products use relative URL and returns list of
@@ -1242,9 +1225,41 @@
 }
 
 /**
- * Auto-integrate add-on products in specified file (usually add_on_products 
file)
+ * Installs selected products from repository. If list of prods_to_install
+ * is empty, all products found are installed.
+ *
+ * @param 
+ * @return boolean if successful
+ */
+boolean InstallProductsFromRepository (list <string> prods_to_install, integer 
src) {
+    // there are more products at the destination
+    // install the listed ones only
+    if (prods_to_install != nil && size (prods_to_install) > 0) {
+       foreach (string one_prod, prods_to_install, {
+           y2milestone ("Selecting product '%1' for installation", one_prod);
+           Pkg::ResolvableInstall (one_prod, `product);
+       });
+
+    // install all products from the destination
+    } else {
+       list<map<string,any> > products = Pkg::ResolvableProperties ("", 
`product, "");
+       // only those that come from the new source
+       products = filter (map<string,any> p, products, {
+           return p["source"]:-1 == src;
+       });
+
+       foreach (map<string,any> p, products, {
+           y2milestone ("Selecting product '%1' for installation", 
p["name"]:"");
+           Pkg::ResolvableInstall (p["name"]:"", `product);
+       });
+    }
+}
+
+/**
+ * Auto-integrate add-on products in specified file (usually add_on_products or
+ * add_on_products.xml file)
  *
- * @param filelist string a file containing a list of add-on products to 
integrate
+ * @param filelist list of maps describing one or several add_on_products files
  * @see FATE #303675: Support several add-ons on standard medium
  * @return boolean true on exit
  *
@@ -1289,91 +1304,83 @@
  *             </product_item>
  *     </product_items>
  * </add_on_products>
+ *
+ * @struct Filelist map is in format
+ * [
+ *     $[ "file" : "/local/path/to/an/add_on_products/file",     
"type":"plain" ],
+ *     $[ "file" : "/local/path/to/an/add_on_products/file.xml", "type":"xml" ]
+ * ]
  */
-global boolean AddPreselectedAddOnProducts (string filelist) {
-    if (filelist == nil)
+global boolean AddPreselectedAddOnProducts (list <map <string, string> > 
filelist) {
+    if (filelist == nil || filelist == [])
     {
-       y2milestone ("No add-on products defined on the media");
+       y2milestone ("No add-on products defined on the media or by inst-sys");
        return true;
     }
 
     string base_url = GetBaseProductURL();
     y2milestone ("Base URL: %1", URL::HidePassword(base_url));
 
-    list <map> add_products = [];
-
-    // new xml format
-    if (preselected_add_ons == "xml") {
-       add_products = ParseXMLBasedAddOnProductsFile (filelist, base_url);
-    // old fallback
-    } else if (preselected_add_ons == "plain") {
-       add_products = ParsePlainAddOnProductsFile (filelist, base_url);
-    } else {
-       y2error ("Unsupported type: %1", preselected_add_ons);
-       return false;
-    }
-
-    y2milestone ("Adding products: %1", add_products);
-    foreach (map one_product, add_products, {
-       string url = one_product["url"]:"";
-       string pth = one_product["path"]:"";
-
-       y2milestone ("Adding Repository: %1 %2", url, pth);
-
-       integer src = Pkg::SourceCreate (url, pth);
-
-       if (src == nil || src < 0) {
-           y2error ("Unable to add product: %1", url);
-           // TRANSLATORS: error message, %1 is replaced with product URL
-           Report::Error (sformat (_("Unable to add product %1."), url));
-           return;
-       }
-
-       if (! AcceptedLicenseAndInfoFile (src)) {
-           Pkg::SourceDelete (src);
-           return;
-       }
-       Integrate (src);
-
-       // adding the product to the list of products
-       // bugzilla #269625
-       map <string, string> prod = (map <string, string>) 
Pkg::SourceProductData (src);
-
-       AddOnProduct::add_on_products = add (AddOnProduct::add_on_products, $[
-           "media" : src,
-           "product" : 
prod["label"]:prod["productname"]:prod["productversion"]:"",
-           "autoyast_product" : prod["productname"]:"",
-           "media_url" : url,
-           "product_dir" : pth,
-       ]);
-
-       list <string> prods_to_install = one_product["install_products"]:[];
-
-       // there are more products at the destination
-       // install the listed ones only
-       if (prods_to_install != nil && size (prods_to_install) > 0) {
-           foreach (string one_prod, prods_to_install, {
-               y2milestone ("Selecting product '%1' for installation", 
one_prod);
-               Pkg::ResolvableInstall (one_prod, `product);
-           });
-
-       // install all products from the destination
+    // Processes all add_on_products files found
+    foreach (map <string, string> add_on_products_file, filelist, {
+       string filename = add_on_products_file["file"]:"";
+       string type     = add_on_products_file["type"]:"";
+
+       list <map> add_products = [];
+
+       // new xml format
+       if (type == "xml") {
+           add_products = ParseXMLBasedAddOnProductsFile (filename, base_url);
+       // old fallback
+       } else if (type == "plain") {
+           add_products = ParsePlainAddOnProductsFile (filename, base_url);
        } else {
-           list<map<string,any> > products = Pkg::ResolvableProperties ("", 
`product, "");
-           // only those that come from the new source
-           products = filter (map<string,any> p, products, {
-               return p["source"]:-1 == src;
-           });
-
-           foreach (map<string,any> p, products, {
-               y2milestone ("Selecting product '%1' for installation", 
p["name"]:"");
-               Pkg::ResolvableInstall (p["name"]:"", `product);
-           });
+           y2error ("Unsupported type: %1", type);
+           return false;
        }
+
+       y2milestone ("Adding products: %1", add_products);
+       foreach (map one_product, add_products, {
+           string url = one_product["url"]:"";
+           string pth = one_product["path"]:"";
+
+           y2milestone ("Adding Repository: %1 %2", url, pth);
+           integer src = Pkg::SourceCreate (url, pth);
+
+           if (src == nil || src < 0) {
+               y2error ("Unable to add product: %1", url);
+               // TRANSLATORS: error message, %1 is replaced with product URL
+               Report::Error (sformat (_("Unable to add product %1."), url));
+               return;
+           }
+
+           if (! AcceptedLicenseAndInfoFile (src)) {
+               y2warning ("License not accepted, delete the repository");
+               Pkg::SourceDelete (src);
+               return;
+           }
+           Integrate (src);
+
+           // adding the product to the list of products (BNC #269625)
+           map <string, any> prod = (map <string, any>) Pkg::SourceProductData 
(src);
+           y2milestone ("Repository (%1) product data: %2", src, prod);
+
+           InstallProductsFromRepository (one_product["install_products"]:[], 
src);
+
+           AddOnProduct::add_on_products = add (AddOnProduct::add_on_products, 
$[
+               "media"                 : src,
+               "product"               : 
one_product["name"]:prod["label"]:prod["productname"]:_("Unknown Product"),
+               "autoyast_product"      : 
prod["productname"]:one_product["name"]:_("Unknown Product"),
+               "media_url"             : url,
+               "product_dir"           : pth,
+           ]);
+       });
     });
 
     // reread agents, redraw wizard steps, etc.
     ReIntegrateFromScratch();
+
+    return true;
 }
 
 /* Export/Import --> */
@@ -1427,8 +1434,11 @@
            string media = prod["media_url"]:"";
            string pth = prod["product_dir"]:"/";
            integer src = Pkg::SourceCreate (media, pth);
-           if (src != -1)
+           if (src != -1) {
+               if (prod["product"]:"" != "")
+                   Pkg::SourceEditSet ([$["SrcId":src, 
"name":prod["product"]:""]]);
                mode_config_sources = add (mode_config_sources, src);
+           }
        });
     }
     return true;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-packager-2.21.0/src/modules/PackageInstallation.ycp 
new/yast2-packager-2.21.3/src/modules/PackageInstallation.ycp
--- old/yast2-packager-2.21.0/src/modules/PackageInstallation.ycp       
2010-10-21 11:23:15.000000000 +0200
+++ new/yast2-packager-2.21.3/src/modules/PackageInstallation.ycp       
2011-06-23 12:08:13.000000000 +0200
@@ -3,7 +3,7 @@
  *
  * Authors:            Gabriele Strattner <[email protected]>
  *
- * $Id: PackageInstallation.ycp 56678 2009-04-08 09:14:05Z lslezak $
+ * $Id: PackageInstallation.ycp 64560 2011-06-23 10:08:16Z lslezak $
  *
  */
 
@@ -22,6 +22,17 @@
     import "Label";
 
 
+    boolean download_in_advance = nil;
+
+    global boolean DownloadInAdvance()
+    {
+       return download_in_advance;
+    }
+
+    global void SetDownloadInAdvance(boolean enable)
+    {
+       download_in_advance = enable;
+    }
 
     global define any FakePackager( list<list> packages, string inst_source,
                                    boolean deleting );
@@ -82,10 +93,8 @@
      * Return: [ int successful, list failed, list remaining, list 
srcremaining ]
      *
      **/
-    global define list CommitPackages (integer media_number,
-                                      integer packages_installed)
+    global define list Commit(map<string,any> config)
     {
-       y2milestone("CommitPackages called: media nr. %1, packages %2", 
media_number, packages_installed);
 
        if ( Mode::test () )
        {
@@ -96,8 +105,6 @@
        }
        // install packages from this media
 
-       y2milestone ("CommitPackages (%1,%2): Pkg::TargetGetDU() %3",
-                    media_number, packages_installed, Pkg::TargetGetDU());
 
        list <integer> sources = Pkg::SourceGetCurrent (false);
        integer source_id = sources[0]:0;
@@ -112,51 +119,35 @@
 
        y2milestone("ID of the first repository: %1", first_source);
 
-       if (media_number == 0)
+       if (config["medium_nr"]:0 == 0)
        {
            PackageSlideShow::SetCurrentCdNo (first_source, 1);
        }
        else
        {
-           PackageSlideShow::SetCurrentCdNo (first_source, media_number);
+           PackageSlideShow::SetCurrentCdNo (first_source, 
config["medium_nr"]:0);
        }
        PackageSlideShow::UpdateAllCdProgress (false);
        SlideShow::StartTimer();
 
-       boolean do_commit = true;
-       if (media_number != 0)
-       {
-           list<map<string,any> > pkgs = Pkg::ResolvableProperties ("", 
`package, "");
-           pkgs = filter (map<string,any> p, pkgs, {
-               return p["status"]:nil == `selected;
-           });
-           do_commit = size (pkgs) > 0;
-       }
-
        integer start_time = time();
 
        list commit_result = [];
-       if (do_commit)
-       {
-           // returns [ int successful, list failed, list remaining, list 
srcremaining ]
-           y2milestone ("Calling PkgCommit (%1)", media_number);
-           commit_result = Pkg::PkgCommit (media_number);
+       // returns [ int successful, list failed, list remaining, list 
srcremaining ]
+       y2milestone ("Calling Pkg::Commit (%1)", config);
+       commit_result = Pkg::Commit(config);
 
-           SlideShow::StopTimer();
+       SlideShow::StopTimer();
 
-           if (commit_result == nil)
-           {
-               y2error ("Bad media number %1", media_number);
-               return [];
-           }
-       }
-       else
+       if (commit_result == nil)
        {
-           y2milestone ("No package from media %1 left for installation", 
media_number);
+           y2error ("Commit failed: %1", Pkg::LastError());
+           return [];
        }
 
+
        integer installation_time = time() - start_time;
-       y2milestone("Installation took %1 seconds", installation_time);
+       y2milestone("Installation took %1 seconds, commit result: %2", 
installation_time, commit_result);
 
        // see if installation of some packages failed
        list<string> errpacks = (list<string>) (commit_result[1]:[]);
@@ -192,12 +183,31 @@
                summary["failed"] = errpacks;
            }
 
+           if (commit_result == [-1])
+           {
+               summary["error"] = _("Installation aborted by user.");
+               summary["success"] = false;
+           }
+
            PackagesUI::SetPackageSummary(summary);
        }
 
        return commit_result;
     };
 
+    /**
+     *  commitPackages marked for deletion or installation
+     * Return: [ int successful, list failed, list remaining, list 
srcremaining ]
+     *
+     **/
+    global define list CommitPackages (integer media_number,
+                                      integer packages_installed)
+    {
+       // this is a backward compatible wrapper for Commit()
+       y2milestone ("CommitPackages (%1,%2): Pkg::TargetGetDU() %3",   
media_number, packages_installed, Pkg::TargetGetDU());
+       return Commit($["medium_nr" : media_number]);
+    }
+
 
     //
     // Fake progress bars for Mode::test ()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-packager-2.21.0/src/modules/PackageSlideShow.ycp 
new/yast2-packager-2.21.3/src/modules/PackageSlideShow.ycp
--- old/yast2-packager-2.21.0/src/modules/PackageSlideShow.ycp  2010-12-10 
16:34:12.000000000 +0100
+++ new/yast2-packager-2.21.3/src/modules/PackageSlideShow.ycp  2011-06-16 
10:18:19.000000000 +0200
@@ -52,9 +52,6 @@
     string provide_name                        = "";           // currently 
downlaoded package name
     string provide_size                        = "";           // currently 
downlaoded package size
 
-    boolean download_in_advance_mode = false;
-
-
     // package summary
     // package counters
     integer installed_packages = 0;
@@ -416,6 +413,10 @@
 
     integer packages_to_download(list<list<integer> >src_mapping)
     {
+       // src_mapping contains only enabled repos, get indices of the enabled 
repos here
+       // and remap enabled index to the global repo ID
+       list<integer> enabled_sources = Pkg::SourceGetCurrent(true);
+
        y2milestone("Packages to download input: %1", src_mapping);
 
        integer ret = 0;
@@ -426,7 +427,7 @@
                if (size(media_mapping) > 0)
                {
                    // check if the repository is remote
-                   string repo_url = Pkg::SourceGeneralData(i)["url"]:"";
+                   string repo_url = 
Pkg::SourceGeneralData(enabled_sources[i]:-1)["url"]:"";
                    string repo_schema = 
tolower(URL::Parse(repo_url)["scheme"]:"");
 
                    if (contains(["http", "https", "ftp", "sftp"], repo_schema))
@@ -438,7 +439,7 @@
                            }
                        );
 
-                       y2milestone("Downloading %1 packages from remote 
repository %2", total, i);
+                       y2milestone("Downloading %1 packages from remote 
repository %2", total, enabled_sources[i]:-1);
                        ret = ret + total;
                    }
                }
@@ -511,13 +512,6 @@
        total_count_downloaded                  = 0;
        integer total_count_to_install          = 
packages_to_install(total_pkg_count_per_cd_per_src);
        downloading_pct         = 100 * total_count_to_download / 
(total_count_to_install + total_count_to_download);
-
-       string download_mode = 
(string)SCR::Read(.etc.zypp_conf.value.main."commit.downloadMode");
-       // DownloadInAdvance is default for local (root=/) install since 
openSUSE-11.4 (bnc#653497)
-       // (we cannot get the target root from Pkg:: so we have to check the 
mode instead)
-       download_in_advance_mode = download_mode == "DownloadInAdvance" ||
-           (download_mode == nil && Mode::normal() && 
!Installation::dirinstall_installing_into_dir);
-
        init_pkg_data_complete                  = true;
 
        // reset the history log
@@ -1053,7 +1047,10 @@
            // move the progress also for downloaded files
            UpdateTotalProgressValue();
 
-           if (download_in_advance_mode)
+            symbol d_mode = Pkg::CommitPolicy()["download_mode"]:`default;
+
+           if (d_mode == `download_in_advance ||
+                (d_mode == `default && Mode::normal() && 
!Installation::dirinstall_installing_into_dir))
            {
                // display download progress in DownloadInAdvance mode
                // translations: progress message (part1)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-packager-2.21.0/src/modules/Packages.ycp 
new/yast2-packager-2.21.3/src/modules/Packages.ycp
--- old/yast2-packager-2.21.0/src/modules/Packages.ycp  2011-04-20 
09:53:52.000000000 +0200
+++ new/yast2-packager-2.21.3/src/modules/Packages.ycp  2011-06-09 
10:56:29.000000000 +0200
@@ -3,7 +3,7 @@
  * Package:    Package selections
  * Authors:    Anas Nashif <[email protected]>
  *
- * $Id: Packages.ycp 63753 2011-04-08 11:49:04Z lslezak $
+ * $Id: Packages.ycp 64232 2011-06-06 16:27:46Z locilka $
  */
 
 {
@@ -113,9 +113,7 @@
 
     global boolean using_patterns = false;
 
-    global string add_on_products_list = nil;
-
-    global string add_on_products_type = nil;
+    global list <map <string, string> > add_on_products_list = [];
 
 // summary functions
 
@@ -638,11 +636,10 @@
     // bugzilla #269625
     WorkflowManager::SetBaseWorkflow (false);
 
-    if (Packages::add_on_products_list != nil) {
+    if (Packages::add_on_products_list != []) {
        y2milestone ("Found list of add-on products to preselect: %1", 
Packages::add_on_products_list);
-       AddOnProduct::SetPreselectedAddOnProductsType 
(Packages::add_on_products_type);
        AddOnProduct::AddPreselectedAddOnProducts 
(Packages::add_on_products_list);
-       Packages::add_on_products_list = nil; // do not select them any more
+       Packages::add_on_products_list = []; // do not select them any more
     }
 }
 
@@ -1489,19 +1486,63 @@
     }
 }
 
+boolean FindAndRememberAddOnProductsFiles (integer initial_repository) {
+    string tmp_add_on_products = nil;
+    add_on_products_list = [];
+
+    string filename = nil;
+    string tmpdir = (string) SCR::Read (.target.tmpdir);
+
+    // #303675: Support several AddOns on standard SLE medium
+    // at first, try to find XML configuration
+    // then as a fallback/backward compatibility the old plain configuration
+    foreach (list <string> one_aop, [["/add_on_products.xml", "xml"], 
["/add_on_products", "plain"]], {
+       string file = one_aop[0]:"";
+       string type = one_aop[1]:"";
+
+       // BNC #496404: These files should not be checked for signatures
+       tmp_add_on_products = Pkg::SourceProvideOptionalFile 
(initial_repository, 1, file);
+
+       if (tmp_add_on_products != nil) {
+           filename = sformat ("%1/add_on_products_defined_by_repository", 
tmpdir);
+           add_on_products_list = add (add_on_products_list, $[ "file" : 
filename, "type" : type ]);
+           WFM::Execute (.local.bash, sformat ("cp '%1' '%2'", 
String::Quote(tmp_add_on_products), String::Quote(filename)));
+           y2milestone ("Found add_on_products (repository) %1 type %2", 
tmp_add_on_products, type);
+           break;
+       }
+    });
+
+    // FATE #312263 Files in the root of inst-sys
+    foreach (list <string> one_aop, [["/add_on_products.xml", "xml"], 
["/add_on_products", "plain"]], {
+       string file = one_aop[0]:"";
+       string type = one_aop[1]:"";
+
+       // In inst-sys, files are already stored locally
+       if (FileUtils::Exists (file)) {
+           filename = sformat ("%1/add_on_products_defined_by_inst_sys", 
tmpdir);
+           add_on_products_list = add (add_on_products_list, $[ "file" : 
filename, "type" : type ]);
+           WFM::Execute (.local.bash, sformat ("cp '%1' '%2'", 
String::Quote(file), String::Quote(filename)));
+           y2milestone ("Found add_on_products (inst-sys) %1 type %2", file, 
type);
+           break;
+       }
+    });
+
+    return (size (add_on_products_list) > 0);
+}
+
 global void Initialize_StageInitial (boolean show_popup, string base_url, 
string log_url) {
-           integer initial_source = nil;
+           integer initial_repository = nil;
            ImportGPGKeys ();
-           while (initial_source == nil)
+           while (initial_repository == nil)
            {
-               initial_source = Pkg::SourceCreateBase (base_url, "");
-               if (initial_source == -1 || initial_source == nil)
+               initial_repository = Pkg::SourceCreateBase (base_url, "");
+               if (initial_repository == -1 || initial_repository == nil)
                {
                    y2error ("No repository in '%1'", log_url);
                    base_url = UpdateSourceURL (base_url);
                    if (base_url != "")
                    {
-                       initial_source = nil;
+                       initial_repository = nil;
                    }
                    else
                    {
@@ -1509,13 +1550,13 @@
                        return;
                    }
                }
-               if (! CheckContentFile (initial_source))
+               if (! CheckContentFile (initial_repository))
                {
                    string label = ContentFileProductLabel ();
                    // bug #159754, release the mounted CD
                    Pkg::SourceReleaseAll();
-                   Pkg::SourceDelete (initial_source);
-                   initial_source = nil;
+                   Pkg::SourceDelete (initial_repository);
+                   initial_repository = nil;
                    if (! Popup::ContinueCancel (
                        // message popup, %1 is product name
                        sformat (_("Insert %1 CD 1"), label)))
@@ -1530,7 +1571,7 @@
            // BNC #481828: Using LABEL from content file as a repository name
            AdjustSourcePropertiesAccordingToProduct (base_source_id);
 
-           base_source_id = initial_source;
+           base_source_id = initial_repository;
            y2milestone ("Base source ID: %1", base_source_id);
 
            // Set the product before setting up add-on products
@@ -1539,37 +1580,15 @@
            // not be set. Bug 178831
            SelectProduct ();
 
-           theSources = [ initial_source ];
+           theSources = [ initial_repository ];
            integer sp_source = IntegrateServicePack (show_popup, base_url);
            if (sp_source != nil)
                theSources = add (theSources, sp_source);
 
            if (ProductFeatures::GetFeature ("software", "selection_type") == 
`fixed)
-           {
                 Pkg::SetSelection (ProductFeatures::GetStringFeature 
("software", "base_selection"));
-           }
-
-           string tmp_add_on_products = nil;
-           add_on_products_list = nil;
 
-           // #303675: Support several AddOns on standard SLE medium
-           // at first, try to find XML configuration
-           // then as a fallback/backward compatibility the old plain 
configuration
-           foreach (list <string> one_aop, [["/add_on_products.xml", "xml"], 
["/add_on_products", "plain"]], {
-               string file = one_aop[0]:"";
-               string type = one_aop[1]:"";
-
-               // BNC #496404: These files should not be checked for signatures
-               tmp_add_on_products = Pkg::SourceProvideOptionalFile 
(initial_source, 1, file);
-
-               if (tmp_add_on_products != nil) {
-                   add_on_products_list = sformat ("%1/add_on_products", 
SCR::Read (.target.tmpdir));
-                   WFM::Execute (.local.bash, sformat ("cp %1 %2", 
tmp_add_on_products, add_on_products_list));
-                   add_on_products_type = type;
-                   y2milestone ("Found add_on_products %1 type %2", 
tmp_add_on_products, type);
-                   break;
-               }
-           });
+           FindAndRememberAddOnProductsFiles (initial_repository);
 }
 
 global void Initialize_StageNonInitial (boolean show_popup, string base_url, 
string log_url) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-packager-2.21.0/src/modules/SlideShowCallbacks.ycp 
new/yast2-packager-2.21.3/src/modules/SlideShowCallbacks.ycp
--- old/yast2-packager-2.21.0/src/modules/SlideShowCallbacks.ycp        
2010-12-10 16:34:12.000000000 +0100
+++ new/yast2-packager-2.21.3/src/modules/SlideShowCallbacks.ycp        
2011-06-16 10:18:19.000000000 +0200
@@ -6,7 +6,7 @@
  *
  * Purpose:            provides the Callbacks for SlideShow
  *
- * $Id: SlideShowCallbacks.ycp 62811 2010-11-10 17:55:53Z lslezak $
+ * $Id: SlideShowCallbacks.ycp 64322 2011-06-13 13:35:17Z lslezak $
  *
  */
 
@@ -443,7 +443,6 @@
     global void StartDeltaProvide( string name, integer archivesize )
     {
        PackageSlideShow::SlideGenericProvideStart (name , archivesize, 
_("Downloading delta RPM %1 (download size %2)"), true /*remote*/);
-       _remote_provide = true;
     }
 
     /**
@@ -452,7 +451,6 @@
     global void StartDeltaApply( string name )
     {
        PackageSlideShow::SlideDeltaApplyStart (name);
-       _remote_provide = true;
     }
     /**
      *  at start of file providal
@@ -460,7 +458,6 @@
     global void StartPatchProvide( string name, integer archivesize )
     {
        PackageSlideShow::SlideGenericProvideStart (name , archivesize, 
_("Downloading patch RPM %1 (download size %2)"), true /*remote*/);
-       _remote_provide = true;
     }
 
     /**
@@ -476,23 +473,19 @@
      */
     global void FinishPatchDeltaProvide()
     {
-       _remote_provide = false;
     }
 
     global void ProblemDeltaDownload (string descr) {
-       _remote_provide = false;
        // error in installation log, %1 is detail error description
        SlideShow::AppendMessageToInstLog (sformat (_("Failed to download delta 
RPM: %1"), descr));
     }
 
     global void ProblemDeltaApply (string descr) {
-       _remote_provide = false;
        // error in installation log, %1 is detail error description
        SlideShow::AppendMessageToInstLog (sformat (_("Failed to apply delta 
RPM: %1"), descr));
     }
 
     global void ProblemPatchDownload (string descr) {
-       _remote_provide = false;
        // error in installation log, %1 is detail error description
        SlideShow::AppendMessageToInstLog (sformat (_("Failed to download patch 
RPM: %1"), descr));
     }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-packager-2.21.0/VERSION 
new/yast2-packager-2.21.3/VERSION
--- old/yast2-packager-2.21.0/VERSION   2011-04-20 10:13:05.000000000 +0200
+++ new/yast2-packager-2.21.3/VERSION   2011-06-23 12:07:37.000000000 +0200
@@ -1 +1 @@
-2.21.0
+2.21.3


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



Remember to have fun...

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to