Hello community, here is the log from the commit of package yast2-repair checked in at Thu May 1 14:23:28 CEST 2008. -------- --- yast2-repair/yast2-repair.changes 2008-04-14 14:18:07.000000000 +0200 +++ /mounts/work_src_done/NOARCH/yast2-repair/yast2-repair.changes 2008-04-30 15:58:47.179548000 +0200 @@ -1,0 +2,9 @@ +Tue Apr 22 11:58:58 CEST 2008 - jsuchome@suse.cz + +- extended help text if no partition was found (bnc#366856) +- initialize target before source to get correct name of kernel +- patterns now only recommend packages +- handle encrypted partitions separately during fstab check +- 2.16.9 + +------------------------------------------------------------------- Old: ---- yast2-repair-2.16.8.tar.bz2 New: ---- yast2-repair-2.16.9.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-repair.spec ++++++ --- /var/tmp/diff_new_pack.o15277/_old 2008-05-01 14:22:27.000000000 +0200 +++ /var/tmp/diff_new_pack.o15277/_new 2008-05-01 14:22:27.000000000 +0200 @@ -1,5 +1,5 @@ # -# spec file for package yast2-repair (Version 2.16.8) +# spec file for package yast2-repair (Version 2.16.9) # # Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany. # This file and all modifications and additions to the pristine @@ -12,12 +12,12 @@ Name: yast2-repair -Version: 2.16.8 +Version: 2.16.9 Release: 1 License: GPL v2 or later Group: System/YaST BuildRoot: %{_tmppath}/%{name}-%{version}-build -Source0: yast2-repair-2.16.8.tar.bz2 +Source0: yast2-repair-2.16.9.tar.bz2 Prefix: /usr BuildRequires: perl-XML-Writer update-desktop-files yast2 yast2-bootloader yast2-devtools yast2-packager yast2-storage yast2-testsuite Requires: yast2 gpart reiserfs e2fsprogs yast2-bootloader yast2-storage @@ -35,7 +35,7 @@ Jiri Suchomel <jsuchome@suse.cz> %prep -%setup -n yast2-repair-2.16.8 +%setup -n yast2-repair-2.16.9 %build %{prefix}/bin/y2tool y2autoconf @@ -69,6 +69,12 @@ /usr/share/YaST2/include/repair/* %doc %{prefix}/share/doc/packages/yast2-repair %changelog +* Tue Apr 22 2008 jsuchome@suse.cz +- extended help text if no partition was found (bnc#366856) +- initialize target before source to get correct name of kernel +- patterns now only recommend packages +- handle encrypted partitions separately during fstab check +- 2.16.9 * Mon Apr 14 2008 jsuchome@suse.cz - solver needs to be run before reading product info (bnc#368104) - 2.16.8 ++++++ yast2-repair-2.16.8.tar.bz2 -> yast2-repair-2.16.9.tar.bz2 ++++++ diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-repair-2.16.8/src/OSRFstab.ycp new/yast2-repair-2.16.9/src/OSRFstab.ycp --- old/yast2-repair-2.16.8/src/OSRFstab.ycp 2008-04-02 13:49:59.000000000 +0200 +++ new/yast2-repair-2.16.9/src/OSRFstab.ycp 2008-04-30 15:57:48.000000000 +0200 @@ -25,7 +25,7 @@ * OSRFstab::Repair(); * * - * $Id: OSRFstab.ycp 45959 2008-04-02 11:49:58Z jsuchome $ + * $Id: OSRFstab.ycp 47234 2008-04-30 13:57:48Z jsuchome $ */ { module "OSRFstab"; @@ -117,6 +117,11 @@ list<string> checked_partitions = []; /** + * Encrypted partitions (actually not checked) + */ + list<string> encrypted_partitions = []; + + /** @example of map describing /etc/fstab: $[ @@ -302,6 +307,7 @@ integer i = 0; foreach (string partition_item, linux_partition_list, ``{ +y2internal ("partition to check: %1", partition_item); if ((boolean) WFM::Execute (.local.mount, [ partition_item, m_point, OSRExecute::OutputFile() ])) { @@ -573,6 +579,8 @@ */ define map devname2part(string dev_name)``{ + y2milestone ("device name %1", dev_name); + if (substring (dev_name, 0,1) != "/") return $[]; map ret = StorageDevices::GetCdromEntry( dev_name); @@ -622,6 +630,13 @@ if (ret == $[] || ret == nil) { ret = Storage::GetPartition( Storage::GetTargetMap(), dev_name ); + if (ret == $[] && substring (dev_name, 0, 15) == "/dev/mapper/cr_") + { + // encrypted partition does not show the real device name + dev_name = "/dev/" + substring (dev_name, 15); + y2milestone ("transforming device name to %1", dev_name); + ret = Storage::GetPartition (Storage::GetTargetMap(), dev_name); + } if (ret != $[] && ret != nil) { /* dev name might be: /dev/disk/by-id/scsi-SATA_ST340016A_3HS8YAL0-part6 @@ -661,6 +676,7 @@ define boolean check_dev_entry(string p)``{ map part = devname2part(p); +y2internal ("part map for device %1: %2", p, part); map lines = filter (integer lnr, map line, fstab["l"]:$[], ``( (line["fields",0]:"!" == p) || @@ -867,6 +883,8 @@ { list<string> special_freq = []; list<string> special_passno = []; + string dev_name = part["dev_name"]:""; + string device = part["device"]:""; // cdrom floppy zip if (part["found"]:"" == "floppy" || @@ -880,8 +898,10 @@ fs_mntops = check_fs_mntops( line); } else if ((part["found"]:"" == "dev") && - (contains (checked_partitions, part["dev_name"]:"") || - contains (checked_partitions, part["device"]:"")) + (contains (checked_partitions, dev_name) || + contains (checked_partitions, device) || + contains (encrypted_partitions, dev_name) || + contains (encrypted_partitions, device)) ) { // check root first with CheckRootEntry!! @@ -899,8 +919,8 @@ part["mount"] = line[1]:""; Storage::ChangeVolumeProperties(part); } - else if ((contains (swapable_partition_list, part["dev_name"]:"") || - contains (swapable_partition_list, part["device"]:"")) && + else if ((contains (swapable_partition_list, dev_name) || + contains (swapable_partition_list, device)) && part["found"]:"" == "swap") { type = "swap"; @@ -1007,16 +1027,18 @@ * Check if all entries in the fstab are valid and * if all found devices have an entry in the fstab. */ - global define boolean Check(list<string> tswapable_partition_list, - list<string> tchecked_partitions) ``{ - - ResetSettings(); - swapable_partition_list = tswapable_partition_list; - checked_partitions = tchecked_partitions; + global define boolean Check (list<string> tswapable_partition_list, + list<string> tchecked_partitions, + list<string> tencrypted_partitions) + { + ResetSettings(); + swapable_partition_list = tswapable_partition_list; + checked_partitions = tchecked_partitions; + encrypted_partitions = tencrypted_partitions; map fstab2part = $[]; - // check all lines in existing fstab file + // check all lines in existing fstab file foreach (integer lnr, map line, fstab["l"]:$[], ``{ y2milestone("----check fstab line %1 ", lnr); if (! contains (valid_lines, lnr)) diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-repair-2.16.8/src/osr_module_partition.ycp new/yast2-repair-2.16.9/src/osr_module_partition.ycp --- old/yast2-repair-2.16.8/src/osr_module_partition.ycp 2008-04-08 13:14:08.000000000 +0200 +++ new/yast2-repair-2.16.9/src/osr_module_partition.ycp 2008-04-30 15:57:48.000000000 +0200 @@ -11,7 +11,7 @@ * Author: * Johannes Buchhold <jbuch@suse.de> * - * $Id: osr_module_partition.ycp 46224 2008-04-08 11:14:07Z jsuchome $ + * $Id: osr_module_partition.ycp 47234 2008-04-30 13:57:48Z jsuchome $ */ { @@ -53,11 +53,7 @@ */ define boolean OSRPartitionCheckDiskCount()``{ - ///////////////////////////////////////////////////////////////////////// - // // Check all disks for entries in their map - // - ///////////////////////////////////////////////////////////////////////// Storage::ReReadTargetMap(); // get the names of detected harddisks and put them in the list -> ["/dev/hda", "/dev/sda"] @@ -105,12 +101,7 @@ */ define boolean OSRPartitionCheckDisks() ``{ - ///////////////////////////////////////////////////////////////////////// - // // Iterate all harddisks, check for partitions - // - ///////////////////////////////////////////////////////////////////////// - map target_map = Storage::GetTargetMap(); list<string> valid_target_list = []; @@ -125,12 +116,8 @@ // summary text sformat(_("No partition table was found for hard disk %1"),target)); - ///////////////////////////////////////////////////////////////////// - // // Repair partition table with backup from floppy or with proposal // from gpart - // - ///////////////////////////////////////////////////////////////////// OSRSummary::SetRepairSummary( OSRPtbl::MainPtblRepairDialog(target), // summary header sformat(_("Repairing partition table of hard disk %1"), target), @@ -148,11 +135,7 @@ } }); - ///////////////////////////////////////////////////////////////////////// - // // Check if at least one harddisk with a valid partition table exists - // - ///////////////////////////////////////////////////////////////////////// if (size(valid_target_list) == 0) { @@ -194,14 +177,10 @@ }; /** - * + * search for valid swap partitions */ define boolean OSRPartitionCheckSwap()``{ - ///////////////////////////////////////////////////////////////// - // - // search for valid swap partitions - // - ///////////////////////////////////////////////////////////////// + list<string> swap_partition_list = OSRSwap::Partitions(); if ( size( swap_partition_list ) <= 0 ) { @@ -220,13 +199,11 @@ } + /** + * search for "swap-able" partitions + */ define boolean OSRPartitionCheckSwapAble()``{ - ///////////////////////////////////////////////////////////////// - // - // search for "swap-able" partitions - // - ///////////////////////////////////////////////////////////////// list<string> swap_partition_list = (list<string>) OSRCommon::RequireList("swap_partition_list"); // ["/dev/hda1", "/dev/hdb2"] list<string> swapable_partition_list = OSRSwap::ValidPartitions(swap_partition_list); // ["/dev/hdb2"] @@ -247,11 +224,7 @@ OSRCommon::ProvideList("swapable_partitions", swapable_partition_list); - ///////////////////////////////////////////////////////////////// - // // include all swap partitions - // - ///////////////////////////////////////////////////////////////// foreach(string swap, swapable_partition_list, ``{ // Check if the specified swap-partition is already "swapped", if true don't swapon. @@ -331,11 +304,7 @@ */ define boolean OSRPartitionLoadAllFsModules()``{ - ///////////////////////////////////////////////////////// - // // install available kernel modules for the filesystems - // - ///////////////////////////////////////////////////////// if (! OSRFsck::LoadAllFsModules()) { OSRSummary::DetectProblem("", @@ -355,17 +324,12 @@ } /** - * + * Umount all partitions from "/mnt" or from deeper directories + * (e.g. "/mnt/usr", "/mnt/usr/local", ...) + * before mounting anything to "/mnt". */ define boolean OSRPartitionCurrentlyMountedPartitions()``{ - ///////////////////////////////////////////////////////// - // - // Umount all partitions from "/mnt" or from deeper directories - // (e.g. "/mnt/usr", "/mnt/usr/local", ...) - // before mounting anything to "/mnt". - // - ///////////////////////////////////////////////////////// //string root_mountpoint = OSRCommon::RequireString("root_mountpoint"); OSRSystem::SetOrgRoot(); OSRCommon::ProvideList("just_umounted", OSRFstab::UmountAllFrom( OSRSystem::TargetRoot())); @@ -375,11 +339,7 @@ mounted_partitions = filter(map p, mounted_partitions, ``(p["file"]:"" != "swap" && findfirstof( p["spec"]:"", "/") == 0 )); - ///////////////////////////////////////////////////////// - // // search for currently mounted partitions - // - ///////////////////////////////////////////////////////// if ( size( mounted_partitions) <= 0) { // no mounted partitions: not implicitly an error! @@ -405,16 +365,10 @@ } /** - * + * search for fsck possible partitions */ define boolean OSRPartition2CheckPartitions()``{ - ///////////////////////////////////////////////////////// - // - // search for fsck possible partitions - // - ///////////////////////////////////////////////////////// - list<map> fs_check_parts = OSRFsck::PossiblePartitions(); if( size( fs_check_parts ) == 0 || fs_check_parts == nil) { @@ -439,10 +393,11 @@ OSRCommon::RequireList("fsck_partitions"); list<map> mounted_partitions = (list<map>) OSRCommon::RequireList("mounted_partitions"); - list<string> checked_partitions = []; + list<string> checked_partitions = []; + list<string> encrypted_partitions = []; foreach(map p, fsck_partitions, { - +y2internal ("partition to check %1", p); string dev_name = p["device"]:""; // summary header string summary_header = sformat(_("Executing file system check for partition %1..."), dev_name ); @@ -458,6 +413,7 @@ OSRSummary::DetectOmit (summary_header, // summary text _("Partition is encrypted: check not supported")); + encrypted_partitions = add (encrypted_partitions, dev_name); } else { @@ -504,13 +460,12 @@ } }); OSRCommon::ProvideList( "checked_partitions", checked_partitions ); + OSRCommon::ProvideList( "encrypted_partitions", encrypted_partitions ); return true; } /** - * ////////////////////////////////////////////////// - * // search for valid Linux partitions - * ////////////////////////////////////////////////// + * search for valid Linux partitions */ define boolean OSRPartitionLinuxPartitions()``{ @@ -567,15 +522,10 @@ /** - * + * search for mountable partitions */ define boolean OSRPartitionMountableLinuxPartitions()``{ - ///////////////////////////////////////////////////////// - // - // search for mountable partitions - // - ///////////////////////////////////////////////////////// list<string> linux_partition_list = (list<string>) OSRCommon::RequireList("linux_partition_list"); list<string> mount_possible_list = OSRFstab::MountablePartitions(linux_partition_list, OSRSystem::TargetRoot()); @@ -645,11 +595,7 @@ */ define boolean OSRPartitionFindRootPartitions() ``{ - ///////////////////////////////////////////////////////////////// - // // search for valid root partitions with a filesystem table - // - ///////////////////////////////////////////////////////////////// list<map> valid_root_partition_list = OSRFstab::ValidRootPartitions ( (list<string>) OSRCommon::RequireList("mount_possible_list"), @@ -733,13 +679,11 @@ + /** + * mount the root partition to /mnt + */ define boolean OSRPartitionMountRoot()``{ - ///////////////////////////////////////////////////////////////////////// - // - // mount the root partition to /mnt - // - ///////////////////////////////////////////////////////////////////////// string root_partition = OSRCommon::RequireString ("root_partition"); list<map> just_mounted = []; @@ -828,11 +772,7 @@ */ define boolean OSRPartitionReadFstab() ``{ - ///////////////////////////////////////////////////////////////////////// - // // get the fstab - // - ///////////////////////////////////////////////////////////////////////// // summary header string summary_header = sformat(_("Reading fstab of root partition %1..."), OSRCommon::RequireString("root_partition")); @@ -912,9 +852,11 @@ string root_partition = OSRCommon::RequireString("root_partition"); - if ( OSRFstab::Check ( + if (OSRFstab::Check ( (list<string>)OSRCommon::RequireList("swapable_partitions"), - (list<string>)OSRCommon::RequireList("checked_partitions"))) + (list<string>)OSRCommon::RequireList("checked_partitions"), + (list<string>)OSRCommon::RequireList("encrypted_partitions")) + ) { // summary text OSRSummary::DetectOK("", _("fstab entries valid")); @@ -1352,7 +1294,6 @@ * @return map The map that contains all information about the module * osr_module_partition. */ - define map OSRPartitionInit() ``{ return $[ // has to be the name of the file diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-repair-2.16.8/src/OSRPkgVerify.ycp new/yast2-repair-2.16.9/src/OSRPkgVerify.ycp --- old/yast2-repair-2.16.8/src/OSRPkgVerify.ycp 2006-09-26 14:43:06.000000000 +0200 +++ new/yast2-repair-2.16.9/src/OSRPkgVerify.ycp 2008-04-30 15:57:48.000000000 +0200 @@ -4,7 +4,7 @@ * Summary: Packages check * Authors: Johannes Buchhold <jbuch@suse.de> * - * $Id: OSRPkgVerify.ycp 20504 2004-12-06 14:55:51Z jsuchome $ + * $Id: OSRPkgVerify.ycp 47234 2008-04-30 13:57:48Z jsuchome $ * * Provide osr mode information. */ @@ -14,7 +14,6 @@ textdomain "repair"; - import "Kernel"; import "OSRExecute"; import "OSRLogFile"; import "OSRMode"; diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-repair-2.16.8/src/OSRPkg.ycp new/yast2-repair-2.16.9/src/OSRPkg.ycp --- old/yast2-repair-2.16.8/src/OSRPkg.ycp 2008-04-14 14:08:12.000000000 +0200 +++ new/yast2-repair-2.16.9/src/OSRPkg.ycp 2008-04-30 15:57:48.000000000 +0200 @@ -4,7 +4,7 @@ * Summary: Packages check * Authors: Johannes Buchhold <jbuch@suse.de> * - * $Id: OSRPkg.ycp 45581 2008-03-19 07:21:07Z jsuchome $ + * $Id: OSRPkg.ycp 47234 2008-04-30 13:57:48Z jsuchome $ * * Provide osr mode information. */ @@ -15,7 +15,6 @@ textdomain "repair"; import "DefaultDesktop"; - import "Kernel"; import "Mode"; import "Report"; import "Wizard"; @@ -207,8 +206,8 @@ list<map> descrs = Pkg::ResolvableDependencies (p,`pattern, ""); foreach (map descr, descrs, { foreach (map dep, (list<map>)descr["dependencies"]:[], { - if (dep["res_kind"]:"" == "package" && - dep["dep_kind"]:"" == "requires") + if (dep["res_kind"]:"" == "package" && contains ( + ["requires", "recommends"], dep["dep_kind"]:"")) { minimal_selection = add (minimal_selection, dep["name"]:""); @@ -232,6 +231,18 @@ y2milestone("Open pkg database with target system -%1-", root ); if (root != "" && root != nil ) root_mountpoint = root; + // open target system for Pkg access + if (!target_initialized) + { + if (first_time_openpkg) + { + y2milestone ("first time initializig -> finish target before"); + Pkg::TargetFinish (); + first_time_openpkg = false; + } + target_initialized = Pkg::TargetInit ( root, false); + } + // open the package source if (! Stage::initial () ) { @@ -260,19 +271,6 @@ } } - // open target system for Pkg access - if (!target_initialized) - { - if (first_time_openpkg) - { - y2milestone ("first time initializig -> finish target before"); - Pkg::TargetFinish (); - first_time_openpkg = false; - } - target_initialized = Pkg::TargetInit ( root, false); - get_minimal_selection (); - } - // something failed if (! target_initialized || ! source_initialized ) { @@ -706,10 +704,7 @@ else if (what == "base") { list<string> minimal = get_minimal_selection (); - list<string> special = []; - - minimal = filter (string p, minimal, ``( Pkg::IsAvailable(p))); - ret = (list<string>) union (minimal, special) ; + ret = filter (string p, minimal, ``( Pkg::IsAvailable(p))); } else { diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-repair-2.16.8/src/OSRPtbl.ycp new/yast2-repair-2.16.9/src/OSRPtbl.ycp --- old/yast2-repair-2.16.8/src/OSRPtbl.ycp 2008-01-07 15:38:28.000000000 +0100 +++ new/yast2-repair-2.16.9/src/OSRPtbl.ycp 2008-04-30 15:57:48.000000000 +0200 @@ -11,7 +11,7 @@ * Author: * Johannes Buchhold <jbuch@suse.de> * - * $Id: OSRPtbl.ycp 43308 2008-01-07 14:38:27Z jsuchome $ + * $Id: OSRPtbl.ycp 47234 2008-04-30 13:57:48Z jsuchome $ */ { module "OSRPtbl"; @@ -1336,13 +1336,16 @@ r_button = add( r_button, rd["default"]:false ); r_options = add( r_options , `Left( r_button )); }); - //%1 is device label, such as /dev/hda + // %1 is device label, such as /dev/hda + // sometimes it is not a problem (see bug 366856) => calm user with the + // last sentence string error_text = sformat(_(" No partition table was found for hard disk %1. If at least one partition should exist for %1, select one of the following repair methods. If no partition ever existed on this hard disk, skip the repair. +If in doubt, skip the repair. "), target); diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-repair-2.16.8/VERSION new/yast2-repair-2.16.9/VERSION --- old/yast2-repair-2.16.8/VERSION 2008-04-14 13:44:37.000000000 +0200 +++ new/yast2-repair-2.16.9/VERSION 2008-04-30 15:48:13.000000000 +0200 @@ -1 +1 @@ -2.16.8 +2.16.9 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org