Hello community,
here is the log from the commit of package yast2-update
checked in at Tue Sep 26 18:39:45 CEST 2006.
--------
--- yast2-update/yast2-update.changes 2006-08-29 08:41:36.000000000 +0200
+++ /mounts/work_src_done/STABLE/yast2-update/yast2-update.changes 2006-09-26 15:13:06.000000000 +0200
@@ -1,0 +2,6 @@
+Tue Sep 26 12:26:16 CEST 2006 - locilka@suse.cz
+
+- Run read-only fsck.jfs before mounting jfs partition (#176292).
+- 2.13.36
+
+-------------------------------------------------------------------
Old:
----
yast2-update-2.13.35.tar.bz2
New:
----
yast2-update-2.13.36.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-update.spec ++++++
--- /var/tmp/diff_new_pack.HGxo6u/_old 2006-09-26 18:39:37.000000000 +0200
+++ /var/tmp/diff_new_pack.HGxo6u/_new 2006-09-26 18:39:37.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package yast2-update (Version 2.13.35)
+# spec file for package yast2-update (Version 2.13.36)
#
# 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.13.35
+Version: 2.13.36
Release: 1
License: GPL
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-update-2.13.35.tar.bz2
+Source0: yast2-update-2.13.36.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.13.35
+%setup -n yast2-update-2.13.36
%build
%{prefix}/bin/y2tool y2autoconf
@@ -75,6 +75,9 @@
%doc %{prefix}/share/doc/packages/yast2-update
%changelog -n yast2-update
+* Tue Sep 26 2006 - locilka@suse.cz
+- Run read-only fsck.jfs before mounting jfs partition (#176292).
+- 2.13.36
* Tue Aug 29 2006 - locilka@suse.cz
- Better wording for table of partition names to be selected for
update, added File System column. (#166478)
++++++ yast2-update-2.13.35.tar.bz2 -> yast2-update-2.13.36.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-update-2.13.35/VERSION new/yast2-update-2.13.36/VERSION
--- old/yast2-update-2.13.35/VERSION 2006-08-29 08:42:02.000000000 +0200
+++ new/yast2-update-2.13.36/VERSION 2006-09-26 15:13:23.000000000 +0200
@@ -1 +1 @@
-2.13.35
+2.13.36
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-update-2.13.35/src/modules/RootPart.ycp new/yast2-update-2.13.36/src/modules/RootPart.ycp
--- old/yast2-update-2.13.35/src/modules/RootPart.ycp 2006-08-29 08:42:47.000000000 +0200
+++ new/yast2-update-2.13.36/src/modules/RootPart.ycp 2006-09-26 15:13:38.000000000 +0200
@@ -6,7 +6,7 @@
* Purpose: Responsible for searching of root partitions and
* mounting of target partitions.
*
- * $Id: RootPart.ycp 32600 2006-08-29 06:44:21Z locilka $
+ * $Id: RootPart.ycp 33129 2006-09-26 13:13:34Z locilka $
*/
{
module "RootPart";
@@ -53,6 +53,8 @@
// Did we try to mount the target partitions?
global boolean did_try_mount_partitions = false;
+
+ list <string> already_checked_jfs_partitions = [];
/**
@@ -273,6 +275,58 @@
}
/**
+ * Function checks the device and returns whether it is OK or not.
+ * The read-only FS check is performed for jfs only and only one for
+ * one device.
+ *
+ * @param string mount_type "jfs", "ext2" or "reiser"
+ * @param string device, such as /dev/hda3 or /dev/sda8
+ * @param string error_message (a reference to string)
+ * @return boolean if successfull or if user forces it
+ */
+define boolean RunFSCKonJFS (string mount_type, string device, string & error_message) {
+ // #176292, run fsck before jfs is mounted
+ if (mount_type == "jfs" && device != "") {
+
+ if (contains (already_checked_jfs_partitions, device)) {
+ y2milestone ("Device %1 has been already checked...", device);
+ return true;
+ }
+
+ UI::OpenDialog (`Label (sformat (_("Checking file system on %1..."), device)));
+
+ y2milestone ("Running fsck on %1", device);
+ // -n == Check read only, make no changes to the file system.
+ map cmd = (map) SCR::Execute (.target.bash_output, sformat ("fsck.jfs -n %1", device));
+
+ UI::CloseDialog();
+
+ // failed
+ if (cmd["exit"]:nil != 0) {
+ y2error ("Result: %1", cmd);
+ error_message = tostring(cmd["stderr"]:nil);
+
+ return Popup::ContinueCancel (sformat (
+ // popup question (continue/cancel dialog)
+ // %1 is a device name such as /dev/hda5
+ _("The file system check of device %1 has failed.
+
+Would you like to continue in mounting the device?"),
+ device
+ ));
+ // succeeded
+ } else {
+ // add device into the list of already checked partitions (with exit status 0);
+ already_checked_jfs_partitions = add (already_checked_jfs_partitions, device);
+ y2milestone ("Result: %1", cmd);
+ return true;
+ }
+ }
+
+ return true;
+}
+
+/**
* Mount partition on specified mount point
* @param mount_point string mount point to monut the partition at
* @param device string device to mount
@@ -291,6 +345,11 @@
y2milestone("Calling 'modprobe %1'", mount_type);
SCR::Execute(.target.modprobe, mount_type, "" );
+ string error_message = nil;
+ if (! RunFSCKonJFS (mount_type, device, error_message)) {
+ return error_message;
+ }
+
if (mount_type != "")
mount_type = "-t " + mount_type;
@@ -1007,6 +1066,15 @@
`jfs: "jfs",
];
string mount_type = mt_map[p_detect_fs]:"";
+
+ string error_message = nil;
+ if (! RunFSCKonJFS (mount_type, p_dev, error_message)) {
+ freshman[`valid] = false;
+ // popup error, %1 is a device name /dev/hda5
+ Report::Error (sformat (_("File system check of the device %1 has failed."), p_dev));
+ return freshman;
+ }
+
if (mount_type != "")
SCR::Execute(.target.modprobe, mount_type, "" );
// mount (read-only) partition to Installation::destdir
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org