[rhel5-branch][PATCH] Fix issue where arch detected incorrectly. (#908959)
by Samantha N. Bueno
Incorrect arch values were causing yum to not find certain
required packages.
---
yuminstall.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/yuminstall.py b/yuminstall.py
index 456afe5..979a3ff 100644
--- a/yuminstall.py
+++ b/yuminstall.py
@@ -1265,7 +1265,7 @@ class YumBackend(AnacondaBackend):
def selectAnacondaNeeds(self):
for pkg in ['authconfig', 'chkconfig', 'mkinitrd', 'rhpl',
'system-config-securitylevel-tui']:
- self.selectPackage("%s.%s" % (pkg, rpmUtils.arch.canonArch))
+ self.selectPackage("%s.%s" % (pkg, rpmUtils.arch.getBaseArch()))
def doPostSelection(self, anaconda):
# Only solve dependencies on the way through the installer, not the way back.
--
1.7.11.7
10 years, 12 months
[PATCH] Add missing disk_selection XML (#962012,#962631)
by Brian C. Lane
From: "Brian C. Lane" <bcl(a)redhat.com>
---
pyanaconda/ui/gui/spokes/lib/cart.glade | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/pyanaconda/ui/gui/spokes/lib/cart.glade b/pyanaconda/ui/gui/spokes/lib/cart.glade
index 2bf866e..dfde372 100644
--- a/pyanaconda/ui/gui/spokes/lib/cart.glade
+++ b/pyanaconda/ui/gui/spokes/lib/cart.glade
@@ -97,6 +97,11 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="model">disk_store</property>
+ <child internal-child="selection">
+ <object class="GtkTreeSelection" id="disk_selection">
+ <signal name="changed" handler="on_selection_changed" swapped="no"/>
+ </object>
+ </child>
<child>
<object class="GtkTreeViewColumn" id="boot_column">
<property name="title" translatable="yes">Boot</property>
--
1.8.1.4
10 years, 12 months
Text UI amendments
by Samantha N. Bueno
The first patch is fairly self-explanatory and just adds 'software' to
the spoke category list in the summary hub, since there is soon to be a
software spoke.
The second patch is a pretty rudimentary method of blocking users from
entering a spoke if its "ready" status returns False, and simply
refreshes the screen. Since each spoke handles what to check in order to
determine readiness, this seemed to me the simplest way to determining
whether to block access to a spoke.
This patch also adds an ability to refresh the sumary hub (pressing r).
Threads mean spoke status messages will change. Since we can't update
the screen dynamically, this is the next best way to reflect updates in
status messages.
The third and fourth patches add the ability to select software and
specify an installation source repo, respectively. Right now, users can
only select what DE to install (almost through adding ability to select
addons though.
10 years, 12 months
[rhel5-branch][PATCH] Store and write out 'noauto' fstab lines (#873644)
by Vratislav Podzimek
These lines should be ignored by the installer when mounting, but should be
preserved on upgrades. And since they are no mounted automatically, there's no
need to comment them out.
Signed-off-by: Vratislav Podzimek <vpodzime(a)redhat.com>
---
fsset.py | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/fsset.py b/fsset.py
index 48715c0..3d25416 100644
--- a/fsset.py
+++ b/fsset.py
@@ -1317,6 +1317,7 @@ class FileSystemSet:
self.volumesCreated = 0
self.anaconda = anaconda
self.unknownFSlines = list()
+ self.noautoLines = list()
def isActive(self):
return self.mountcount != 0
@@ -1432,7 +1433,10 @@ class FileSystemSet:
new = FileSystemSet(self.anaconda)
for entry in self.entries:
new.add (entry)
+
+ new.noautoLines = self.noautoLines[:]
new.unknownFSlines = self.unknownFSlines[:]
+
return new
def extend (self, fsset):
@@ -1445,6 +1449,7 @@ class FileSystemSet:
for entry in fsset.entries:
self.add(entry)
+ self.noautoLines.extend(fsset.noautoLines)
self.unknownFSlines.extend(fsset.unknownFSlines)
def fstab (self):
@@ -1475,6 +1480,10 @@ class FileSystemSet:
options, entry.fsck,
entry.order)
+ # append the lines with 'noauto' option (should not cause any harm during boot)
+ for line in self.noautoLines:
+ fstab += line
+
# append commented out lines with unknown (not supported) filesystems
for line in self.unknownFSlines:
fstab += "#" + line
@@ -2971,7 +2980,10 @@ def readFstab (anaconda):
fields.append(0)
elif len(fields) > 6:
continue
- if string.find(fields[3], "noauto") != -1: continue
+
+ if string.find(fields[3], "noauto") != -1:
+ fsset.noautoLines.append(line)
+ continue
# shenanigans to handle ext3,ext2 format in fstab
fstotry = fields[2]
--
1.7.11.7
10 years, 12 months
[rhel5-branch][PATCH] Just log warning if cannot show it (#767260)
by Vratislav Podzimek
If the anaconda instance is not passed to the DiskSet and it thus have no
interface available to show a warning with, just log the warning and continue
instead of raising an expcetion.
Signed-off-by: Vratislav Podzimek <vpodzime(a)redhat.com>
---
partedUtils.py | 37 +++++++++++++++++++++----------------
1 file changed, 21 insertions(+), 16 deletions(-)
diff --git a/partedUtils.py b/partedUtils.py
index be66426..1d81803 100644
--- a/partedUtils.py
+++ b/partedUtils.py
@@ -1330,22 +1330,27 @@ class DiskSet:
# check for more than 15 partitions (libata limit)
if drive.startswith('sd') and disk.get_last_partition_num() > 15:
- rc = intf.messageWindow(_("Warning"),
- _("The drive /dev/%s has more than 15 "
- "partitions on it. The SCSI "
- "subsystem in the Linux kernel does "
- "not allow for more than 15 partitons "
- "at this time. You will not be able "
- "to make changes to the partitioning "
- "of this disk or use any partitions "
- "beyond /dev/%s15 in %s")
- % (drive, drive, productName),
- type="custom",
- custom_buttons = [_("_Reboot"),
- _("_Continue")],
- custom_icon="warning")
- if rc == 0:
- sys.exit(0)
+ msg = _("The drive /dev/%s has more than 15 "
+ "partitions on it. The SCSI "
+ "subsystem in the Linux kernel does "
+ "not allow for more than 15 partitons "
+ "at this time. You will not be able "
+ "to make changes to the partitioning "
+ "of this disk or use any partitions "
+ "beyond /dev/%s15 in %s") % (drive, drive, productName)
+
+ if intf:
+ rc = intf.messageWindow(_("Warning"), msg,
+ type="custom",
+ custom_buttons = [_("_Reboot"),
+ _("_Continue")],
+ custom_icon="warning")
+ if rc == 0:
+ sys.exit(0)
+ else:
+ # no interface instance to show warning with, just log it
+ # and continue
+ log.warning(msg)
# check that their partition table is valid for their architecture
ret = checkDiskLabel(disk, intf)
--
1.7.11.7
10 years, 12 months
[RHEL5] Skip disk label check for autopart all (#758881)
by Brian C. Lane
From: "Brian C. Lane" <bcl(a)redhat.com>
When autopart all is selected and all partitions have been removed from
a disk go ahead and apply the correct disk label. This fixed the problem
of trying to autopart all on a gpt disk in a non-EFI system. Also add a
few more lines to the logfile when relabeling the disk.
---
autopart.py | 12 ++++++++++--
partedUtils.py | 23 ++++++++++++++---------
partitions.py | 2 +-
3 files changed, 25 insertions(+), 12 deletions(-)
diff --git a/autopart.py b/autopart.py
index b23f716..ff46eb1 100644
--- a/autopart.py
+++ b/autopart.py
@@ -24,6 +24,7 @@ from anaconda_log import logger, logFile
import cryptodev
from partitioning import *
import partedUtils
+from partedUtils import needGPTLabel, getDefaultDiskType
import partRequests
from constants import *
from partErrors import *
@@ -1203,8 +1204,15 @@ def doClearPartAction(anaconda, partitions, diskset):
partitions.removeRequest(old)
partitions.addDelete(delete)
deletePart(diskset, delete)
- continue
-
+
+ if linuxOnly == 0 and disk.get_primary_partition_count() == 0:
+ # The disk is empty and we are clearing all partitions, so relabel it
+ dev = disk.dev
+ label = needGPTLabel(dev, getDefaultDiskType())
+ log.info("Disk %s is empty, creating new %s disklabel on it" % (drive, label.name))
+ new_disk = dev.disk_new_fresh(label)
+ diskset.disks[drive] = new_disk
+
def doAutoPartition(anaconda):
instClass = anaconda.id.instClass
diskset = anaconda.id.diskset
diff --git a/partedUtils.py b/partedUtils.py
index be66426..faef371 100644
--- a/partedUtils.py
+++ b/partedUtils.py
@@ -279,23 +279,27 @@ archLabels = {'i386': ['msdos', 'gpt'],
'ppc': ['msdos', 'mac', 'amiga', 'gpt'],
'x86_64': ['msdos', 'gpt']}
+def needGPTLabel(dev, label):
+ """ Return gpt label if disk is msdos and size is > 2GiB"""
+ if label.name == 'msdos' and \
+ dev.length > (2L**41) / dev.sector_size and \
+ 'gpt' in archLabels[rhpl.getArch()]:
+ label = parted.disk_type_get('gpt')
+ return label
+
def labelDisk(deviceFile, forceLabelType=None):
dev = parted.PedDevice.get(deviceFile)
- label = getDefaultDiskType()
if not forceLabelType is None:
label = forceLabelType
else:
- if label.name == 'msdos' and \
- dev.length > (2L**41) / dev.sector_size and \
- 'gpt' in archLabels[rhpl.getArch()]:
- label = parted.disk_type_get('gpt')
+ label = needGPTLabel(dev, getDefaultDiskType())
# remove metadata from partitions
try:
disk = parted.PedDisk.new(dev)
except parted.error, msg:
- log.debug("parted error: %s" % (msg,))
+ log.debug("labelDisk parted error: %s" % (msg,))
else:
part = disk.next_partition()
while part:
@@ -308,6 +312,7 @@ def labelDisk(deviceFile, forceLabelType=None):
lvm.pvremove("/dev/%s" % (device,))
part = disk.next_partition(part)
+ log.info("Creating new %s disklabel on %s" % (label.name, deviceFile))
disk = dev.disk_new_fresh(label)
disk.commit()
return disk
@@ -1202,6 +1207,7 @@ class DiskSet:
log.info("Reinitializing label for drive %s" % (drive,))
deviceFile = isys.makeDevInode(drive, "/dev/" + drive)
+ dev = parted.PedDevice.get(deviceFile)
try:
try:
@@ -1211,12 +1217,11 @@ class DiskSet:
if self.dasdFmt(drive):
raise LabelError, drive
- dev = parted.PedDevice.get(deviceFile)
disk = parted.PedDisk.new(dev)
else:
disk = labelDisk(deviceFile)
except parted.error, msg:
- log.debug("parted error: %s" % (msg,))
+ log.debug("_labelDevice parted error: %s" % (msg,))
raise
except:
self._removeDisk(drive)
@@ -1298,7 +1303,7 @@ class DiskSet:
dev = parted.PedDevice.get(deviceFile)
disk = None
except parted.error, msg:
- log.debug("parted error: %s" % (msg,))
+ log.debug("openDevices parted error: %s" % (msg,))
self._removeDisk(drive, disk)
continue
diff --git a/partitions.py b/partitions.py
index 208a8d5..f6eb32d 100644
--- a/partitions.py
+++ b/partitions.py
@@ -1066,7 +1066,7 @@ class Partitions:
if not ok:
errors.append(_("You must create a /boot/efi partition of "
"type FAT and a size of 50 megabytes."))
- else:
+ elif self.autoClearPartType != CLEARPART_TYPE_ALL:
# mactel checks
bootreqs = self.getBootableRequest() or []
for br in getBaseReqs(bootreqs):
--
1.8.1.4
10 years, 12 months
[rhel5-branch] Changes for translations
by Vratislav Podzimek
Nothing to be reviewed in the changes, but I'm not sure if the steps I did to
resolve this were correct. First I regenerated the anaconda.pot file on running
RHEL 5.9 (because it takes timezones from the system) by running
'pushd po; make anaconda.pot; popd' then I patched the ru.po file with the
translations.
I've tested the changes with a scratch build and it seems to work and not break
anything. However, it fixes the issue only for the Russian language, all the
other languages are missing some translations and thus a wrong string taken (see
bug #907574 for more info). I have no idea how the translations on the
rhel5-branch are maintained.
Vratislav Podzimek (1):
Generate new anaconda.pot file (#907574)
po/anaconda.pot | 1923 +++++++++++++++++++++++++++++--------------------------
po/ru.po | 22 +
2 files changed, 1046 insertions(+), 899 deletions(-)
--
1.7.11.7
10 years, 12 months
[PATCH] Fix issue where FS selection not applied in text UI. (#964069)
by Samantha N. Bueno
---
pyanaconda/ui/tui/spokes/storage.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pyanaconda/ui/tui/spokes/storage.py b/pyanaconda/ui/tui/spokes/storage.py
index c7bf1c8..3f815ca 100644
--- a/pyanaconda/ui/tui/spokes/storage.py
+++ b/pyanaconda/ui/tui/spokes/storage.py
@@ -412,7 +412,7 @@ class PartitionSchemeSpoke(NormalTUISpoke):
def apply(self):
""" Apply our selections. """
- schemelist = self.partschemes.keys()
+ schemelist = self.partschemes.values()
try:
self.data.autopart.type = schemelist[self._selection - 1]
except IndexError:
--
1.7.11.7
11 years
[master] Keyboard related patches
by Vratislav Podzimek
Three patches for layouts handling.
Vratislav Podzimek (3):
Return all layouts the XklWrapper knows about (#883555)
Be more defensive in handling layouts from kickstart (#963103)
Only try to activate layouts if runtime system can be changed
pyanaconda/keyboard.py | 22 +++++++++++++++++-----
pyanaconda/ui/gui/spokes/keyboard.py | 26 ++++++++++++++++++++++----
2 files changed, 39 insertions(+), 9 deletions(-)
--
1.7.11.7
11 years