Hello community,
here is the log from the commit of package yast2-update
checked in at Thu Nov 20 02:04:05 CET 2008.
--------
--- yast2-update/yast2-update.changes 2008-11-07 11:28:37.000000000 +0100
+++ /mounts/work_src_done/STABLE/yast2-update/yast2-update.changes 2008-11-19 17:33:28.000000000 +0100
@@ -1,0 +2,7 @@
+Wed Nov 19 17:32:01 CET 2008 - locilka@suse.cz
+
+- Added checking for incomplete installation when such system is
+ selected for update (bnc #441919).
+- 2.17.12
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
yast2-update-2.17.11.tar.bz2
New:
----
yast2-update-2.17.12.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-update.spec ++++++
--- /var/tmp/diff_new_pack.B19627/_old 2008-11-20 02:03:23.000000000 +0100
+++ /var/tmp/diff_new_pack.B19627/_new 2008-11-20 02:03:23.000000000 +0100
@@ -1,5 +1,5 @@
#
-# spec file for package yast2-update (Version 2.17.11)
+# spec file for package yast2-update (Version 2.17.12)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -19,12 +19,12 @@
Name: yast2-update
-Version: 2.17.11
+Version: 2.17.12
Release: 1
License: GPL v2 or later
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-update-2.17.11.tar.bz2
+Source0: yast2-update-2.17.12.tar.bz2
Prefix: /usr
BuildRequires: perl-XML-Writer update-desktop-files yast2-devtools yast2-storage yast2-testsuite
# Packages::GetBaseSourceID
@@ -82,7 +82,7 @@
Jiri Srain
%prep
-%setup -n yast2-update-2.17.11
+%setup -n yast2-update-2.17.12
%build
%{prefix}/bin/y2tool y2autoconf
@@ -130,6 +130,10 @@
/usr/share/YaST2/clients/update.ycp
/usr/share/YaST2/clients/run_update.ycp
%changelog
+* Wed Nov 19 2008 locilka@suse.cz
+- Added checking for incomplete installation when such system is
+ selected for update (bnc #441919).
+- 2.17.12
* Fri Nov 07 2008 locilka@suse.cz
- Using PackagesUI for opening a package selector (bnc #435479).
- 2.17.11
++++++ yast2-update-2.17.11.tar.bz2 -> yast2-update-2.17.12.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-update-2.17.11/src/include/rootpart.ycp new/yast2-update-2.17.12/src/include/rootpart.ycp
--- old/yast2-update-2.17.11/src/include/rootpart.ycp 2008-10-09 18:55:12.000000000 +0200
+++ new/yast2-update-2.17.12/src/include/rootpart.ycp 2008-11-19 17:15:52.000000000 +0100
@@ -19,6 +19,7 @@
import "GetInstArgs";
import "Report";
import "Update";
+import "Installation";
// Returns boolean whether partition can be
// a Linux 'root' file system
@@ -118,6 +119,11 @@
return false;
}
+void UmountMountedPartition () {
+ Update::Detach ();
+ RootPart::UnmountPartitions (false);
+}
+
/**
* This dialog comes in several different flavors:
* `update_dialog - used to show partitions available for upgrade,
@@ -330,13 +336,31 @@
{
RootPart::targetOk = RootPart::mount_target ();
- if (!RootPart::targetOk)
- {
+ // Not mounted correctly
+ if (! RootPart::targetOk) {
// error report
Report::Error (_("Failed to mount target system"));
- Update::Detach ();
- RootPart::UnmountPartitions (false);
+ UmountMountedPartition();
continue;
+
+ // Correctly mounted but incomplete installation found
+ } else if (RootPart::IncompleteInstallationDetected (Installation::destdir)) {
+ if (Popup::AnyQuestion (
+ Label::WarningMsg(),
+ // pop-up question
+ _("A possibly incomplete installation has been detected on the selected partition.
+Are sure you want to use it anyway?"),
+ // button label
+ _("&Yes, Use It"),
+ Label::CancelButton(),
+ `focus_no
+ )) {
+ y2milestone ("User wants to update possibly incomplete system");
+ } else {
+ y2milestone ("User decided not to update incomplete system");
+ UmountMountedPartition();
+ continue;
+ }
}
}
break;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-update-2.17.11/src/modules/RootPart.ycp new/yast2-update-2.17.12/src/modules/RootPart.ycp
--- old/yast2-update-2.17.11/src/modules/RootPart.ycp 2008-11-04 11:34:26.000000000 +0100
+++ new/yast2-update-2.17.12/src/modules/RootPart.ycp 2008-11-19 17:33:40.000000000 +0100
@@ -6,7 +6,7 @@
* Purpose: Responsible for searching of root partitions and
* mounting of target partitions.
*
- * $Id: RootPart.ycp 52872 2008-11-04 10:34:42Z locilka $
+ * $Id: RootPart.ycp 53447 2008-11-19 16:34:20Z locilka $
*/
{
module "RootPart";
@@ -1367,6 +1367,28 @@
return deletechars (bash_out["stdout"]:"unknown", "\n");
}
+ /**
+ * Checks the partition whether it contains an incomplete installation.
+ *
+ * @see BNC #441919
+ * @param string system mounted to directory
+ * @return boolean true if incomplete
+ */
+ global boolean IncompleteInstallationDetected (string mounted_to) {
+ // by default, installation is complete
+ boolean ret = false;
+
+ foreach (string check_this, [Installation::run_yast_at_boot], {
+ check_this = sformat ("%1/%2", mounted_to, check_this);
+ if (FileUtils::Exists (check_this) == true) {
+ y2milestone ("File %1 exists, installation is incomplete", check_this);
+ ret = true;
+ break;
+ }
+ });
+
+ return ret;
+ }
/**
* Check a root partition and return map with infomations (see
@@ -1484,6 +1506,11 @@
freshman[`valid] = false;
}
+ if (IncompleteInstallationDetected (Installation::destdir)) {
+ y2milestone ("Incomplete installation detected, partition is not valid");
+ freshman[`valid] = false;
+ }
+
y2milestone ("Partition is valid: %1, arch is valid: %2", freshman[`valid]:false, freshman[`arch_valid]:false);
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-update-2.17.11/VERSION new/yast2-update-2.17.12/VERSION
--- old/yast2-update-2.17.11/VERSION 2008-11-07 11:29:27.000000000 +0100
+++ new/yast2-update-2.17.12/VERSION 2008-11-19 17:33:33.000000000 +0100
@@ -1 +1 @@
-2.17.11
+2.17.12
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org