* Thu Mar 5 2009 Dave Lehman <dlehman@redhat.com> - 11.5.0.24-3

- Fix booty's desire to import fsset.
- Fix attempt to set read-only attr "removable" in DiskDevice.__init__
This commit is contained in:
David Lehman 2009-03-05 08:54:21 +00:00
parent 82bfe2ab48
commit aaf153c0cd
2 changed files with 179 additions and 1 deletions

View File

@ -3,7 +3,7 @@
Summary: Graphical system installer
Name: anaconda
Version: 11.5.0.24
Release: 2
Release: 3
License: GPLv2+
Group: Applications/System
URL: http://fedoraproject.org/wiki/Anaconda
@ -16,6 +16,7 @@ Source0: %{name}-%{version}.tar.bz2
# Patch for EFI CDs
Patch0: anaconda-11.5.0.23-efi-cds.patch
Patch1: late.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@ -157,6 +158,7 @@ system. These files are of little use on an already installed system.
%prep
%setup -q
%patch0 -p1
%patch1 -p1 -b .late
%build
%{__make} depend
@ -213,6 +215,10 @@ update-desktop-database &> /dev/null || :
%endif
%changelog
* Thu Mar 5 2009 Dave Lehman <dlehman@redhat.com> - 11.5.0.24-3
- Fix booty's desire to import fsset.
- Fix attempt to set read-only attr "removable" in DiskDevice.__init__
* Thu Mar 05 2009 Peter Jones <pjones@redhat.com> - 11.5.0.24-2
- Add EFI boot.iso generation.

172
late.patch Normal file
View File

