Updated: [rhinstaller/blivet/pulls/28] Port blivet to libblockdev
by dashea
Replace majority of functions from blivet/devicelibs/ with calls to the *libblockdev* library. Also remove tests for such replaced functions and Requires: for tools we no longer directly need and replace calls to pyblock and volume_key-python with calls to libblockdev so that we can drop these dependencies.
``tests/pylint/runpylint.sh`` and ``make test`` are both okay with these changes.
--
To view this pull request on github, visit https://github.com/rhinstaller/blivet/pull/28
9 years, 2 months
[blivet] Two amendments for libblockdev MD RAID port
by Vratislav Podzimek
Vratislav Podzimek (2):
Adapt better to libblockdev's md_examine data
Do not restrict MDRaidArrayDevice's memberDevices to type int
blivet/devices/md.py | 5 +++--
blivet/devicetree.py | 46 +++++++++++++++++++++++-----------------------
2 files changed, 26 insertions(+), 25 deletions(-)
--
2.1.0
9 years, 2 months
[PATCH/RHEL6-Branch] RHEL 6.6 Upgrade Fails from AttributeError on Multipath (#1129499)
by Robert Marshall
Users reported an unhandled AttributeError NoneType while upgrading
from RHEL6.5 to RHEL6.6. Added a guard against the dev not existing
when looked up by name. NOTE: in both cases the fail was due to the
multipath device not being found - this will skip it but based on
comments on the code it should be ignored anyway and this guard
will ensure it doesn't crash the installer.
Resolves rhbz#1129499
---
booty/x86.py | 19 ++++++++++++-------
1 file changed, 12 insertions(+), 7 deletions(-)
diff --git a/booty/x86.py b/booty/x86.py
index 90540c5..8fbabf3 100644
--- a/booty/x86.py
+++ b/booty/x86.py
@@ -48,14 +48,19 @@ class x86BootloaderInfo(efiBootloaderInfo):
# physical disks ("hda"), and real partitions on physical disks
# ("hda1"). Anything else gets ignored.
dev = self.storage.devicetree.getDeviceByName(device)
- if dev.type == "mdarray":
- if dev.level != 1:
- log.error("x86BootloaderInfo.getPhysicalDevices ignoring non "
- "level 1 raid array %s" % dev.name)
- return []
- devs = dev.parents
- else:
+ if (dev):
devs = [ dev ]
+ # the above is what we normally want, but if it's mdarray then let's
+ # do something different
+ if (hasattr(dev, 'type')):
+ if dev.type == "mdarray":
+ if dev.level != 1:
+ log.error("x86BootloaderInfo.getPhysicalDevices ignoring non "
+ "level 1 raid array %s" % dev.name)
+ return []
+ devs = dev.parents
+ else:
+ devs = []
physicalDevices = []
for dev in devs:
--
1.8.3.1
9 years, 2 months
[PATCH] Fix pykickstart requirement.
by Chris Lumens
For now anaconda's still python2 based, so require the python2 version. Change
this later.
---
anaconda.spec.in | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/anaconda.spec.in b/anaconda.spec.in
index 7ec87de..e92ec29 100644
--- a/anaconda.spec.in
+++ b/anaconda.spec.in
@@ -21,7 +21,7 @@ Source0: %{name}-%{version}.tar.bz2
# Also update in AM_GNU_GETTEXT_VERSION in configure.ac
%define gettextver 0.18.3
%define intltoolver 0.31.2-3
-%define pykickstartver 1.99.66
+%define pykickstartver 2.0
%define yumver 3.4.3-91
%define dnfver 0.4.18
%define partedver 1.8.1
@@ -55,7 +55,7 @@ BuildRequires: intltool >= %{intltoolver}
BuildRequires: libgnomekbd-devel
BuildRequires: libxklavier-devel >= %{libxklavierver}
BuildRequires: pango-devel
-BuildRequires: pykickstart >= %{pykickstartver}
+BuildRequires: python-kickstart >= %{pykickstartver}
%if ! 0%{?rhel}
BuildRequires: python-bugzilla
%endif
@@ -92,7 +92,7 @@ Requires: parted >= %{partedver}
Requires: pyparted >= %{pypartedver}
Requires: yum >= %{yumver}
Requires: python-requests
-Requires: pykickstart >= %{pykickstartver}
+Requires: python-kickstart >= %{pykickstartver}
Requires: langtable-data >= %{langtablever}
Requires: langtable-python >= %{langtablever}
Requires: libuser-python
@@ -209,7 +209,7 @@ Summary: The anaconda dracut module
Requires: dracut >= %{dracutver}
Requires: dracut-network
Requires: xz
-Requires: pykickstart
+Requires: python-kickstart
%description dracut
The 'anaconda' dracut module handles installer-specific boot tasks and
--
2.2.2
9 years, 2 months
[anaconda][master] Make sure we always use "utf-8" as the default encoding (#1169019)
by Vratislav Podzimek
Our sitecustomize.py script doesn't work with live installations causing
various wierd issues with unicode objects and plain strings (in Python 2). This
way we can make sure we always use "utf-8" as the default encoding.
Signed-off-by: Vratislav Podzimek <vpodzime(a)redhat.com>
---
anaconda | 7 +++++++
pyanaconda/sitecustomize.py | 23 -----------------------
2 files changed, 7 insertions(+), 23 deletions(-)
delete mode 100644 pyanaconda/sitecustomize.py
diff --git a/anaconda b/anaconda
index 88091ab..623aef5 100755
--- a/anaconda
+++ b/anaconda
@@ -755,6 +755,13 @@ def cleanPStore():
dir_tree_map("/sys/fs/pstore", os.unlink, files=True, dirs=False)
if __name__ == "__main__":
+ # Force the "utf-8" encoding as the default (no idea why python doesn't have
+ # it as a default in 2015). The setdefaultencoding() function is removed
+ # from the sys module's namespace after site scripts are run so we need to
+ # reload the sys module.
+ reload(sys)
+ sys.setdefaultencoding('utf-8')
+
# check if the CLI help is requested and return it at once,
# without importing random stuff and spamming stdout
if ("--help" in sys.argv) or ("-h" in sys.argv) or ("--version" in sys.argv):
diff --git a/pyanaconda/sitecustomize.py b/pyanaconda/sitecustomize.py
deleted file mode 100644
index a5e1a29..0000000
--- a/pyanaconda/sitecustomize.py
+++ /dev/null
@@ -1,23 +0,0 @@
-#
-# sitecustomize.py: The python site init code for the Red Hat Installer
-#
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
-# Red Hat, Inc. All rights reserved.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-
-import sys
-# pylint: disable=no-member
-sys.setdefaultencoding('utf-8')
--
2.1.0
9 years, 2 months