[PATCH] Fix a bug when switching back to an HDISO install source (#879612).
by Chris Lumens
Basically, _setupDevice gets confused when there's a symlink involved in the
path and /proc/mounts does not match what we expect. Thus, just make sure
we resolve symlinks to their real path before feeding them to get_mount_device.
Also, don't print some mount-related log messages if they'd say something like
"None is already mounted".
---
pyanaconda/packaging/__init__.py | 19 ++++++++++++++-----
1 file changed, 14 insertions(+), 5 deletions(-)
diff --git a/pyanaconda/packaging/__init__.py b/pyanaconda/packaging/__init__.py
index e9a5da1..f724088 100644
--- a/pyanaconda/packaging/__init__.py
+++ b/pyanaconda/packaging/__init__.py
@@ -132,7 +132,9 @@ def get_mount_device(mountpoint):
log.debug("found backing file %s for loop device %s" % (mount_device,
loop_name))
- log.debug("%s is mounted on %s" % (mount_device, mountpoint))
+ if mount_device:
+ log.debug("%s is mounted on %s" % (mount_device, mountpoint))
+
return mount_device
class Payload(object):
@@ -465,14 +467,21 @@ class Payload(object):
""" Prepare an install CD/DVD for use as a package source. """
log.info("setting up device %s and mounting on %s" % (device.name,
mountpoint))
- if os.path.ismount(mountpoint):
- mdev = get_mount_device(mountpoint)
- log.warning("%s is already mounted on %s" % (mdev, mountpoint))
+ # Is there a symlink involved? If so, let's get the actual path.
+ # This is to catch /run/install/isodir vs. /mnt/install/isodir, for
+ # instance.
+ realMountpoint = os.path.realpath(mountpoint)
+
+ if os.path.ismount(realMountpoint):
+ mdev = get_mount_device(realMountpoint)
+ if mdev:
+ log.warning("%s is already mounted on %s" % (mdev, mountpoint))
+
if mdev == device.path:
return
else:
try:
- isys.umount(mountpoint, removeDir=False)
+ isys.umount(realMountpoint, removeDir=False)
except Exception as e:
log.error(str(e))
log.info("umount failed -- mounting on top of it")
--
1.7.11.2
11 years, 5 months
[PATCH] Change mirrorlist checkbox text (#883191).
by Chris Lumens
---
pyanaconda/ui/gui/spokes/source.glade | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pyanaconda/ui/gui/spokes/source.glade b/pyanaconda/ui/gui/spokes/source.glade
index 5622cdd..160308f 100644
--- a/pyanaconda/ui/gui/spokes/source.glade
+++ b/pyanaconda/ui/gui/spokes/source.glade
@@ -1140,7 +1140,7 @@ TeXlive 2012 repository</col>
</child>
<child>
<object class="GtkCheckButton" id="mirrorlistCheckbox">
- <property name="label" translatable="yes">This URL refers to a _mirror.</property>
+ <property name="label" translatable="yes">This URL refers to a _mirror list.</property>
<property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
--
1.7.11.2
11 years, 5 months
[PATCH] Change the bootloader button to indicate you can also not install one.
by Chris Lumens
It's pretty confusing to click "Set as Boot Loader" to toggle installing a
boot loader off.
---
pyanaconda/ui/gui/spokes/lib/cart.glade | 4 +++-
pyanaconda/ui/gui/spokes/lib/cart.py | 38 +++++++++++++++++++++++++--------
2 files changed, 32 insertions(+), 10 deletions(-)
diff --git a/pyanaconda/ui/gui/spokes/lib/cart.glade b/pyanaconda/ui/gui/spokes/lib/cart.glade
index c2334ee..9b83f92 100644
--- a/pyanaconda/ui/gui/spokes/lib/cart.glade
+++ b/pyanaconda/ui/gui/spokes/lib/cart.glade
@@ -102,7 +102,9 @@
<property name="can_focus">True</property>
<property name="model">disk_store</property>
<child internal-child="selection">
- <object class="GtkTreeSelection" id="disk_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">
diff --git a/pyanaconda/ui/gui/spokes/lib/cart.py b/pyanaconda/ui/gui/spokes/lib/cart.py
index 2b45236..590acb1 100644
--- a/pyanaconda/ui/gui/spokes/lib/cart.py
+++ b/pyanaconda/ui/gui/spokes/lib/cart.py
@@ -101,6 +101,8 @@ class SelectedDisksDialog(GUIObject):
self._selection = self.builder.get_object("disk_selection")
self._summary_label = self.builder.get_object("summary_label")
+ self._set_button = self.builder.get_object("set_as_boot_button")
+
# clear out the store and repopulate it from the devicetree
self._store.clear()
self.initialize(disks, free, showRemove=showRemove)
@@ -180,21 +182,39 @@ class SelectedDisksDialog(GUIObject):
self.data.bootloader.bootDrive = None
self.data.bootloader.location = "none"
+ def _toggle_button_text(self, row):
+ if row[IS_BOOT_COL]:
+ self._set_button.set_label(_("_Do not install bootloader"))
+ else:
+ self._set_button.set_label(_("_Set as Boot Device"))
+
def on_selection_changed(self, *args):
model, itr = self._selection.get_selected()
- if itr:
- print "new selection: %s" % model.get_value(itr, SERIAL_COL)
+ if not itr:
+ return
+
+ self._toggle_button_text(self._store[itr])
def on_set_as_boot_clicked(self, button):
model, itr = self._selection.get_selected()
if not itr:
return
- # First make sure the previous device is unselected.
- for row in self._store:
- row[IS_BOOT_COL] = False
-
- # Now set the currently selected device to be the boot target.
- if self._store[itr][ID_COL] != self._previousID:
- self._store[itr][IS_BOOT_COL] = True
+ # There's only two cases:
+ if self._store[itr][ID_COL] == self._previousID:
+ # Either the user clicked on the device they'd previously selected,
+ # in which case we are just toggling here.
+ self._store[itr][IS_BOOT_COL] = not self._store[itr][IS_BOOT_COL]
+ else:
+ # Or they clicked on a different device. First we unselect the
+ # previously selected device.
+ for row in self._store:
+ if row[ID_COL] == self._previousID:
+ row[IS_BOOT_COL] = not row[IS_BOOT_COL]
+ break
+
+ # Then we select the new row.
+ self._store[itr][IS_BOOT_COL] = not self._store[itr][IS_BOOT_COL]
self._previousID = self._store[itr][ID_COL]
+
+ self._toggle_button_text(self._store[itr])
--
1.7.11.2
11 years, 5 months
[PATCH 0/3] migration to /etc/hostname, /etc/vconsole.conf, /etc/locale.conf
by Michal Schmidt
systemd knows the following config files:
/etc/hostname
/etc/vconsole.conf
/etc/locale.conf
FESCo asked us to make sure all Fedora packages use the new
config files, not the legacy sysconfig files.
For details see the tracker bug:
https://bugzilla.redhat.com/show_bug.cgi?id=881785
Michal Schmidt (3):
Write /etc/hostname (#871543)
Stop writing /etc/sysconfig/i18n (#871543)
Stop writing /etc/sysconfig/keyboard (#871543)
pyanaconda/keyboard.py | 14 ++------------
pyanaconda/localization.py | 13 +------------
pyanaconda/network.py | 14 +++++++++++++-
3 files changed, 16 insertions(+), 25 deletions(-)
--
1.8.0.1
11 years, 5 months
[PATCH rhel6-branch] Generate kickstart fcoe commands for devices added in UI (#813998)
by Radek Vykydal
I was updating the ksnics only for devices added by kickstart,
but we want to generate the commands also for devices added in UI.
Related: rhbz#813998
---
iw/advanced_storage.py | 4 +++-
textw/add_drive_text.py | 1 +
2 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/iw/advanced_storage.py b/iw/advanced_storage.py
index 35a2095..cc1b23a 100644
--- a/iw/advanced_storage.py
+++ b/iw/advanced_storage.py
@@ -388,10 +388,12 @@ def addFcoeDrive(anaconda):
continue
try:
- anaconda.id.storage.fcoe.addSan(store.get_value(iter, 1),
+ nic = store.get_value(iter, 1)
+ anaconda.id.storage.fcoe.addSan(nic,
dcb=dcb_cb.get_active(),
auto_vlan=auto_vlan_cb.get_active(),
intf=anaconda.intf)
+ anaconda.id.storage.fcoe.ksnics.append(nic)
except IOError as e:
anaconda.intf.messageWindow(_("Error"), str(e))
rc = gtk.RESPONSE_CANCEL
diff --git a/textw/add_drive_text.py b/textw/add_drive_text.py
index 9a7ad83..35ce419 100644
--- a/textw/add_drive_text.py
+++ b/textw/add_drive_text.py
@@ -412,6 +412,7 @@ class addDriveDialog(object):
storage.fcoe.fcoe().addSan(nic=nic, dcb=dcb, auto_vlan=auto_vlan,
intf=self.anaconda.intf)
+ storage.fcoe.fcoe().ksnics.append(nic)
screen.popWindow()
return INSTALL_OK
--
1.7.4
11 years, 5 months
[PATCH] anaconda realm command
by Stef Walter
This patch adds the realm command to anaconda. It depends on the
pykickstart changes I added earlier (hmmm, how should I reflect this
dependency?).
Again, the big use case is automatic AD domain joins by adding a
line to a kickstart file. The line in the kickstart file looks like:
realm join domain.example.com
or:
realm join --one-time-password=mypassword domain.example.com
Attached are two patches. The first one sets the kernel hostname during
the post install, so it can be used by stuff running in the chroot.
realmd needs the hostname to be appropriately set.
The second patch adds the realm command implementation. It does this:
* Early in the install the realm is discovered. This tells us what
kind of realm (such as AD domain vs. IPA domain etc.) and what
kind of packages need to be installed to support it. The required
packages are added to the install.
* After the install and configuration, we join the realm using the
realmd. realmd has support for running within a chroot, and without
a dbus system bus etc. So we use this to run within /mnt/sysimage.
Happy to adapt this as necessary. Looking forward to review.
Cheers,
Stef
11 years, 5 months
[PATCH] Use BaseWindow.set_warning and set_error in GUIObject's methods
by Vratislav Podzimek
Commit 2c367ec88e7385892cb1cdd1f2e1a61079d2e5de brings set_info,
set_warning and set_error methods for our BaseWindow, but neither
Chris writing the patch nor me doing the review noticed that set_info
is used in all cases in the GUIObject's methods.
Signed-off-by: Vratislav Podzimek <vpodzime(a)redhat.com>
---
pyanaconda/ui/gui/__init__.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/pyanaconda/ui/gui/__init__.py b/pyanaconda/ui/gui/__init__.py
index 52336f8..d0c2d5b 100644
--- a/pyanaconda/ui/gui/__init__.py
+++ b/pyanaconda/ui/gui/__init__.py
@@ -413,7 +413,7 @@ class GUIObject(common.UIObject):
may not be able to do anything about, but that the user may. A
suitable background color and icon will be displayed.
"""
- self.window.set_info(msg)
+ self.window.set_error(msg)
def set_info(self, msg):
"""Display an info bar along the bottom of the screen with the provided
@@ -430,7 +430,7 @@ class GUIObject(common.UIObject):
attend to in order to continue installation. This is the bulk of
messages. A suitable background color and icon will be displayed.
"""
- self.window.set_info(msg)
+ self.window.set_warning(msg)
class QuitDialog(GUIObject):
builderObjects = ["quitDialog"]
--
1.7.11.7
11 years, 5 months
Re: [PATCH] anaconda realm command
by Stef Walter
On 12/04/2012 12:19 PM, Vratislav Podzimek wrote:
> On Tue, 2012-12-04 at 11:51 +0100, Stef Walter wrote:
>> No. We do however need it in the installer. Once it's there, then the
>> anaconda realm command installs it (if necessary) on the system.
> Adding 'Requires: realmd' in spec file ensures that realm command is
> available during installation.
Alright.
>> Should I remove it from the line above? What does the above reflect?
>> Because Anaconda does need it in this case. LMK.
> This is the list of packages Anaconda needs for running some
> post-install setup commands in chroot. But in this case realm command is
> run only in cases when realmd is also added by anaconda/pykickstart
> realm command, right?
The realmd package (and other necessary packages for the realm) are
added to the list of packages to be installed on the system if the
'realm' command is present, and the realm is discoverable.
So, I've realmd from the list of packages in from yuminstall.py
Cheers,
Stef
11 years, 5 months
[PATCH] pykickstart realm support
by Stef Walter
I've been working on more tight integration between realmd and
kickstart. The big use case is automatic AD domain joins by adding a
line to a kickstart file.
The line in the kickstart file looks like:
realm join domain.example.com
realm join --one-time-password domain.example.com
Attached is the first set of patches to pykickstart which implements
support for the realm command.
I'd like to see this feature make it into RHEL7. As I understand it that
would mean inclusion in Fedora 19 and backporting to RHEL 7. I'm happy
to help with that, and I don't mean to just drop this off in your guys
lap :)
So attached are two patches. One which adds support for Fedora 19 to
pykickstart. I hope I've done this right. I'm pretty new to this. The
other patch adds the realm command, and tests.
Will follow with anaconda patches, which make the implementation
clearer. The basic procedure is: a) discover realm before install and
add needed packages b) after install and configuration, join realm.
Should I file RH bugzilla bugs to track this? Happy to do this
differently if necessary.
Cheers,
Stef
11 years, 5 months
i18n patches
by Chris Lumens
The following pile of patches fixes up most of the translation issues
throughout anaconda, basically for bug 858628. I've not applied that number
to any individual fix as it's hard to really tell what should get the
bug.
The following things still are not translated:
- Cancel and Add buttons on the keyboard's add dialog.
- Close button on the keyboard's layout dialog.
- Remove and Close buttons on the disk shopping cart.
- Cancel button on the reclaim dialog.
- Root names on the custom partitioning's LHS.
- All of the select ISO dialog.
- All of python-meh, except for the Quit button.
Anyone want to take a look at those?
- Chris
11 years, 5 months