@ -0,0 +1,172 @@
diff -uN playpen/booty/alpha.py anaconda/booty/alpha.py
--- playpen/booty/alpha.py 2009-03-04 20:44:42.000000000 -0600
+++ anaconda/booty/alpha.py 2009-03-05 02:00:39.000000000 -0600
@@ -3,11 +3,11 @@
from booty import BootyNoKernelWarning
from bootloaderInfo import *
-import fsset
+from util import getDiskPart
class alphaBootloaderInfo(bootloaderInfo):
def wholeDevice (self, path):
- (device, foo) = fsset.getDiskPart(path)
+ (device, foo) = getDiskPart(path)
return device
def partitionNum (self, path):
diff -uN playpen/booty/bootloaderInfo.py anaconda/booty/bootloaderInfo.py
--- playpen/booty/bootloaderInfo.py 2009-03-04 20:44:42.000000000 -0600
+++ anaconda/booty/bootloaderInfo.py 2009-03-05 02:00:00.000000000 -0600
@@ -29,13 +29,13 @@
from rhpl.translate import _, N_
from flags import flags
-from fsset import getDiskPart
import iutil
import isys
from product import *
import booty
import checkbootloader
+from util import getDiskPart
if rhpl.getArch() not in ("s390", "s390x"):
import block
diff -uN playpen/booty/checkbootloader.py anaconda/booty/checkbootloader.py
--- playpen/booty/checkbootloader.py 2009-03-04 20:44:42.000000000 -0600
+++ anaconda/booty/checkbootloader.py 2009-03-05 02:00:08.000000000 -0600
@@ -19,7 +19,7 @@
import string
import rhpl
-from fsset import getDiskPart
+from util import getDiskPart
import iutil
grubConfigFile = "/etc/grub.conf"
diff -uN playpen/booty/ppc.py anaconda/booty/ppc.py
--- playpen/booty/ppc.py 2009-03-04 20:44:42.000000000 -0600
+++ anaconda/booty/ppc.py 2009-03-05 01:59:34.000000000 -0600
@@ -2,8 +2,8 @@
import os
from booty import BootyNoKernelWarning
+from util import getDiskPart
from bootloaderInfo import *
-import fsset
import iutil
import rhpl
diff -uN playpen/booty/util.py anaconda/booty/util.py
--- playpen/booty/util.py 1969-12-31 18:00:00.000000000 -0600
+++ anaconda/booty/util.py 2009-03-05 02:29:57.000000000 -0600
@@ -0,0 +1,33 @@
+import string
+
+def getDiskPart(dev):
+ cut = len(dev)
+ if (dev.startswith('rd/') or dev.startswith('ida/') or
+ dev.startswith('cciss/') or dev.startswith('sx8/') or
+ dev.startswith('mapper/') or dev.startswith('mmcblk')):
+ if dev[-2] == 'p':
+ cut = -1
+ elif dev[-3] == 'p':
+ cut = -2
+ else:
+ if dev[-2] in string.digits:
+ cut = -2
+ elif dev[-1] in string.digits:
+ cut = -1
+
+ name = dev[:cut]
+
+ # hack off the trailing 'p' from /dev/cciss/*, for example
+ if name[-1] == 'p':
+ for letter in name:
+ if letter not in string.letters and letter != "/":
+ name = name[:-1]
+ break
+
+ if cut < 0:
+ partNum = int(dev[cut:]) - 1
+ else:
+ partNum = None
+
+ return (name, partNum)
+
diff -uN playpen/booty/x86.py anaconda/booty/x86.py
--- playpen/booty/x86.py 2009-03-04 20:44:42.000000000 -0600
+++ anaconda/booty/x86.py 2009-03-05 01:59:24.000000000 -0600
@@ -2,9 +2,9 @@
import string
from booty import BootyNoKernelWarning
+from util import getDiskPart
from bootloaderInfo import *
import checkbootloader
-import fsset
import iutil
import rhpl
@@ -107,7 +107,7 @@
cmds = []
for bootDev in bootDevs:
gtPart = self.getMatchingPart(bootDev, grubTarget)
- gtDisk = self.grubbyPartitionName(fsset.getDiskPart(gtPart)[0])
+ gtDisk = self.grubbyPartitionName(getDiskPart(gtPart)[0])
bPart = self.grubbyPartitionName(bootDev)
cmd = "root %s\n" % (bPart,)
@@ -316,7 +316,7 @@
devs = usedDevs.keys()
usedDevs = {}
for dev in devs:
- drive = fsset.getDiskPart(dev)[0]
+ drive = getDiskPart(dev)[0]
if usedDevs.has_key(drive):
continue
usedDevs[drive] = 1
@@ -356,10 +356,10 @@
return ""
def getMatchingPart(self, bootDev, target):
- bootName, bootPartNum = fsset.getDiskPart(bootDev)
+ bootName, bootPartNum = getDiskPart(bootDev)
devices = self.getPhysicalDevices(target)
for device in devices:
- name, partNum = fsset.getDiskPart(device)
+ name, partNum = getDiskPart(device)
if name == bootName:
return device
return devices[0]
@@ -368,7 +368,7 @@
return "hd%d" % self.drivelist.index(name)
def grubbyPartitionName(self, dev):
- (name, partNum) = fsset.getDiskPart(dev)
+ (name, partNum) = getDiskPart(dev)
if partNum != None:
return "(%s,%d)" % (self.grubbyDiskName(name), partNum)
else:
@@ -478,7 +478,7 @@
grubbyRootPart = self.grubbyPartitionName(rootDevs[0])
for rootDev in rootDevs:
- testGrubbyRootDev = fsset.getDiskPart(rootDev)[0]
+ testGrubbyRootDev = getDiskPart(rootDev)[0]
testGrubbyRootDev = self.grubbyPartitionName(testGrubbyRootDev)
if grubbyStage1Dev == testGrubbyRootDev:
diff --git a/storage/devices.py b/storage/devices.py
index 27d9a1f..14fbb11 100644
--- a/storage/devices.py
+++ b/storage/devices.py
@@ -594,7 +594,6 @@ class DiskDevice(StorageDevice):
self.partedDevice = None
self.partedDisk = None
- self.removable = False
log.debug("looking up parted Device: %s" % self.path)
self.partedDevice = parted.Device(path=self.path)
if not self.partedDevice: