Hello community,
here is the log from the commit of package yast2-packager for openSUSE:Factory
checked in at Tue Jan 12 09:27:19 CET 2010.
--------
--- yast2-packager/yast2-packager.changes 2010-01-06 20:11:15.000000000 +0100
+++ /mounts/work_src_done/STABLE/yast2-packager/yast2-packager.changes 2010-01-11 18:09:35.000000000 +0100
@@ -1,0 +2,33 @@
+Mon Jan 11 16:27:35 UTC 2010 - lslezak@suse.cz
+
+- sw_single.ycp: solve dependencies when installing a package
+ from command line (via yast2 -i) - use a temporary local
+ repository (bnc#459268)
+- sw_single.ycp: display installation progress and show the summary
+ dialog after installation when installing a package from command
+ line (bnc#455768)
+- sw_single.ycp: check target initialization result, abort on error
+ (bnc#556477)
+- 2.19.3
+
+-------------------------------------------------------------------
+Mon Jan 11 13:57:26 CET 2010 - locilka@suse.cz
+
+- Fixed switching license language in ProductLicense.
+- Fixed disabled Next button while showing license with no
+ acceptance needed in ProductLicense.
+
+-------------------------------------------------------------------
+Fri Jan 8 08:05:12 UTC 2010 - lslezak@suse.cz
+
+- don't display exact total remaining time when there is an
+ overflow (i.e. for >2:00:00 and e.g. 15:20 remaining time display
+ >2:00:00 total instead of 2:15:20) (bnc#567966)
+
+-------------------------------------------------------------------
+Thu Jan 7 12:16:03 UTC 2010 - lslezak@suse.cz
+
+- pass the selected CD/DVD device to the package manager in case
+ of multiple devices in the system (bnc#567403)
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
yast2-packager-2.19.2.tar.bz2
New:
----
yast2-packager-2.19.3.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-packager.spec ++++++
--- /var/tmp/diff_new_pack.B9zC9W/_old 2010-01-12 09:26:20.000000000 +0100
+++ /var/tmp/diff_new_pack.B9zC9W/_new 2010-01-12 09:26:20.000000000 +0100
@@ -1,5 +1,5 @@
#
-# spec file for package yast2-packager (Version 2.19.2)
+# spec file for package yast2-packager (Version 2.19.3)
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -19,10 +19,10 @@
Name: yast2-packager
-Version: 2.19.2
+Version: 2.19.3
Release: 1
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-packager-2.19.2.tar.bz2
+Source0: yast2-packager-2.19.3.tar.bz2
Prefix: /usr
Group: System/YaST
License: GPLv2+
@@ -79,7 +79,7 @@
(webpin) and installing them via OneClickInstall
%prep
-%setup -n yast2-packager-2.19.2
+%setup -n yast2-packager-2.19.3
%build
%{prefix}/bin/y2tool y2autoconf
++++++ yast2-packager-2.19.2.tar.bz2 -> yast2-packager-2.19.3.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-packager-2.19.2/VERSION new/yast2-packager-2.19.3/VERSION
--- old/yast2-packager-2.19.2/VERSION 2010-01-06 20:09:39.000000000 +0100
+++ new/yast2-packager-2.19.3/VERSION 2010-01-11 18:05:14.000000000 +0100
@@ -1 +1 @@
-2.19.2
+2.19.3
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-packager-2.19.2/configure new/yast2-packager-2.19.3/configure
--- old/yast2-packager-2.19.2/configure 2010-01-06 20:10:42.000000000 +0100
+++ new/yast2-packager-2.19.3/configure 2010-01-11 18:06:19.000000000 +0100
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.63 for yast2-packager 2.19.2.
+# Generated by GNU Autoconf 2.63 for yast2-packager 2.19.3.
#
# Report bugs to http://bugs.opensuse.org/.
#
@@ -596,8 +596,8 @@
# Identity of this package.
PACKAGE_NAME='yast2-packager'
PACKAGE_TARNAME='yast2-packager'
-PACKAGE_VERSION='2.19.2'
-PACKAGE_STRING='yast2-packager 2.19.2'
+PACKAGE_VERSION='2.19.3'
+PACKAGE_STRING='yast2-packager 2.19.3'
PACKAGE_BUGREPORT='http://bugs.opensuse.org/'
ac_unique_file="RPMNAME"
@@ -1274,7 +1274,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.19.2 to adapt to many kinds of systems.
+\`configure' configures yast2-packager 2.19.3 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1345,7 +1345,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of yast2-packager 2.19.2:";;
+ short | recursive ) echo "Configuration of yast2-packager 2.19.3:";;
esac
cat <<\_ACEOF
@@ -1425,7 +1425,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-yast2-packager configure 2.19.2
+yast2-packager configure 2.19.3
generated by GNU Autoconf 2.63
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1439,7 +1439,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.19.2, which was
+It was created by yast2-packager $as_me 2.19.3, which was
generated by GNU Autoconf 2.63. Invocation command line was
$ $0 $@
@@ -2419,7 +2419,7 @@
# Define the identity of the package.
PACKAGE='yast2-packager'
- VERSION='2.19.2'
+ VERSION='2.19.3'
cat >>confdefs.h <<_ACEOF
@@ -2541,7 +2541,7 @@
-VERSION="2.19.2"
+VERSION="2.19.3"
RPMNAME="yast2-packager"
MAINTAINER="Ladislav Slezak "
@@ -3483,7 +3483,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.19.2, which was
+This file was extended by yast2-packager $as_me 2.19.3, which was
generated by GNU Autoconf 2.63. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -3533,7 +3533,7 @@
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_version="\\
-yast2-packager config.status 2.19.2
+yast2-packager config.status 2.19.3
configured by $0, generated by GNU Autoconf 2.63,
with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-packager-2.19.2/configure.in new/yast2-packager-2.19.3/configure.in
--- old/yast2-packager-2.19.2/configure.in 2010-01-06 20:10:38.000000000 +0100
+++ new/yast2-packager-2.19.3/configure.in 2010-01-11 18:06:15.000000000 +0100
@@ -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.19.2, http://bugs.opensuse.org/, yast2-packager)
+AC_INIT(yast2-packager, 2.19.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.19.2"
+VERSION="2.19.3"
RPMNAME="yast2-packager"
MAINTAINER="Ladislav Slezak "
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-packager-2.19.2/src/clients/sw_single.ycp new/yast2-packager-2.19.3/src/clients/sw_single.ycp
--- old/yast2-packager-2.19.2/src/clients/sw_single.ycp 2009-11-20 15:02:46.000000000 +0100
+++ new/yast2-packager-2.19.3/src/clients/sw_single.ycp 2010-01-11 18:06:05.000000000 +0100
@@ -7,7 +7,7 @@
* Purpose: contains dialog loop for workflows:
* "Install/Remove software"
*
- * $Id: sw_single.ycp 59670 2009-11-20 14:02:45Z lslezak $
+ * $Id: sw_single.ycp 60320 2010-01-11 17:06:05Z lslezak $
*
* Note: sw_single accepts a map parameter: $[ "dialog_type" : symbol,
* "repo_mgmt" : boolean ]
@@ -39,6 +39,9 @@
import "Progress";
import "Directory";
import "String";
+ import "URL";
+
+boolean force_summary = false;
symbol StartSWSingle()
{
@@ -127,14 +130,17 @@
//
// returns `done all done
// `failed package not found
- // `next workflow "Change source of installation"
// `found_descr started package manager
- // `unknown_descr found nothing
//
define symbol CheckWhichPackages (list<string> arg_list)
{
- PackageSystem::EnsureTargetInit();
+ if (!Pkg::TargetInit("/", false))
+ {
+ // error message
+ Report::Error("Cannot read the list of installed packages.");
+ return `failed;
+ }
y2milestone ("CheckWhichPackages (%1)", arg_list);
// if sw_single is called with a list of packages or a package name
@@ -152,16 +158,85 @@
*/
if (regexpmatch (first_arg, "\\.rpm$")) // package name given
{
- // if sw_single is called with an absolute package-pathname, there is no need to
- // mount the source medium or check SuSE version or dependencies
+ PackageSystem::EnsureSourceInit();
- PackageSlideShow::InitPkgData(true); // force reinitialization
+ // if sw_single is called with an absolute package-pathname, there is no need to
+ // mount the source medium or check SuSE version or dependencies
+
+
+ PackageSlideShow::InitPkgData(true); // force reinitialization
+
+ // create a temporary Plaindir repository
+ string tmpdir = (string) SCR::Read(.target.tmpdir);
+ string tmprepo = tmpdir + "/tmp_install_repo";
+
+ // create mount point directory
+ SCR::Execute(.target.mkdir, tmprepo);
+
+ foreach (string package, arg_list, {
+ // a symbolic link
+ string command = sformat("ln -- '%1' '%2'", String::Quote(package), String::Quote(tmprepo));
+ y2milestone("Linking package using command: %1", command);
+
+ map out = (map)SCR::Execute(.target.bash_output, command);
+
+ if (out["exit"]:-1 != 0)
+ {
+ y2warning("Could not link the package, creating a full copy instead...");
+ command = sformat("cp -- '%1' '%2'", String::Quote(package), String::Quote(tmprepo));
+
+ y2milestone("Copying package using command: %1", command);
+ out = (map)SCR::Execute(.target.bash_output, command);
+
+ if (out["exit"]:-1 != 0)
+ {
+ // error message (%1 is a package file name)
+ Report::Error(sformat(_("Error: Cannot copy package %1 to temporary repository."), package));
+ return `failed;
+ }
+ }
+ });
+
+ string url = URL::Build($["scheme" : "file", "path" : tmprepo]);
+ y2milestone("Using tmp repo URL: %1", url);
+
+ integer repo_id = nil;
+
+ if (url != "")
+ {
+ repo_id = Pkg::SourceCreateType(url, "", "Plaindir");
+ y2milestone("Adde temporary repository with ID %1", repo_id);
+
+ if (repo_id == nil)
+ {
+ // error message
+ Report::Error(sformat(_("Error: Cannot add a temporary directory, packages cannot be installed.")));
+ return `failed;
+ }
+ }
+ else
+ {
+ return `failed;
+ }
foreach (string package, arg_list, {
+
if (SCR::Read (.target.size, package) > 0)
{
- y2milestone ("SW_SINGLE: installing %1", package);
- boolean installed = Pkg::TargetInstall (package);
+ map out = (map)SCR::Execute(.target.bash_output,
+ sformat("/bin/rpm -q --qf '%%{NAME}' -p '%1'", String::Quote(package)));
+
+ if (out["exit"]:-1 != 0)
+ {
+ // error message
+ Report::Error(sformat(_("Error: Cannot query package file %1."), package));
+ return `failed;
+ }
+
+ string package_name = out["stdout"]:"";
+
+ y2milestone ("Installing %1 from file %2 (repository %3)", package_name, package, repo_id);
+ boolean installed = Pkg::ResolvableInstallRepo(package_name, `package, repo_id);
if (!installed)
{
@@ -185,9 +260,8 @@
}
});
- // package is installed without paying attention to SuSE dependencies
- // don't call SuSEConfig -> dialog loop ends
- return `done;
+ Pkg::PkgSolve(false);
+ force_summary = true;
}
else if (first_arg != "") // firstarg given, but not *.rpm
{
@@ -610,11 +684,12 @@
PKGMGR_ACTION_AT_EXIT = "close";
}
- y2milestone("PKGMGR_ACTION_AT_EXIT: %1", PKGMGR_ACTION_AT_EXIT);
+ y2milestone("PKGMGR_ACTION_AT_EXIT: %1, force_summary: %2", PKGMGR_ACTION_AT_EXIT, force_summary);
// display installation summary if there has been an error
// or if it's enabled in sysconfig
if (PKGMGR_ACTION_AT_EXIT == "summary"
+ || force_summary
|| size(commit_result[1]:[]) > 0)
{
if (PackagesUI::ShowInstallationSummary() == `back && size(packagelist) == 0)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-packager-2.19.2/src/modules/PackageSlideShow.ycp new/yast2-packager-2.19.3/src/modules/PackageSlideShow.ycp
--- old/yast2-packager-2.19.2/src/modules/PackageSlideShow.ycp 2009-04-08 11:05:56.000000000 +0200
+++ new/yast2-packager-2.19.3/src/modules/PackageSlideShow.ycp 2010-01-07 15:53:28.000000000 +0100
@@ -170,15 +170,15 @@
return sum;
}
-
/**
* Sum up all positive list items, but cut off individual items at a maximum value.
* Negative return values indicate overflow of any individual item at "max_cutoff".
- * In this case, the real sum is the absolute value of the return value.
+ * In this case, the absolute value of the return value is "max_cutoff" * number of overflows.
+ * (e.g. >2hour + >2hours + 1:13:20 => >4hours
**/
integer ListSumCutOff( list<integer> sizes, integer max_cutoff )
{
- boolean overflow = false;
+ integer overflow = 0;
integer sum = 0;
foreach( integer item, sizes, ``{
@@ -186,16 +186,19 @@
{
if ( item > max_cutoff )
{
- overflow = true;
- sum = sum + max_cutoff;
+ overflow = overflow + 1;
}
else
+ {
sum = sum + item;
+ }
}
});
- if ( overflow )
- sum = -sum;
+ if (overflow > 0)
+ {
+ sum = -overflow * max_cutoff;
+ }
return sum;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-packager-2.19.2/src/modules/ProductLicense.ycp new/yast2-packager-2.19.3/src/modules/ProductLicense.ycp
--- old/yast2-packager-2.19.2/src/modules/ProductLicense.ycp 2010-01-05 13:45:45.000000000 +0100
+++ new/yast2-packager-2.19.3/src/modules/ProductLicense.ycp 2010-01-11 17:39:31.000000000 +0100
@@ -45,6 +45,12 @@
list <string> license_ids = [];
/**
+ * License files by their eula_ID
+ * @struct $["ID":$[licenses]]
+ */
+map > all_licenses = $[];
+
+/**
* Checks the string that might contain ID of a license and
* eventually returns that id.
* See also GetIdPlease for a better ratio of successful stories.
@@ -52,8 +58,8 @@
string GetId (string id_text) {
string id = nil;
- if (regexpmatch (id_text, "^license_language_[[:digit:]]+")) {
- id = regexpsub (id_text, "^license_language_([[:digit:]]+)", "\\1");
+ if (regexpmatch (id_text, "^license_language_.+")) {
+ id = regexpsub (id_text, "^license_language_(.+)", "\\1");
} else {
y2error ("Cannot get ID from %1", id_text);
}
@@ -671,6 +677,10 @@
licenses = LicenseFiles (license_dir,
license_patterns);
+
+ // all other 'licenses' could be replaced by this one
+ all_licenses[id] = licenses;
+
if (info_file == nil && size (licenses) == 0)
return `auto;
@@ -776,6 +786,11 @@
// read the selected language
lic_lang = (string) UI::QueryWidget (`id (sformat ("license_language_%1", id)), `Value);
term rp_id = `id (sformat ("license_contents_rp_%1", id));
+
+ if (licenses == $[]) {
+ licenses = all_licenses[id]:$[];
+ }
+
if (UI::WidgetExists (rp_id)) {
UI::ReplaceWidget (rp_id, GetLicenseContent (lic_lang, licenses, id));
} else {
@@ -819,7 +834,7 @@
string eula_id = nil;
foreach (string one_license_id, license_ids, {
- if (AcceptanceNeeded (one_license_id))
+ if (AcceptanceNeeded (one_license_id) != true)
return;
eula_id = sformat ("eula_%1", one_license_id);
@@ -842,11 +857,10 @@
symbol HandleLicenseDialogRet (map & licenses, boolean base_product, string action) {
any ret = nil;
- while (true)
- {
+ while (true) {
ret = UI::UserInput();
- if (is (ret, string) && regexpmatch (tostring (ret), "^license_language_[[:digit:]]+$")) {
+ if (is (ret, string) && regexpmatch (tostring (ret), "^license_language_")) {
UpdateLicenseContent (licenses, GetId (tostring (ret)));
ret = `language;
// bugzilla #303828
@@ -854,10 +868,8 @@
} else if (is (ret, string) && (regexpmatch (tostring(ret), "^yes_") || regexpmatch (tostring(ret), "^no_"))) {
if (AllLicensesAcceptedOrDeclined())
Wizard::EnableNextButton();
- }
-
// Aborting the license dialog
- if (ret == `abort) {
+ } else if (ret == `abort) {
// bugzilla #218677
if (base_product) {
if (Popup::ConfirmAbort (`painless)) {
@@ -873,9 +885,7 @@
break;
}
}
- }
- else if (ret == `next)
- {
+ } else if (ret == `next) {
// License declined
if (AllLicensesAccepted() != true)
{
@@ -941,11 +951,11 @@
ret = `accepted;
break;
}
- }
- else if (ret == `back)
- {
+ } else if (ret == `back) {
ret = `back;
break;
+ } else {
+ y2error ("Unhandled input: %1", ret);
}
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-packager-2.19.2/src/modules/SourceDialogs.ycp new/yast2-packager-2.19.3/src/modules/SourceDialogs.ycp
--- old/yast2-packager-2.19.2/src/modules/SourceDialogs.ycp 2009-11-23 17:19:21.000000000 +0100
+++ new/yast2-packager-2.19.3/src/modules/SourceDialogs.ycp 2010-01-07 12:52:18.000000000 +0100
@@ -20,6 +20,7 @@
import "Label";
import "URL";
+import "URLRecode";
import "Popup";
import "CWM";
import "SourceManager";
@@ -57,6 +58,10 @@
*/
boolean _allow_https = true;
+// CD/DVD device name to use (e.g. /dev/sr1) in case of multiple
+// devices in the system. Empty string means use the default.
+string cd_device_name = "";
+
/**
* Help text suffix for some types of the media
*/
@@ -1854,8 +1859,21 @@
string msg = selected == `cd
? _("Insert the add-on product CD")
: _("Insert the add-on product DVD");
- if (! SourceManager::AskForCD (msg))
+
+ // reset the device name
+ cd_device_name = "";
+
+ // ask for a medium
+ map ui_result = SourceManager::AskForCD (msg);
+ if (! ui_result["continue"]:false)
return false;
+
+ string cd_device = ui_result["device"]:"";
+ if (cd_device != nil && cd_device != "")
+ {
+ y2milestone("Selected CD/DVD device: %1", cd_device);
+ cd_device_name = cd_device;
+ }
}
else if (selected == `usb)
{
@@ -1905,8 +1923,14 @@
else if ( selected == `https ) _url = "https://";
else if ( selected == `samba ) _url = "smb://";
else if ( selected == `nfs ) _url = "nfs://";
- else if ( selected == `cd ) _url = "cd:///";
- else if ( selected == `dvd ) _url = "dvd:///";
+ else if ( selected == `cd || selected == `dvd)
+ {
+ _url = (selected == `cd) ? "cd:///" : "dvd:///";
+ if (cd_device_name != "")
+ {
+ _url = _url + "?devices=" + URLRecode::EscapeQuery(cd_device_name);
+ }
+ }
else if ( selected == `hd ) _url = "hd://";
else if ( selected == `usb ) _url = "usb://";
else if ( selected == `local_dir ) _url = "dir://";
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-packager-2.19.2/src/modules/SourceManager.ycp new/yast2-packager-2.19.3/src/modules/SourceManager.ycp
--- old/yast2-packager-2.19.2/src/modules/SourceManager.ycp 2009-03-23 15:22:03.000000000 +0100
+++ new/yast2-packager-2.19.3/src/modules/SourceManager.ycp 2010-01-07 13:46:57.000000000 +0100
@@ -7,7 +7,7 @@
* Martin Vidner
* Status: Work in Progress
*
- * $Id: SourceManager.ycp 56190 2009-03-17 18:50:02Z lslezak $
+ * $Id: SourceManager.ycp 60257 2010-01-07 12:46:56Z lslezak $
*
* Representation of the configuration of source-manager.
* Input and output routines.
@@ -729,13 +729,13 @@
/**
*
*/
-global boolean AskForCD (string message) {
+global map AskForCD (string message) {
list