Hello community,
here is the log from the commit of package yast2-update
checked in at Fri Nov 10 01:59:17 CET 2006.
--------
--- yast2-update/yast2-update.changes 2006-11-07 13:02:54.000000000 +0100
+++ /mounts/work_src_done/STABLE/yast2-update/yast2-update.changes 2006-11-09 13:20:14.000000000 +0100
@@ -1,0 +2,11 @@
+Thu Nov 9 10:12:01 CET 2006 - locilka@suse.cz
+
+- If no base product found, do not complain about imcompatibility.
+ This happens only when updating the running system (#218720).
+- Changed [Next] button to [Accept] in the update proposal on the
+ running system (#219097).
+- Checking for RPM Database. Reporting error when it is missing and
+ offering `abort, `retry, `ignore (#148105).
+- 2.14.6
+
+-------------------------------------------------------------------
Old:
----
yast2-update-2.14.5.tar.bz2
New:
----
yast2-update-2.14.6.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-update.spec ++++++
--- /var/tmp/diff_new_pack.b1NcfU/_old 2006-11-10 01:59:07.000000000 +0100
+++ /var/tmp/diff_new_pack.b1NcfU/_new 2006-11-10 01:59:07.000000000 +0100
@@ -1,5 +1,5 @@
#
-# spec file for package yast2-update (Version 2.14.5)
+# spec file for package yast2-update (Version 2.14.6)
#
# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -11,12 +11,12 @@
# norootforbuild
Name: yast2-update
-Version: 2.14.5
+Version: 2.14.6
Release: 1
License: GNU General Public License (GPL) - all versions
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-update-2.14.5.tar.bz2
+Source0: yast2-update-2.14.6.tar.bz2
prefix: /usr
BuildRequires: docbook-xsl-stylesheets doxygen libxslt perl-XML-Writer sgml-skel update-desktop-files yast2 yast2-bootloader yast2-devtools yast2-mouse yast2-packager yast2-testsuite yast2-xml
Requires: yast2 yast2-installation yast2-storage yast2-packager
@@ -40,7 +40,7 @@
Jiri Srain
%prep
-%setup -n yast2-update-2.14.5
+%setup -n yast2-update-2.14.6
%build
%{prefix}/bin/y2tool y2autoconf
@@ -75,6 +75,14 @@
%doc %{prefix}/share/doc/packages/yast2-update
%changelog -n yast2-update
+* Thu Nov 09 2006 - locilka@suse.cz
+- If no base product found, do not complain about imcompatibility.
+ This happens only when updating the running system (#218720).
+- Changed [Next] button to [Accept] in the update proposal on the
+ running system (#219097).
+- Checking for RPM Database. Reporting error when it is missing and
+ offering `abort, `retry, `ignore (#148105).
+- 2.14.6
* Tue Nov 07 2006 - locilka@suse.cz
- Removing testsuite for now for not being able to pass it without
root permissions.
++++++ yast2-update-2.14.5.tar.bz2 -> yast2-update-2.14.6.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-update-2.14.5/VERSION new/yast2-update-2.14.6/VERSION
--- old/yast2-update-2.14.5/VERSION 2006-11-07 13:03:05.000000000 +0100
+++ new/yast2-update-2.14.6/VERSION 2006-11-09 10:18:12.000000000 +0100
@@ -1 +1 @@
-2.14.5
+2.14.6
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-update-2.14.5/kernel-update-tool.pot new/yast2-update-2.14.6/kernel-update-tool.pot
--- old/yast2-update-2.14.5/kernel-update-tool.pot 1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-update-2.14.6/kernel-update-tool.pot 2006-11-09 11:06:46.000000000 +0100
@@ -0,0 +1,33 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR SuSE Linux Products GmbH, Nuernberg
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR , YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2006-11-09 11:06+0100\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME \n"
+"Language-Team: LANGUAGE \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: src/clients/kernel-update.ycp:189
+msgid "Warning"
+msgstr ""
+
+#: src/clients/kernel-update.ycp:190
+msgid "Abort the kernel upgrade?"
+msgstr ""
+
+#: src/clients/kernel-update.ycp:247
+msgid "Alternate Download Location"
+msgstr ""
+
+#: src/clients/kernel-update.ycp:510
+msgid "Kernel Update Status Log"
+msgstr ""
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-update-2.14.5/src/clients/update.ycp new/yast2-update-2.14.6/src/clients/update.ycp
--- old/yast2-update-2.14.5/src/clients/update.ycp 2006-10-13 13:39:55.000000000 +0200
+++ new/yast2-update-2.14.6/src/clients/update.ycp 2006-11-09 13:31:46.000000000 +0100
@@ -5,7 +5,7 @@
* Authors: Klaus Kaempf
* Arvin Schnell
*
- * $Id: update.ycp 33392 2006-10-13 11:39:53Z locilka $
+ * $Id: update.ycp 34202 2006-11-09 12:31:44Z locilka $
*/
{
@@ -21,6 +21,7 @@
import "Update";
import "Wizard";
import "ProductControl";
+ import "Label";
// set normal mode and update
Mode::SetMode ("update");
@@ -32,6 +33,7 @@
ProductControl::custom_control_file = "/usr/share/YaST2/control/update.xml";
Wizard::OpenNextBackDialog();
+ Wizard::SetNextButton(`next, Label::AcceptButton());
if (!ProductControl::Init())
{
y2error("control file %1 not found", ProductControl::custom_control_file );
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-update-2.14.5/src/clients/update_proposal.ycp new/yast2-update-2.14.6/src/clients/update_proposal.ycp
--- old/yast2-update-2.14.5/src/clients/update_proposal.ycp 2006-10-13 13:39:55.000000000 +0200
+++ new/yast2-update-2.14.6/src/clients/update_proposal.ycp 2006-11-09 13:31:46.000000000 +0100
@@ -5,7 +5,7 @@
*
* Purpose: Let user choose update settings.
*
- * $Id: update_proposal.ycp 33392 2006-10-13 11:39:53Z locilka $
+ * $Id: update_proposal.ycp 34202 2006-11-09 12:31:44Z locilka $
*/
{
textdomain "update";
@@ -21,11 +21,99 @@
import "Popup";
import "ProductFeatures";
import "Product";
+ import "FileUtils";
+ import "Label";
string func = (string) WFM::Args(0);
map param = (map) WFM::Args(1);
map ret = $[];
+
+ boolean rpm_db_existency_checked_already = false;
+
+ // bugzilla #148105
+ // Check the current RPM Database if exists
+ //
+ // RPM DB found -> return true
+ // RPM DB not found & skipped -> return true
+ // RPM DB not found & aborted -> return false
+ //
+ boolean CheckRPMDBforExistency () {
+ y2milestone ("Checking the current RPM Database in '%1'...", Installation::destdir);
+
+ // at least one must be there, the second one is for RPM v3
+ list <string> rpm_db_files = [ "/var/lib/rpm/Packages", "/var/lib/rpm/packages.rpm" ];
+ boolean ret = false;
+ boolean file_found_or_error_skipped = false;
+
+ while (! file_found_or_error_skipped) {
+ foreach (string check_file, rpm_db_files, {
+ if (Installation::destdir != "/")
+ check_file = sformat("%1%2", Installation::destdir, check_file);
+ if (FileUtils::Exists (check_file)) {
+ y2milestone ("RPM Database '%1' found", check_file);
+ ret = true;
+ file_found_or_error_skipped = true;
+ break;
+ }
+ });
+
+ // file not found
+ if (! ret) {
+ y2error ("None of files %1 exist in '%2'",
+ rpm_db_files, Installation::destdir
+ );
+
+ string missing_files = "";
+ foreach (string check_file, rpm_db_files, {
+ if (Installation::destdir != "/")
+ check_file = sformat("%1%2", Installation::destdir, check_file);
+ missing_files = missing_files + "\n" + check_file;
+ });
+
+ UI::OpenDialog (
+ `opt(`decorated),
+ `VBox (
+ // popup error
+ `Label (
+ // part of error popup message
+ _("Cannot read the current RPM Database.") + "\n\n" +
+ // part of error popup message, %1 stands for newline-separated list of files
+ sformat (_("None of these files exist:%1"), missing_files) + "\n\n"
+ ),
+ `HBox (
+ `PushButton (`id(`abort), Label::AbortButton()),
+ `PushButton (`id(`retry), Label::RetryButton()),
+ `PushButton (`id(`ignore), Label::IgnoreButton())
+ )
+ )
+ );
+
+ any ui_r = UI::UserInput();
+
+ if (ui_r == `cancel || ui_r == `abort) {
+ ret = false;
+ file_found_or_error_skipped = true;
+ y2milestone ("Check failed, returning error.");
+ } else if (ui_r == `retry) {
+ file_found_or_error_skipped = false;
+ y2milestone ("Trying again...");
+ } else if (ui_r == `ignore) {
+ ret = true;
+ file_found_or_error_skipped = true;
+ y2warning ("Skipping missing RPM Database, problems might occur...");
+ } else {
+ file_found_or_error_skipped = false;
+ y2error ("Unexpected return: %1", ui_r);
+ }
+
+ UI::CloseDialog();
+ }
+ }
+
+ y2milestone ("CheckRPMDBforExistency - returning: %1", ret);
+ return ret;
+ }
define void SelectKernelPackages () {
list <list> provides = Pkg::PkgQueryProvides ("kernel");
@@ -243,8 +331,24 @@
Update::Reset ();
Packages::Reset ([`product]);
Update::did_init1 = false;
+ rpm_db_existency_checked_already = false;
}
+ // bugzilla #148105
+ if (! rpm_db_existency_checked_already) {
+ rpm_db_existency_checked_already = true;
+
+ // if it doesn't exist, user can still confirm to continue
+ // packager will then suggest some set of packages
+ if (! CheckRPMDBforExistency()) {
+ return $[
+ // error message in proposal
+ "warning" : _("Cannot read the current RPM Database."),
+ "warning_level" : `fatal,
+ "raw_proposal" : [],
+ ];
+ }
+ }
// Fill return map
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-update-2.14.5/src/modules/Update.ycp new/yast2-update-2.14.6/src/modules/Update.ycp
--- old/yast2-update-2.14.5/src/modules/Update.ycp 2006-11-01 17:07:00.000000000 +0100
+++ new/yast2-update-2.14.6/src/modules/Update.ycp 2006-11-09 13:31:46.000000000 +0100
@@ -6,7 +6,7 @@
*
* Purpose: Update module
*
- * $Id: Update.ycp 33975 2006-11-01 16:06:57Z locilka $
+ * $Id: Update.ycp 34202 2006-11-09 12:31:44Z locilka $
*/
{
module "Update";
@@ -139,16 +139,27 @@
map prod_info = Pkg::SourceProduct (src);
return prod_info["name"]:"";
});
+ // filter out empty products
+ to_install = filter (string o_p, to_install, { return o_p != ""; });
+
y2milestone ("Installed products: %1", inst_names);
y2milestone ("Products on installation media: %1", to_install);
- string equal_product = find (string i, inst_names, {
- string found = find (string u, to_install, {
- return u == i;
+ // at least one product name found
+ if (size (to_install) > 0) {
+ string equal_product = find (string i, inst_names, {
+ string found = find (string u, to_install, {
+ return u == i;
+ });
+ return found != nil;
});
- return found != nil;
- });
- _products_compatible = equal_product != nil;
+ _products_compatible = equal_product != nil;
+ // no product name found
+ // bugzilla #218720, valid without testing according to comment #10
+ } else {
+ y2warning ("No products found, setting product-compatible to 'true'");
+ _products_compatible = true;
+ }
}
else
{
@@ -156,6 +167,7 @@
}
y2milestone ("Products found compatible: %1", _products_compatible);
}
+
return _products_compatible;
}
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org