[blivet:master] Disable some pylint warnings that arise due to anaconda versions.
by Anne Mulhern
Signed-off-by: mulhern <amulhern(a)redhat.com>
---
blivet/__init__.py | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/blivet/__init__.py b/blivet/__init__.py
index ca61ae8..ff4f7fd 100644
--- a/blivet/__init__.py
+++ b/blivet/__init__.py
@@ -122,11 +122,12 @@ def enable_installer_mode():
from pyanaconda.errors import ERROR_RAISE # pylint: disable=redefined-outer-name
if hasattr(iutil, 'getTargetPhysicalRoot'):
- # Introduced in newer Anaconda
- _storageRoot = iutil.getTargetPhysicalRoot()
+ # For anaconda versions > 21.43
+ _storageRoot = iutil.getTargetPhysicalRoot() # pylint: disable=no-name-in-module
_sysroot = iutil.getSysroot()
else:
- from pyanaconda.constants import ROOT_PATH # pylint: disable=redefined-outer-name
+ # For prior anaconda versions
+ from pyanaconda.constants import ROOT_PATH # pylint: disable=redefined-outer-name,no-name-in-module
_storageRoot = _sysroot = ROOT_PATH
from pyanaconda.anaconda_log import program_log_lock
--
1.9.3
9 years, 11 months
[master][PATCH] Use the right index for selecting region (#1114234)
by Vratislav Podzimek
'id' is a Python builtin, 'index' is a variable that is used as an index in that
block of code.
Signed-off-by: Vratislav Podzimek <vpodzime(a)redhat.com>
---
pyanaconda/ui/tui/spokes/time_spoke.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pyanaconda/ui/tui/spokes/time_spoke.py b/pyanaconda/ui/tui/spokes/time_spoke.py
index 62a1b23..3995a70 100644
--- a/pyanaconda/ui/tui/spokes/time_spoke.py
+++ b/pyanaconda/ui/tui/spokes/time_spoke.py
@@ -104,7 +104,7 @@ class TimeZoneSpoke(FirstbootSpokeMixIn, NormalTUISpoke):
self.apply()
self.close()
else:
- self.app.switch_screen(self, self._regions[id])
+ self.app.switch_screen(self, self._regions[index])
return INPUT_PROCESSED
elif key.lower() == "b":
self.app.switch_screen(self, None)
--
1.9.3
9 years, 11 months
[libblockdev:master] Automating libblockdev project a bit
by Anne Mulhern
Even the Makefile itself is not really fully automatic and I haven't started
on autotooling, but I'ld like to get this pushed before I have to rebase
too many more times.
mulhern (1):
Make Makefile mostly automatic.
Makefile | 155 +++++++++++++++++++++--------------------------
src/lib/blockdev.c | 11 ++--
src/lib/blockdev.h | 1 -
src/lib/plugin_apis/dm.h | 2 +-
src/plugins/loop.c | 2 +-
src/plugins/lvm.c | 2 +-
src/plugins/swap.c | 2 +-
src/plugins/test_loop.c | 2 +-
src/plugins/test_lvm.c | 3 +-
src/plugins/test_swap.c | 2 +-
src/utils/sizes.c | 2 +-
src/utils/test_sizes.c | 2 +-
12 files changed, 82 insertions(+), 104 deletions(-)
--
1.9.3
9 years, 11 months
[PATCH] Map our log levels to syslog log levels
by Brian C. Lane
It ends up that syslog doesn't understand levels like ERR and CRIT (and
of course LOCK) so it maps them to WARNING instead of what they really
mean. This checks for the ones anaconda adds and maps them to the
appropriate syslog level.
---
pyanaconda/anaconda_log.py | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/pyanaconda/anaconda_log.py b/pyanaconda/anaconda_log.py
index 1a48ea9..f7e36a5 100644
--- a/pyanaconda/anaconda_log.py
+++ b/pyanaconda/anaconda_log.py
@@ -67,6 +67,11 @@ def setHandlersLevel(logr, level):
filter (lambda hdlr: hasattr(hdlr, "autoSetLevel") and hdlr.autoSetLevel, logr.handlers))
class AnacondaSyslogHandler(SysLogHandler):
+ # syslog doesn't understand these level names
+ levelMap = { "ERR": "error",
+ "CRIT": "critical",
+ "LOCK": "debug"}
+
def __init__(self,
address=('localhost', SYSLOG_UDP_PORT),
facility=SysLogHandler.LOG_USER,
@@ -80,6 +85,10 @@ class AnacondaSyslogHandler(SysLogHandler):
SysLogHandler.emit(self, record)
record.msg = original_msg
+ def mapPriority(self, level):
+ """Map the priority level to a syslog level """
+ return self.levelMap.get(level, SysLogHandler.mapPriority(self, level))
+
class AnacondaLog:
SYSLOG_CFGFILE = "/etc/rsyslog.conf"
VIRTIO_PORT = "/dev/virtio-ports/org.fedoraproject.anaconda.log.0"
--
1.9.3
9 years, 11 months
[lorax] livemedia-creator: catch failed retry error
by Brian C. Lane
Also drop looking for WARNING in the regex errors, they will be errors
after the syslog level name remap patch goes into anaconda.
---
src/sbin/livemedia-creator | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/sbin/livemedia-creator b/src/sbin/livemedia-creator
index 47eec2c..916eef0 100755
--- a/src/sbin/livemedia-creator
+++ b/src/sbin/livemedia-creator
@@ -143,9 +143,10 @@ class LogRequestHandler(SocketServer.BaseRequestHandler):
simple_tests = ["Traceback (",
"Out of memory:",
"Call Trace:",
- "insufficient disk space:"]
- re_tests = [r"WARNING packaging: base repo .* not valid",
- r"WARNING packaging: .* requires .*"]
+ "insufficient disk space:",
+ "error populating transaction after"]
+ re_tests = [r"packaging: base repo .* not valid",
+ r"packaging: .* requires .*"]
for t in simple_tests:
if t in line:
self.server.log_error = True
--
1.9.3
9 years, 11 months
[anaconda][master][Python 3][PATCH] Use createrepo_c
by Martin Kolman
As we are only calling the createrepo utility with
the path to the folder containing the RPM files,
no changes other than changing the command name
when calling createrepo and changing the package
name in the spec file should be needed.
Martin Kolman (1):
Use createrepo_c in place of createrepo
anaconda.spec.in | 2 +-
pyanaconda/packaging/yumpayload.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
--
1.9.3
9 years, 11 months
[pungi] Don't emit media labels with spaces in them.
by Peter Jones
Spaces cause various bugs like #923374 and #855849 , and it would be
better if we just didn't use them.
Note that there's a corresponding lorax change to go with this.
Signed-off-by: Peter Jones <pjones(a)redhat.com>
---
src/pypungi/__init__.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/pypungi/__init__.py b/src/pypungi/__init__.py
index 9e9d161..6c65bc9 100644
--- a/src/pypungi/__init__.py
+++ b/src/pypungi/__init__.py
@@ -1608,7 +1608,7 @@ class Pungi(pypungi.PungiBase):
# NOTE: if this doesn't match what's in the bootloader config, the
# image won't be bootable!
extraargs.append('-V')
- extraargs.append('%s %s %s' % (self.config.get('pungi', 'name'),
+ extraargs.append('%s-%s-%s' % (self.config.get('pungi', 'name'),
self.config.get('pungi', 'version'), self.tree_arch))
extraargs.extend(['-o', isofile])
--
1.9.3
9 years, 11 months