[PATCH] Check host filesystem space for dirinstall
by Brian C. Lane
This fixes using --dirinstall in GUI mode. The space check was failing
since storage is totally skipped and nothing is mounted. This adds a
check class that will check the host system's filesystem size instead.
---
pyanaconda/ui/gui/hubs/summary.py | 8 ++++++--
pyanaconda/ui/lib/space.py | 34 +++++++++++++++++++++++++++++++++-
2 files changed, 39 insertions(+), 3 deletions(-)
diff --git a/pyanaconda/ui/gui/hubs/summary.py b/pyanaconda/ui/gui/hubs/summary.py
index fe7eeb1..2615377 100644
--- a/pyanaconda/ui/gui/hubs/summary.py
+++ b/pyanaconda/ui/gui/hubs/summary.py
@@ -20,7 +20,8 @@
#
from pyanaconda.ui.gui.hubs import Hub
-from pyanaconda.ui.lib.space import FileSystemSpaceChecker
+from pyanaconda.ui.lib.space import FileSystemSpaceChecker, DirInstallSpaceChecker
+from pyanaconda.flags import flags
__all__ = ["SummaryHub"]
@@ -53,7 +54,10 @@ class SummaryHub(Hub):
"""
super(SummaryHub, self).__init__(data, storage, payload, instclass)
- self._checker = FileSystemSpaceChecker(storage, payload)
+ if not flags.dirInstall:
+ self._checker = FileSystemSpaceChecker(storage, payload)
+ else:
+ self._checker = DirInstallSpaceChecker(storage, payload)
@property
def continueButton(self):
diff --git a/pyanaconda/ui/lib/space.py b/pyanaconda/ui/lib/space.py
index 8583eff..4a804ae 100644
--- a/pyanaconda/ui/lib/space.py
+++ b/pyanaconda/ui/lib/space.py
@@ -18,8 +18,9 @@
#
# Red Hat Author(s): David Lehman <dlehman(a)redhat.com>
#
-
+import os
from blivet.size import Size
+from pyanaconda import iutil
from pyanaconda.i18n import _, N_
@@ -80,3 +81,34 @@ class FileSystemSpaceChecker(object):
self.error_message = _(self.error_template) % self.deficit
return self.success
+
+class DirInstallSpaceChecker(FileSystemSpaceChecker):
+ """Use the amount of space available at ROOT_PATH to calculate free space.
+
+ This is used for the --dirinstall option where no storage is mounted and it
+ is using space from the host's filesystem.
+ """
+ def check(self):
+ """Check configured storage against software selections. When this
+ method is complete (which should be pretty quickly), the following
+ attributes are available for inspection:
+
+ success -- A simple boolean defining whether there's enough
+ space or not.
+ deficit -- If unsuccessful, how much space the system is
+ short for current software selections (in MB).
+ error_message -- If unsuccessful, an error message describing the
+ situation. This message is suitable for putting
+ in the info bar at the bottom of a Hub.
+ """
+ self.reset()
+ stat = os.statvfs(iutil.getSysroot())
+ free = Size(stat.f_bsize * stat.f_bfree)
+ needed = self.payload.spaceRequired
+ log.info("fs space: %s needed: %s", free, needed)
+ self.success = (free >= needed)
+ if not self.success:
+ self.deficit = needed - free
+ self.error_message = _(self.error_template) % self.deficit
+
+ return self.success
--
1.9.3
9 years, 10 months
[blivet:master 0/7] #1090009 related patches (v2)
by Anne Mulhern
The first four are unchanged from previou version.
The fifth "Rename devicetree_test file" is gone.
The last three have changed slightly.
Remove preferLeaves ... revised commit message.
Add a flag...better name for flag and revised commit message.
When adding an md array ... set incomplete option in more places.
mulhern (7):
Move down or remove assignment to device in add* methods.
Remove unused 'slaves' variable.
Omit special check for md devices in addUdevDevice().
Factor out commonalities among getDevice[s|]By* methods.
Remove preferLeaves parameter from getDeviceByPath()
Add a flag to control whether a degraded md raid array is used
(#1090009)
When adding an md array, allow adding incomplete arrays (#1090009)
blivet/devicetree.py | 338 ++++++++++++++++++++-------------------------------
blivet/flags.py | 2 +
2 files changed, 136 insertions(+), 204 deletions(-)
--
1.9.3
9 years, 10 months
[rhel6-branch] Fix a typo in the list of drivers removed from ppc images. (#1098486)
by Samantha N. Bueno
Hopefully fixing this will ensure it gets removed and that the ppc64.img
size is contained within its stupid 32MB confines.
Resolves: rhbz#1098486
---
scripts/mk-images | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/mk-images b/scripts/mk-images
index 81e2ef4..c648e63 100755
--- a/scripts/mk-images
+++ b/scripts/mk-images
@@ -390,7 +390,7 @@ EOF
rm -f $MMB_DIR/lib/modules/$KDIR/kernel/drivers/scsi/scsi_debug.ko
rm -rf $MMB_DIR/lib/modules/$KDIR/kernel/drivers/gpu/drm/nouveau
rm -rf $MMB_DIR/lib/modules/$KDIR/kernel/drivers/gpu/drm/radeon
- rm -rf $MMB_DIR/lib/modules/$KDIR/kernel/drivers/gpu/drm/drm
+ rm -rf $MMB_DIR/lib/modules/$KDIR/kernel/drivers/gpu/drm/drm.ko
fi
# clean up leftover cruft
--
1.8.3.1
9 years, 10 months
[rhel6] Add shared-mime-info to the instroot (#1110834)
by David Shea
This is needed for the gdk-pixbuf loaders to actually work.
---
scripts/upd-instroot | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/upd-instroot b/scripts/upd-instroot
index 9aa49a6..6bd184a 100755
--- a/scripts/upd-instroot
+++ b/scripts/upd-instroot
@@ -194,7 +194,7 @@ PACKAGES="GConf2 NetworkManager NetworkManager-gnome ORBit2 acl anaconda
reiserfs-utils libreport libreport-cli libreport-python libreport-gtk libreport-newt
libreport-plugin-rhtsupport libreport-plugin-logger libreport-plugin-bugzilla
rpm rpm-libs rpm-python rsyslog sed selinux-policy-targeted
- setup sg3_utils sg3_utils-libs slang smc-meera-fonts specspo sqlite startup-notification
+ setup sg3_utils sg3_utils-libs shared-mime-info slang smc-meera-fonts specspo sqlite startup-notification
subscription-manager synaptics system-config-date
system-config-keyboard ${brandpkgname}-logos ${brandpkgname}-release
sysvinit-tools tcp_wrappers tcp_wrappers-libs telnet
--
2.0.0
9 years, 10 months
[anaconda][master][PATCH] Remove the noipv6 Anaconda option
by Martin Kolman
So it looks like noipv6 option is yet another option that Anaconda parses
but doesn't do anything with. The functionality that has been handled by
this option in the past seems to have moved to kernel (which uses the same
keyword) and we just check for "noipv6" being present on the boot command
line to apply our IPv6 tweaks.
Signed-off-by: Martin Kolman <mkolman(a)redhat.com>
---
anaconda | 1 -
1 file changed, 1 deletion(-)
diff --git a/anaconda b/anaconda
index cbbedd6..d1602cb 100755
--- a/anaconda
+++ b/anaconda
@@ -269,7 +269,6 @@ def parseArguments(argv=None, boot_cmdline=None):
ap.add_argument("-S", "--script", dest="display_mode", action="store_const", const="s")
# Network
- ap.add_argument("--noipv6", action="store_true", default=False)
ap.add_argument("--proxy")
# Method of operation
--
1.9.3
9 years, 10 months
[anaconda][master][PATCH] Remove the -s/--script Anaconda option
by Martin Kolman
Seems to be dead.
Signed-off-by: Martin Kolman <mkolman(a)redhat.com>
---
anaconda | 1 -
1 file changed, 1 deletion(-)
diff --git a/anaconda b/anaconda
index cbbedd6..6627ed4 100755
--- a/anaconda
+++ b/anaconda
@@ -266,7 +266,6 @@ def parseArguments(argv=None, boot_cmdline=None):
default="g")
ap.add_argument("-G", "--graphical", dest="display_mode", action="store_const", const="g")
ap.add_argument("-T", "--text", dest="display_mode", action="store_const", const="t")
- ap.add_argument("-S", "--script", dest="display_mode", action="store_const", const="s")
# Network
ap.add_argument("--noipv6", action="store_true", default=False)
--
1.9.3
9 years, 10 months
[anaconda:master] Make rescue_mode part of flags, hence more publicly available (#1090009)
by Anne Mulhern
Related: rhbz#1090009
In particular, blivet can make use of it when updating from anaconda
flags.
Signed-off-by: mulhern <amulhern(a)redhat.com>
---
anaconda | 8 ++++----
pyanaconda/anaconda.py | 1 -
pyanaconda/flags.py | 1 +
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/anaconda b/anaconda
index cbbedd6..3782395 100755
--- a/anaconda
+++ b/anaconda
@@ -523,7 +523,7 @@ def setupDisplay(anaconda, options, addons=None):
anaconda.xdriver = options.xdriver
anaconda.writeXdriver(root="/")
- if anaconda.rescue:
+ if flags.rescue_mode:
return
if anaconda.ksdata.vnc.enabled:
@@ -957,7 +957,7 @@ if __name__ == "__main__":
if ksdata.bootloader.extlinux:
flags.extlinux = True
if ksdata.rescue.rescue:
- anaconda.rescue = True
+ flags.rescue_mode = True
# Some kickstart commands must be executed immediately, as they affect
# how anaconda operates.
@@ -1103,7 +1103,7 @@ if __name__ == "__main__":
else:
anaconda.ksdata.displaymode.displayMode = DISPLAY_MODE_TEXT
- if anaconda.rescue:
+ if flags.rescue_mode:
from pyanaconda import rescue
anaconda.intf = rescue.RescueInterface()
@@ -1142,7 +1142,7 @@ if __name__ == "__main__":
from pyanaconda.network import networkInitialize, wait_for_connecting_NM_thread
from pyanaconda.timezone import time_initialize
- if anaconda.rescue:
+ if flags.rescue_mode:
rescue.doRescue(anaconda.intf, anaconda.rescue_mount, ksdata)
else:
cleanPStore()
diff --git a/pyanaconda/anaconda.py b/pyanaconda/anaconda.py
index 0e42aec..210f20a 100644
--- a/pyanaconda/anaconda.py
+++ b/pyanaconda/anaconda.py
@@ -63,7 +63,6 @@ class Anaconda(object):
self.proxyUsername = None
self.proxyPassword = None
self.reIPLMessage = None
- self.rescue = False
self.rescue_mount = True
self.rootParts = None
diff --git a/pyanaconda/flags.py b/pyanaconda/flags.py
index 20e3255..b7cda14 100644
--- a/pyanaconda/flags.py
+++ b/pyanaconda/flags.py
@@ -68,6 +68,7 @@ class Flags(object):
self.mpathFriendlyNames = True
# ksprompt is whether or not to prompt for missing ksdata
self.ksprompt = True
+ self.rescue_mode = True
# parse the boot commandline
self.cmdline = BootArgs()
# Lock it down: no more creating new flags!
--
1.9.3
9 years, 10 months
[rhel6-branch] Change pixbuf loaders path. (#1110834)
by Samantha N. Bueno
Apparently made necessary by the gtk rebase.
Patch by Marek Kasik <mkasik(a)redhat.com>
---
scripts/upd-instroot | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/scripts/upd-instroot b/scripts/upd-instroot
index e7ff419..9aa49a6 100755
--- a/scripts/upd-instroot
+++ b/scripts/upd-instroot
@@ -168,7 +168,7 @@ PACKAGES="GConf2 NetworkManager NetworkManager-gnome ORBit2 acl anaconda
elfutils-libelf expat fcoe-utils fipscheck fipscheck-lib
firstboot fontconfig freetype gail gawk gdb-gdbserver
gdk-pixbuf gfs2-utils glib2 glibc-common gnome-python2-canvas gnome-python2-gconf
- gnome-themes gpm grep gtk2 gtk2-engines hal
+ gdk-pixbuf2 gnome-themes gpm grep gtk2 gtk2-engines hal
hdparm hwdata initscripts iproute iputils iscsi-initiator-utils
jfsutils kbd kpartx keyutils-libs krb5-libs libICE libSM libX11 libXau
libXaw libXcursor libXdmcp libXevie libXext libXfixes libXfont libXft
@@ -504,10 +504,8 @@ usr/$LIBDIR/gconv
usr/$LIBDIR/gdk-pixbuf/loaders/*la*
usr/$LIBDIR/gdk-pixbuf/loaders/*png*
usr/$LIBDIR/gdk-pixbuf/loaders/*xpm*
+usr/$LIBDIR/gdk-pixbuf-2.0/*/loaders/*xpm*
usr/$LIBDIR/gtk-2.0/*/engines/libclearlooks.so
-usr/$LIBDIR/gtk-2.0/*/loaders/*la*
-usr/$LIBDIR/gtk-2.0/*/loaders/*png*
-usr/$LIBDIR/gtk-2.0/*/loaders/*xpm*
usr/$LIBDIR/gtk-2.0/immodules
usr/$LIBDIR/kernel-wrapper/*
usr/$LIBDIR/hal
--
1.8.3.1
9 years, 10 months