summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xanaconda26
-rw-r--r--autopart.py6
-rw-r--r--harddrive.py2
-rw-r--r--hdrlist.py4
-rw-r--r--htmlbuffer.py3
-rw-r--r--image.py7
-rw-r--r--installclass.py4
-rw-r--r--installmethod.py3
-rw-r--r--iutil.py15
-rw-r--r--loader2/linuxrc.s39012
-rw-r--r--loader2/net.c4
-rw-r--r--network.py3
-rw-r--r--partedUtils.py36
-rw-r--r--partitions.py3
-rw-r--r--scripts/mk-images.ia643
-rwxr-xr-xscripts/pkgorder2
16 files changed, 102 insertions, 31 deletions
diff --git a/anaconda b/anaconda
index 4a67f8b06..af95eafb3 100755
--- a/anaconda
+++ b/anaconda
@@ -236,20 +236,20 @@ def setupRhplUpdates():
os.symlink("/mnt/source/RHupdates/rhpl/%s" %(f,),
"/tmp/updates/rhpl/%s" %(f,))
- if os.access("/usr/lib64/python2.2/site-packages/rhpl", os.X_OK):
- libdir = "lib64"
- else:
- libdir = "lib"
+ if os.access("/usr/lib64/python2.2/site-packages/rhpl", os.X_OK):
+ libdir = "lib64"
+ else:
+ libdir = "lib"
- for f in os.listdir("/usr/%s/python2.2/site-packages/rhpl" %(libdir,)):
- if os.access("/tmp/updates/rhpl/%s" %(f,), os.R_OK):
- continue
- elif f.endswith(".pyc") and os.access("/tmp/updates/rhpl/%s" %(f[:-1],), os.R_OK):
- # dont copy .pyc files we are replacing with updates
- continue
-
- os.symlink("/usr/%s/python2.2/site-packages/rhpl/%s" %(libdir, f),
- "/tmp/updates/rhpl/%s" %(f,))
+ for f in os.listdir("/usr/%s/python2.2/site-packages/rhpl" %(libdir,)):
+ if os.access("/tmp/updates/rhpl/%s" %(f,), os.R_OK):
+ continue
+ elif f.endswith(".pyc") and os.access("/tmp/updates/rhpl/%s" %(f[:-1],), os.R_OK):
+ # dont copy .pyc files we are replacing with updates
+ continue
+
+ os.symlink("/usr/%s/python2.2/site-packages/rhpl/%s" %(libdir, f),
+ "/tmp/updates/rhpl/%s" %(f,))
# For anaconda in test mode
if (os.path.exists('isys')):
diff --git a/autopart.py b/autopart.py
index a82cd91cc..016520d20 100644
--- a/autopart.py
+++ b/autopart.py
@@ -1007,7 +1007,7 @@ def doPartitioning(diskset, requests, doRefresh = 1):
elif ret == BOOTEFI_NOT_VFAT:
raise PartitioningError, _("Boot partition %s isn't a VFAT partition. EFI won't be able to boot from this partition.") %(requests.getBootableRequest()[0].mountpoint,)
elif ret == BOOTIPSERIES_TOO_HIGH:
- raise PartitioningError, _("Boot partition isn't located early enough on the disk. OpenFirmware wan't be able to boot this installation.")
+ raise PartitioningError, _("Boot partition isn't located early enough on the disk. OpenFirmware won't be able to boot this installation.")
elif ret != PARTITION_SUCCESS:
# more specific message?
raise PartitioningWarning, _("Boot partition %s may not meet booting constraints for your architecture. Creation of a boot disk is highly encouraged.") %(requests.getBootableRequest()[0].mountpoint,)
@@ -1420,8 +1420,10 @@ def getAutopartitionBoot():
elif (iutil.getPPCMachine() == "pSeries"):
return [ (None, "PPC PReP Boot", 4, None, 0, 1),
("/boot", None, 100, None, 0, 1) ]
- elif (iutil.getPPCMachine() == "iSeries"):
+ elif (iutil.getPPCMachine() == "iSeries") and not iutil.hasIbmSis():
return [ (None, "PPC PReP Boot", 4, None, 0, 1) ]
+ elif (iutil.getPPCMachine() == "iSeries") and iutil.hasIbmSis():
+ return []
else:
return [ ("/boot", None, 100, None, 0, 1) ]
diff --git a/harddrive.py b/harddrive.py
index a946b4594..92c3f8bb1 100644
--- a/harddrive.py
+++ b/harddrive.py
@@ -133,6 +133,8 @@ class HardDriveInstallMethod(InstallMethod):
# will mount the appropriate ISO image as required by CD # in header
def getRPMFilename(self, h, timer, callback=None):
if self.mediaIsMounted != h[1000002]:
+ log("switching from iso %s to %s" %(self.mediaIsMounted,
+ h[1000002]))
self.umountMedia()
self.mountMedia(h[1000002])
diff --git a/hdrlist.py b/hdrlist.py
index 6b7afba31..cb29c0c27 100644
--- a/hdrlist.py
+++ b/hdrlist.py
@@ -590,7 +590,7 @@ class Group:
# forInclude is whether this group is an include from a previous
# asMeta means that we should include the members of the group,
# but not this one (useful for Workstation Common, etc)
- def select(self, forInclude = 0, asMeta = 0):
+ def select(self, forInclude = 0, asMeta = 0, selectOptional = 0):
hdrlist = self.grpset.hdrlist
# if we're being selected as a meta group, then just select
@@ -616,7 +616,7 @@ class Group:
selected = []
for (pkgnevra, pkg) in self.packages.items():
# if it's not optional, we should turn it on
- if pkg["type"] == PKGTYPE_OPTIONAL:
+ if pkg["type"] == PKGTYPE_OPTIONAL and not selectOptional:
continue
pkg["state"] = ON
if pkg["meta"] == 0:
diff --git a/htmlbuffer.py b/htmlbuffer.py
index ae535543f..c027d739b 100644
--- a/htmlbuffer.py
+++ b/htmlbuffer.py
@@ -28,7 +28,8 @@ class HTMLBuffer(HTMLParser.HTMLParser):
entityRefMap = { 'copy': unichr(0xA9),
'lt': '<',
'gt': '>',
- 'quot': '"'}
+ 'quot': '"',
+ 'nbsp': ' '}
whiteSpaceNuker = re.compile(r"""\s+""", re.MULTILINE)
def __init__(self):
self.buffer = gtk.TextBuffer(None)
diff --git a/image.py b/image.py
index 4115ee3cc..881971bdd 100644
--- a/image.py
+++ b/image.py
@@ -39,8 +39,10 @@ class ImageInstallMethod(InstallMethod):
return self.tree + "/" + filename
def getRPMFilename(self, h, timer, callback=None):
+ if self.currentIso is not None and self.currentIso != h[1000002]:
+ log("switching from iso %s to %s" %(self.currentIso, h[1000002]))
+ self.currentIso = h[1000002]
return self.getFilename("/RedHat/RPMS/" + h[1000000], callback=callback)
-
def readHeaders(self):
if not os.access(self.tree + "/RedHat/base/hdlist", os.R_OK):
raise FileCopyException
@@ -66,6 +68,7 @@ class ImageInstallMethod(InstallMethod):
def __init__(self, tree, rootPath):
InstallMethod.__init__(self, rootPath)
self.tree = tree
+ self.currentIso = None
class CdromInstallMethod(ImageInstallMethod):
@@ -133,6 +136,7 @@ class CdromInstallMethod(ImageInstallMethod):
"on the current CD", h[1000000])
elif h[1000002] not in self.currentDisc:
timer.stop()
+ log("switching from iso %s to %s" %(self.currentDisc, h[1000002]))
if os.access("/mnt/source/.discinfo", os.R_OK):
f = open("/mnt/source/.discinfo")
@@ -419,6 +423,7 @@ class NfsIsoInstallMethod(NfsInstallMethod):
def getRPMFilename(self, h, timer, callback=None):
if self.imageMounted != h[1000002]:
+ log("switching from iso %s to %s" %(self.imageMounted, h[1000002]))
self.umountImage()
self.mountImage(h[1000002])
diff --git a/installclass.py b/installclass.py
index 8844a7dd3..a8ab8145b 100644
--- a/installclass.py
+++ b/installclass.py
@@ -153,7 +153,6 @@ class BaseInstallClass:
if iutil.getArch() != "i386":
dispatch.skipStep("bootdisk")
- dispatch.skipStep("bootloader")
# see if we need to write out a rescue boot floppy
if iutil.getArch() == "i386":
@@ -170,8 +169,7 @@ class BaseInstallClass:
if not floppyDevices:
dispatch.skipStep("bootdisk")
- if (iutil.getArch() == "alpha" or iutil.getArch() == "ia64" or
- iutil.getArch() == "sparc" or iutil.getArch() == "ppc"):
+ if iutil.getArch() != "i386" or iutil.getArch() != "x86_64":
dispatch.skipStep("bootloader")
# 'noupgrade' can be used on the command line to force not looking
diff --git a/installmethod.py b/installmethod.py
index 5a49abfaa..324950ef0 100644
--- a/installmethod.py
+++ b/installmethod.py
@@ -75,7 +75,8 @@ class InstallMethod:
break
if tmppath is None:
- raise RuntimeError, "Unable to find temp path"
+ log("Unable to find temp path, going to use ramfs path")
+ return "/tmp/"
return tmppath
diff --git a/iutil.py b/iutil.py
index c4d716115..73f895a83 100644
--- a/iutil.py
+++ b/iutil.py
@@ -481,6 +481,21 @@ def isUSBDevFSMounted():
return 0
+# this is disgusting and I feel very dirty
+def hasIbmSis():
+ if getArch() != "ppc":
+ return
+
+ f = open("/proc/modules", "r")
+ lines = f.readlines()
+ f.close()
+
+ for line in lines:
+ if line.startswith("ibmsis"):
+ return 1
+
+ return 0
+
# return the ppc machine variety type
def getPPCMachine():
machine = None
diff --git a/loader2/linuxrc.s390 b/loader2/linuxrc.s390
index 3e0b01891..d063e1d6a 100644
--- a/loader2/linuxrc.s390
+++ b/loader2/linuxrc.s390
@@ -120,10 +120,12 @@ if [ ":$NETTYPE" != ":iucv" ]; then # iucv is the only interface without chand
while [ -z "$CHANDEV" ]; do
echo $"Enter parameters you need to pass to the channel device layer."
echo $"This includes the I/O ports of your ctc, escon, qeth, hsi and lcs devices."
+ echo $"(e.g. \"ctc0,0x600,0x601\" will activate the ctc0 interface at I/O"
+ echo $"ports 0x600,0x601)"
+ echo $"Hipersocket interfaces need to be configured like qeth devices,"
+ echo $"p.e. qeth0,0x3000,0x3001,0x3002"
echo $"Additional parameters for QETH devices such as the portname"
echo $"should be entered at the next prompt, not here !"
- echo $"(e.g. \"ctc0,0x600,0x601\" will activate the ctc0 interface at I/O"
- echo $"ports 0x600,0x601):"
read CHANDEV
done
echo "$CHANDEV" |grep -q "qeth"
@@ -160,7 +162,7 @@ while [ -z "$NETWORK" ]; do
echo $"Enter the network address of the new Linux guest:"
read NETWORK
done
-if [ ":$NETTYPE" = ":eth" ] || [ ":$NETTYPE" = ":tr" ] || [ ":$NETTYPE" = ":hsi" ]; then
+if [ ":$NETTYPE" = ":eth" ] || [ ":$NETTYPE" = ":tr" ] || [ ":$NETTYPE" = ":hsi" ] || [ ":$NETTYPE" = ":lcs" ]; then
while [ -z "$NETMASK" ]; do
echo $"Enter the netmask for the new Linux guest (e.g. 255.255.255.0):"
read NETMASK
@@ -239,6 +241,7 @@ elif [ -n "$LCS" -o -n "$TR" ]; then
insmod lcs$LO
ifconfig $DEVICE $IPADDR $MMTU netmask $NETMASK broadcast $BROADCAST
route add -net $NETWORK netmask $NETMASK dev $DEVICE 2>/dev/null
+ echo "alias $DEVICE lcs" >> /tmp/modules.conf
elif [ -n "$QETH" -o -n "$HSI" ]; then
if [ "$DEVICE" = "eth0" -a "$HSI" = "on" ]; then
DEVICE="hsi0"
@@ -247,6 +250,7 @@ elif [ -n "$QETH" -o -n "$HSI" ]; then
insmod qeth$LO
ifconfig $DEVICE $IPADDR $MMTU netmask $NETMASK broadcast $BROADCAST
route add -net $NETWORK netmask $NETMASK dev $DEVICE 2>/dev/null
+ echo "alias $DEVICE qeth" >> /tmp/modules.conf
else
echo $"Unknown network device, aborting installation"
exit 1
@@ -358,7 +362,7 @@ export LD_LIBRARY_PATH PATH HOME PYTHONPATH
EOF
-if [ "$NETTYPE" = "ctc" ]; then
+if [ "$NETTYPE" = "ctc" -o "$NETTYPE" = "escon" -o "$NETTYPE" = "iucv" ]; then
echo "REMIP=$GATEWAY" >> /tmp/netinfo
echo "export REMIP=$GATEWAY" >> /etc/profile
fi
diff --git a/loader2/net.c b/loader2/net.c
index 49a3b0b61..57891ee6c 100644
--- a/loader2/net.c
+++ b/loader2/net.c
@@ -895,6 +895,10 @@ int kickstartNetworkUp(struct knownDevices * kd,
break;
} while (1);
+ /* we don't want to end up asking about interface more than once
+ * if we're in a kickstart-ish case (#100724) */
+ loaderData->netDev_set = 1;
+
/* JKFIXME: this is kind of crufty, we depend on the fact that the
* ip is set and then just get the network up. we should probably
* add a way to do asking about static here and not be such a hack */
diff --git a/network.py b/network.py
index b58c16702..dd9713a28 100644
--- a/network.py
+++ b/network.py
@@ -223,10 +223,11 @@ class Network:
if desc is not None and len(desc) > 0:
self.netdevices[device].set(("desc", desc))
+ # add hwaddr
hwaddr = isys.getMacAddress(device)
if hwaddr and hwaddr != "00:00:00:00:00:00":
self.netdevices[device].set(("hwaddr", hwaddr))
-
+
def getDevice(self, device):
return self.netdevices[device]
diff --git a/partedUtils.py b/partedUtils.py
index f5c20c1c7..670fa9a56 100644
--- a/partedUtils.py
+++ b/partedUtils.py
@@ -248,12 +248,46 @@ archLabels = {'i386': ['msdos'],
'ppc': ['msdos', 'mac'],
'x86_64': ['msdos']}
+# this is kind of crappy, but we don't really want to allow LDL formatted
+# dasd to be used during the install
+def checkDasdFmt(disk, intf):
+ if iutil.getArch() != "s390":
+ return 0
+
+ if disk.type.name != "dasd":
+ return 0
+
+ # FIXME: there has to be a better way to check LDL vs CDL
+ # how do I test ldl vs cdl?
+ if disk.max_primary_partition_count > 1:
+ return 0
+
+ if intf:
+ rc = intf.messageWindow(_("Warning"),
+ _("The /dev/%s device is LDL formatted instead of "
+ "CDL formatted. LDL formatted DASDs are not "
+ "supported for usage during an install of %s. "
+ "If you wish to use this disk for installation, "
+ "it must be re-initialized causing the loss of "
+ "ALL DATA on this drive.\n\n"
+ "Would you like to reformat this DASD using CDL "
+ "format?")
+ %(disk.dev.path[5:], productName), type = "yesno")
+ if rc == 0:
+ return 1
+ else:
+ return -1
+ else:
+ return 1
+
+
def checkDiskLabel(disk, intf):
"""Check that the disk label on disk is valid for this machine type."""
arch = iutil.getArch()
if arch in archLabels.keys():
if disk.type.name in archLabels[arch]:
- return 0
+ # this is kind of a hack since we don't want LDL to be used
+ return checkDasdFmt(disk, intf)
else:
if disk.type.name == "msdos":
return 0
diff --git a/partitions.py b/partitions.py
index a2cbb9b3d..eb62c4509 100644
--- a/partitions.py
+++ b/partitions.py
@@ -828,6 +828,9 @@ class Partitions:
if req.fstype == fsset.fileSystemTypeGet("PPC PReP Boot"):
found = 1
break
+ if iutil.getPPCMachine() == "iSeries" and iutil.hasIbmSis():
+ found = 1
+
if not found:
errors.append(_("You must create a PPC PReP Boot partition."))
diff --git a/scripts/mk-images.ia64 b/scripts/mk-images.ia64
index 7ba193f59..2adab0449 100644
--- a/scripts/mk-images.ia64
+++ b/scripts/mk-images.ia64
@@ -1,5 +1,6 @@
# LATEUSBMODS go in the second stage
-USBMODS="usb-uhci usb-ohci hid keybdev"
+# FIXME: bleah, have to include sd_mod for usb-storage
+USBMODS="usb-uhci usb-ohci hid keybdev usb-storage sd_mod"
LATEUSBMODS="mousedev"
BTERMMODULES="vga16fb"
diff --git a/scripts/pkgorder b/scripts/pkgorder
index 711c8dced..348aa7afc 100755
--- a/scripts/pkgorder
+++ b/scripts/pkgorder
@@ -232,7 +232,7 @@ for id in complist:
group = grpset.groups[id]
list = []
- group.select()
+ group.select(selectOptional = 1)
# append what got turned on to our order.
for p in hdlist.pkgs.values():