Hello community,
here is the log from the commit of package yast2-bootloader
checked in at Wed Apr 12 10:18:13 CEST 2006.
--------
--- yast2-bootloader/yast2-bootloader.changes 2006-04-11 17:22:11.000000000 +0200
+++ STABLE/yast2-bootloader/yast2-bootloader.changes 2006-04-11 22:20:03.000000000 +0200
@@ -1,0 +2,14 @@
+Tue Apr 11 22:17:59 CEST 2006 - od@suse.de
+
+- on pmac: propose only partitions smaller than 20 cylinders
+ (#158543)
+- 2.13.45
+
+-------------------------------------------------------------------
+Tue Apr 11 20:59:57 CEST 2006 - od@suse.de
+
+- propose bootloader location on pmac systems (#158543)
+- changed comment
+- 2.13.44
+
+-------------------------------------------------------------------
Old:
----
yast2-bootloader-2.13.43.tar.bz2
New:
----
yast2-bootloader-2.13.45.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-bootloader.spec ++++++
--- /var/tmp/diff_new_pack.9Q34tl/_old 2006-04-12 10:17:49.000000000 +0200
+++ /var/tmp/diff_new_pack.9Q34tl/_new 2006-04-12 10:17:49.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package yast2-bootloader (Version 2.13.43)
+# spec file for package yast2-bootloader (Version 2.13.45)
#
# 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-bootloader
-Version: 2.13.43
+Version: 2.13.45
Release: 1
License: GPL
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-bootloader-2.13.43.tar.bz2
+Source0: yast2-bootloader-2.13.45.tar.bz2
prefix: /usr
BuildRequires: docbook-xsl-stylesheets doxygen gcc-c++ libxslt limal-bootloader limal-devel perl-XML-Writer perl-gettext sgml-skel swig update-alternatives update-desktop-files yast2-devel yast2-devtools yast2-installation yast2-perl-bindings yast2-testsuite
PreReq: /bin/sed %fillup_prereq
@@ -60,7 +60,7 @@
Dan Meszaros
%prep
-%setup -n yast2-bootloader-2.13.43
+%setup -n yast2-bootloader-2.13.45
%build
%{prefix}/bin/y2tool y2autoconf
@@ -112,6 +112,14 @@
%changelog -n yast2-bootloader
* Tue Apr 11 2006 - od@suse.de
+- on pmac: propose only partitions smaller than 20 cylinders
+ (#158543)
+- 2.13.45
+* Tue Apr 11 2006 - od@suse.de
+- propose bootloader location on pmac systems (#158543)
+- changed comment
+- 2.13.44
+* Tue Apr 11 2006 - od@suse.de
- clone activate flag and loader_device for AutoYaST (#151501)
- 2.13.43
* Tue Apr 11 2006 - jplack@suse.de
++++++ yast2-bootloader-2.13.43.tar.bz2 -> yast2-bootloader-2.13.45.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-bootloader-2.13.43/VERSION new/yast2-bootloader-2.13.45/VERSION
--- old/yast2-bootloader-2.13.43/VERSION 2006-04-11 17:20:43.000000000 +0200
+++ new/yast2-bootloader-2.13.45/VERSION 2006-04-11 22:17:41.000000000 +0200
@@ -1 +1 @@
-2.13.43
+2.13.45
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-bootloader-2.13.43/src/modules/BootPOWERLILO.ycp new/yast2-bootloader-2.13.45/src/modules/BootPOWERLILO.ycp
--- old/yast2-bootloader-2.13.43/src/modules/BootPOWERLILO.ycp 2006-04-10 20:00:35.000000000 +0200
+++ new/yast2-bootloader-2.13.45/src/modules/BootPOWERLILO.ycp 2006-04-11 22:17:38.000000000 +0200
@@ -14,7 +14,7 @@
* Joachim Plack
* Olaf Dabrunz
*
- * $Id: BootPOWERLILO.ycp 29954 2006-04-10 18:00:31Z odabrunz $
+ * $Id: BootPOWERLILO.ycp 30009 2006-04-11 20:17:34Z odabrunz $
*
*/
@@ -260,6 +260,73 @@
regexpsub( old_description, "^[^:]*:[^:]*:[^:]*(:.*)$", "\\1");
}
+
+/**
+ * Choose a boot partition on pmac
+ * type == Apple_HFS|Apple_Bootstrap && size < 20 cyl
+ * @return string device name of pmac boot partition
+ */
+string GoodPmacBootPartition() {
+ y2milestone ("Detecting pmac boot partition");
+ map targetMap = (map)Storage::GetTargetMap ();
+ y2milestone ("TargetMap: %1", targetMap);
+
+ list<string> boot_partitions = [];
+ string selected_boot_partition = "";
+
+ foreach (string dname, map ddata, targetMap, ``{
+ list<map> partitions = ddata["partitions"]:[];
+ y2milestone ("Partitions: %1", partitions);
+
+ // does this device contain the root partition?
+ boolean hasrootdev = ( find (map p, partitions, ``(
+ (! p["delete"]:false)
+ && p["device"]:"" == BootCommon::RootPartitionDevice
+ && !contains( [`lvm, `evms, `sw_raid], p["type"]:`primary )
+ )) != nil );
+
+ // find possible boot partitions
+ partitions = filter (map p, partitions, ``(
+ (! p["delete"]:false)
+ && is (p["fsid"]:nil, integer)
+ // both partition types Apple_Bootstrap and Apple_HFS can be
+ // handled by PPC lilo; Storage maps both to fsid 258
+ && (p["fsid"]:nil == 258)
+ // the partition should be smaller than 20 cylinders (PPC lilo
+ // takes that size as well); estimating the kiBytes:
+ // 255 heads * 63 sectors * 20 cylinders * 512 bytes / 1024 bytes =
+ // 160650 kiBytes
+ && (p["size_k"]:0 < 160650)
+ && !contains( [`lvm, `evms, `sw_raid], p["type"]:`primary )
+ ));
+ y2milestone ("Filtered existing partitions: %1", partitions);
+
+ // found a boot partition on the same device as the root partition?
+ if (hasrootdev && size (partitions) > 0
+ && selected_boot_partition == "")
+ {
+ y2milestone ("Selected pmac boot partition %1 on device with root partition %2",
+ partitions[0, "device"]:"", BootCommon::RootPartitionDevice);
+ selected_boot_partition = partitions[0, "device"]:"";
+ }
+
+ // collect found boot partitions
+ boot_partitions = (list<string>)merge (boot_partitions,
+ (list<string>)maplist (map p, partitions, ``(
+ p["device"]:""
+ ))
+ );
+ });
+ y2milestone ("Detected pmac boot partitions: %1", boot_partitions);
+
+ if (selected_boot_partition == "")
+ {
+ selected_boot_partition = boot_partitions[0]:"";
+ }
+ y2milestone ("Selected pmac boot partition: %1", selected_boot_partition);
+ return selected_boot_partition;
+}
+
/**
* Propose the location of the root device on disk and the boot device (if
* any), according to the subarchitecture.
@@ -314,21 +381,16 @@
BootCommon::BootPartitionDevice = prep_boot_partition;
change_widget_default_value("boot_iseries_custom", prep_boot_partition);
}
+ else if ( arch == "pmac" ) {
+ BootCommon::BootPartitionDevice = GoodPmacBootPartition();
+ change_widget_default_value("boot_pmac_custom", BootCommon::BootPartitionDevice);
+ }
// These need to be set (FIXME: find out why) --
// see ConfigureLocation() in lilolike.ycp
BootCommon::loader_device = BootCommon::BootPartitionDevice;
BootCommon::activate = true;
y2milestone("Boot partition is %1", BootCommon::loader_device);
-
-/*
- // FIXME: create code for the cases below
- else if ( arch == "pmac" ) {
- boot_map = $[
- "boot_pmac_custom" : GoodHFSBootPartition(BootCommon::RootPartitionDevice),
- ]
- }
-*/
}
/**
@@ -380,14 +442,11 @@
"boot_prep_custom" : BootCommon::BootPartitionDevice,
];
}
-/*
- // FIXME: create code for the cases below
else if ( arch == "pmac" ) {
boot_map = $[
- "boot_pmac_custom" : GoodHFSBootPartition(BootCommon::RootPartitionDevice),
- ]
+ "boot_pmac_custom" : BootCommon::BootPartitionDevice,
+ ];
}
-*/
else if ( arch == "iseries" ) {
boot_map = $[
"boot_slot" : "B",
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-bootloader-2.13.43/src/ppc/misc.ycp new/yast2-bootloader-2.13.45/src/ppc/misc.ycp
--- old/yast2-bootloader-2.13.43/src/ppc/misc.ycp 2006-04-05 01:49:06.000000000 +0200
+++ new/yast2-bootloader-2.13.45/src/ppc/misc.ycp 2006-04-11 20:57:04.000000000 +0200
@@ -11,7 +11,7 @@
* Authors:
* Jiri Srain
*
- * $Id: misc.ycp 29688 2006-04-04 23:48:59Z odabrunz $
+ * $Id: misc.ycp 30005 2006-04-11 18:56:59Z odabrunz $
*
*/
@@ -43,7 +43,7 @@
partitions = filter (map p, partitions, ``(
(! p["delete"]:false)
&& is (p["fsid"]:nil, integer)
- // both partition types 0x41 and FAT16 can be handled through lilo
+ // both partition types 0x41 and FAT16 can be handled by PPC lilo
&& (p["fsid"]:nil == 65 || p["fsid"]:nil == 6)
&& !contains( [`lvm, `evms, `sw_raid], p["type"]:`primary )
));
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...