[PATCH master] Don't generate ifcfg files for non-existing devices in parse-kickstart (#886647)
by Radek Vykydal
---
dracut/parse-kickstart | 3 +++
1 file changed, 3 insertions(+)
diff --git a/dracut/parse-kickstart b/dracut/parse-kickstart
index 0175c2a..333849b 100755
--- a/dracut/parse-kickstart
+++ b/dracut/parse-kickstart
@@ -257,6 +257,9 @@ def ksnet_to_ifcfg(net, filename=None):
dev = find_devname(dev)
if not dev:
return
+ if not os.path.isdir("/sys/class/net/%s" % dev):
+ log.info("can't find device %s" % dev)
+ return
ifcfg = dict()
if filename is None:
filename = "/tmp/ifcfg/ifcfg-%s" % dev
--
1.7.11.7
11 years, 4 months
[lorax] Only run installupgradeinitrd if upgrade on s390x
by Martin Gracik
---
share/s390.tmpl | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/share/s390.tmpl b/share/s390.tmpl
index b37237c..5df6a87 100644
--- a/share/s390.tmpl
+++ b/share/s390.tmpl
@@ -24,8 +24,10 @@ replace @INITRD_LOAD_ADDRESS@ ${INITRD_ADDRESS} generic.ins
installkernel images-${basearch} ${kernel.path} ${KERNELDIR}/kernel.img
installinitrd images-${basearch} ${kernel.initrd.path} ${KERNELDIR}/initrd.img
-## upgrader image
-installupgradeinitrd images-${basearch} ${kernel.upgrade.path} ${KERNELDIR}/upgrade.img
+%if doupgrade
+ ## upgrader image
+ installupgradeinitrd images-${basearch} ${kernel.upgrade.path} ${KERNELDIR}/upgrade.img
+%endif
## s390 needs some extra boot config
createaddrsize ${INITRD_ADDRESS} ${outroot}/${BOOTDIR}/initrd.img ${outroot}/${BOOTDIR}/initrd.addrsize
--
1.7.9.5
11 years, 4 months
[lorax] Only run installupgradeinitrd if upgrade
by Martin Gracik
---
share/arm.tmpl | 12 ++++++++----
share/ppc.tmpl | 6 ++++--
share/x86.tmpl | 8 ++++++--
src/pylorax/__init__.py | 3 ++-
src/pylorax/treebuilder.py | 4 ++--
5 files changed, 22 insertions(+), 11 deletions(-)
diff --git a/share/arm.tmpl b/share/arm.tmpl
index e99c92b..fdf5326 100644
--- a/share/arm.tmpl
+++ b/share/arm.tmpl
@@ -32,8 +32,10 @@ mkdir ${KERNELDIR}
installkernel images-${kernel.flavor}-${basearch} ${kernel.path} ${KERNELDIR}/vmlinuz-${kernel.flavor}
installinitrd images-${kernel.flavor}-${basearch} ${kernel.initrd.path} ${KERNELDIR}/initrd-${kernel.flavor}.img
- ## install upgrade image
- installupgradeinitrd images-${kernel.flavor}-${basearch} ${kernel.upgrade.path} ${KERNELDIR}/upgrade-${kernel.flavor}.img
+ %if doupgrade:
+ ## install upgrade image
+ installupgradeinitrd images-${kernel.flavor}-${basearch} ${kernel.upgrade.path} ${KERNELDIR}/upgrade-${kernel.flavor}.img
+ %endif
## create U-Boot wrapped images
@@ -58,8 +60,10 @@ mkdir ${KERNELDIR}
installkernel images-${basearch} ${kernel.path} ${KERNELDIR}/vmlinuz
installinitrd images-${basearch} ${kernel.initrd.path} ${KERNELDIR}/initrd.img
- ## install upgrade image
- installupgradeinitrd images-${basearch} ${kernel.upgrade.path} ${KERNELDIR}/upgrade.img
+ %if doupgrade:
+ ## install upgrade image
+ installupgradeinitrd images-${basearch} ${kernel.upgrade.path} ${KERNELDIR}/upgrade.img
+ %endif
## create U-Boot wrapped images
diff --git a/share/ppc.tmpl b/share/ppc.tmpl
index 4eb0b0c..bbef5fa 100644
--- a/share/ppc.tmpl
+++ b/share/ppc.tmpl
@@ -66,8 +66,10 @@ install ${configdir}/magic ${BOOTDIR}
installkernel images-${kernel.arch} ${kernel.path} ${KERNELDIR}/vmlinuz
installinitrd images-${kernel.arch} ${kernel.initrd.path} ${KERNELDIR}/initrd.img
- ## upgrade image
- installupgradeinitrd images-${kernel.arch} ${kernel.upgrade.path} ${KERNELDIR}/upgrade.img
+ %if doupgrade:
+ ## upgrade image
+ installupgradeinitrd images-${kernel.arch} ${kernel.upgrade.path} ${KERNELDIR}/upgrade.img
+ %endif
## install arch-specific bootloader config
install ${configdir}/yaboot.conf.in ${KERNELDIR}/yaboot.conf
diff --git a/share/x86.tmpl b/share/x86.tmpl
index 6e1f305..6412291 100644
--- a/share/x86.tmpl
+++ b/share/x86.tmpl
@@ -34,12 +34,16 @@ mkdir ${KERNELDIR}
## i386 PAE
installkernel images-xen ${kernel.path} ${KERNELDIR}/vmlinuz-${kernel.flavor}
installinitrd images-xen ${kernel.initrd.path} ${KERNELDIR}/initrd-${kernel.flavor}.img
- installupgradeinitrd images-xen ${kernel.upgrade.path} ${KERNELDIR}/upgrade-${kernel.flavor}.img
+ %if doupgrade:
+ installupgradeinitrd images-xen ${kernel.upgrade.path} ${KERNELDIR}/upgrade-${kernel.flavor}.img
+ %endif
%else:
## normal i386, x86_64
installkernel images-${basearch} ${kernel.path} ${KERNELDIR}/vmlinuz
installinitrd images-${basearch} ${kernel.initrd.path} ${KERNELDIR}/initrd.img
- installupgradeinitrd images-${basearch} ${kernel.upgrade.path} ${KERNELDIR}/upgrade.img
+ %if doupgrade:
+ installupgradeinitrd images-${basearch} ${kernel.upgrade.path} ${KERNELDIR}/upgrade.img
+ %endif
%endif
%endfor
diff --git a/src/pylorax/__init__.py b/src/pylorax/__init__.py
index 00db2c2..e1c0069 100644
--- a/src/pylorax/__init__.py
+++ b/src/pylorax/__init__.py
@@ -275,7 +275,8 @@ class Lorax(BaseLoraxClass):
treebuilder = TreeBuilder(product=self.product, arch=self.arch,
inroot=installroot, outroot=self.outputdir,
runtime=runtime, isolabel=isolabel,
- domacboot=domacboot, templatedir=templatedir)
+ domacboot=domacboot, doupgrade=doupgrade,
+ templatedir=templatedir)
logger.info("rebuilding initramfs images")
dracut_args = ["--xz", "--install", "/.buildstamp"]
diff --git a/src/pylorax/treebuilder.py b/src/pylorax/treebuilder.py
index 17f2ae6..acd1a59 100644
--- a/src/pylorax/treebuilder.py
+++ b/src/pylorax/treebuilder.py
@@ -170,14 +170,14 @@ class RuntimeBuilder(object):
class TreeBuilder(object):
'''Builds the arch-specific boot images.
inroot should be the installtree root (the newly-built runtime dir)'''
- def __init__(self, product, arch, inroot, outroot, runtime, isolabel, domacboot=True, templatedir=None):
+ def __init__(self, product, arch, inroot, outroot, runtime, isolabel, domacboot=True, doupgrade=True, templatedir=None):
# NOTE: if you pass an arg named "runtime" to a mako template it'll
# clobber some mako internal variables - hence "runtime_img".
self.vars = DataHolder(arch=arch, product=product, runtime_img=runtime,
runtime_base=basename(runtime),
inroot=inroot, outroot=outroot,
basearch=arch.basearch, libdir=arch.libdir,
- isolabel=isolabel, udev=udev_escape, domacboot=domacboot)
+ isolabel=isolabel, udev=udev_escape, domacboot=domacboot, doupgrade=doupgrade)
self._runner = LoraxTemplateRunner(inroot, outroot, templatedir=templatedir)
self._runner.defaults = self.vars
self.templatedir = templatedir
--
1.7.9.5
11 years, 4 months
[PATCH][rhel6-branch] Don't run identifyMultipaths if nompath was passed.
by David Lehman
Related: rhbz#821042
---
storage/devicetree.py | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/storage/devicetree.py b/storage/devicetree.py
index 6e3c6b2..ba85aab 100644
--- a/storage/devicetree.py
+++ b/storage/devicetree.py
@@ -2099,8 +2099,10 @@ class DeviceTree(object):
friendly_names=self.mpathFriendlyNames)
devices = udev_get_block_devices()
- (singles, mpaths, partitions) = devicelibs.mpath.identifyMultipaths(devices)
- devices = singles + reduce(list.__add__, mpaths, []) + partitions
+ if os.access("/etc/multipath.conf", os.R_OK):
+ (singles, mpaths, partitions) = devicelibs.mpath.identifyMultipaths(devices)
+ devices = singles + reduce(list.__add__, mpaths, []) + partitions
+
# remember all the devices idenitfyMultipaths() gave us at this point
old_devices = {}
for dev in devices:
--
1.7.6.5
11 years, 4 months
[PATCH] Add product.py to POTFILES (#858628).
by Chris Lumens
---
po/POTFILES.in | 1 +
1 file changed, 1 insertion(+)
diff --git a/po/POTFILES.in b/po/POTFILES.in
index bf5b640..b202521 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -15,6 +15,7 @@ pyanaconda/kickstart.py
pyanaconda/network.py
pyanaconda/packages.py
pyanaconda/platform.py
+pyanaconda/product.py
pyanaconda/rescue.py
pyanaconda/vnc.py
pyanaconda/yuminstall.py
--
1.7.11.2
11 years, 4 months
[master] [PATCH] Only close AddLayout dialog on double-click if something is selected (#887371)
by Vratislav Podzimek
The AddLayout dialog has a handler for double-click on the selection
that closes the dialog. But the selection can be double-clicked even
if it contains nothing (all filtered out) which may cause traceback.
Signed-off-by: Vratislav Podzimek <vpodzime(a)redhat.com>
---
pyanaconda/ui/gui/spokes/keyboard.py | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/pyanaconda/ui/gui/spokes/keyboard.py b/pyanaconda/ui/gui/spokes/keyboard.py
index 97d965f..908de71 100644
--- a/pyanaconda/ui/gui/spokes/keyboard.py
+++ b/pyanaconda/ui/gui/spokes/keyboard.py
@@ -153,10 +153,12 @@ class AddLayoutDialog(GUIObject):
def on_layout_view_button_press(self, widget, event, *args):
# BUG: Gdk.EventType.2BUTTON_PRESS results in syntax error
- if event.type == getattr(Gdk.EventType, "2BUTTON_PRESS"):
- # double-click should close the dialog
- button = self.builder.get_object("confirmAddButton")
- button.emit("clicked")
+ if event.type == getattr(Gdk.EventType, "2BUTTON_PRESS") and \
+ self._confirmAddButton.get_sensitive():
+ # double-click should close the dialog if something is selected
+ # (i.e. the Add button is sensitive)
+ # @see on_add_layout_selection_changed
+ self._confirmAddButton.emit("clicked")
# let the other actions happen as well
return False
--
1.7.11.7
11 years, 4 months
[PATCH 1/4] Remove idiomatic, hard to translate text (#865598).
by Chris Lumens
---
pyanaconda/ui/gui/spokes/storage.py | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/pyanaconda/ui/gui/spokes/storage.py b/pyanaconda/ui/gui/spokes/storage.py
index 6bd71ec..ae7b419 100644
--- a/pyanaconda/ui/gui/spokes/storage.py
+++ b/pyanaconda/ui/gui/spokes/storage.py
@@ -150,8 +150,7 @@ class InstallOptions1Dialog(GUIObject):
options_text = (_("You have plenty of space to install <b>%s</b>, so "
"we can automatically\n"
- "configure the rest of the installation for you.\n\n"
- "You're all set!")
+ "configure the rest of the installation for you.")
% productName)
options_label.set_markup(options_text)
--
1.7.11.2
11 years, 4 months
[f18-branch/master] Add warning to the Keyboard spoke on live* installations
by Vratislav Podzimek
On installations that have a desktop environment running (live, image,...),
we don't change runtime keyboard configuration and changes made on the Keyboard
spoke apply only to the installed system. But there is no hint for the user.
I'd like to propose bug #886463 as NTH and push this to F18.
This patch adds a visible warning [1] to such installations.
[1] http://vpodzime.fedorapeople.org/keyboard_spoke_warning.png
Vratislav Podzimek (1):
Add warning to keyboard spoke on live installations (#886463)
pyanaconda/ui/gui/spokes/keyboard.glade | 50 +++++++++++++++++++++++++++++++--
pyanaconda/ui/gui/spokes/keyboard.py | 4 +++
2 files changed, 52 insertions(+), 2 deletions(-)
--
1.7.11.7
11 years, 4 months