[PATCH] Mark language search string translatable. (#955229)
by Samantha N. Bueno
---
pyanaconda/ui/gui/spokes/welcome.glade | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pyanaconda/ui/gui/spokes/welcome.glade b/pyanaconda/ui/gui/spokes/welcome.glade
index f0a4602..4f79b7c 100644
--- a/pyanaconda/ui/gui/spokes/welcome.glade
+++ b/pyanaconda/ui/gui/spokes/welcome.glade
@@ -367,7 +367,7 @@
<property name="invisible_char">●</property>
<property name="invisible_char_set">True</property>
<property name="secondary_icon_name">edit-clear-symbolic</property>
- <property name="placeholder_text">Type here to search.</property>
+ <property name="placeholder_text" translatable="yes">Type here to search.</property>
<signal name="changed" handler="on_entry_changed" swapped="no"/>
<signal name="icon-release" handler="on_clear_icon_clicked" swapped="no"/>
</object>
--
1.7.11.7
10 years, 2 months
[master][PATCH] Do not switch between consoles in live, image etc. installations
by Vratislav Podzimek
Signed-off-by: Vratislav Podzimek <vpodzime(a)redhat.com>
---
pyanaconda/exception.py | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/pyanaconda/exception.py b/pyanaconda/exception.py
index 4d62388..aeed85f 100644
--- a/pyanaconda/exception.py
+++ b/pyanaconda/exception.py
@@ -30,13 +30,13 @@ import os
import shutil
import signal
import time
-from flags import flags
import kickstart
import blivet.errors
from pyanaconda.ui.communication import hubQ
from pyanaconda.constants import ROOT_PATH, THREAD_EXCEPTION_HANDLING_TEST
from pyanaconda.threads import threadMgr
from pyanaconda.i18n import _
+from pyanaconda import flags
# pylint: disable-msg=E0611
from gi.repository import GLib
@@ -155,7 +155,8 @@ class AnacondaExceptionHandler(ExceptionHandler):
pass
def runDebug(self, exc_info):
- if self._intf_tty_num != 1:
+ if flags.can_touch_runtime_system("switch console")\
+ and self._intf_tty_num != 1:
iutil.vtActivate(1)
pidfl = "/tmp/vncshell.pid"
@@ -186,7 +187,8 @@ class AnacondaExceptionHandler(ExceptionHandler):
import pdb
pdb.post_mortem(exc_info.stack)
- if self._intf_tty_num != 1:
+ if flags.can_touch_runtime_system("switch console") \
+ and self._intf_tty_num != 1:
iutil.vtActivate(self._intf_tty_num)
def initExceptionHandling(anaconda):
@@ -194,7 +196,7 @@ def initExceptionHandling(anaconda):
"/tmp/program.log", "/tmp/storage.log", "/tmp/ifcfg.log",
"/tmp/yum.log", ROOT_PATH + "/root/install.log",
"/proc/cmdline" ]
- if flags.livecdInstall:
+ if flags.flags.livecdInstall:
fileList.extend(["/var/log/messages"])
else:
fileList.extend(["/tmp/syslog"])
--
1.7.11.7
10 years, 10 months
[master] UTC/localtime HW clock heuristic
by Vratislav Podzimek
PATCH [1/2] is just a minor change without any significant result.
PATCH [2/2] adds a heuristic to guess wheter HW clock uses UTC or local
time by searching for bootable NTFS partitions. It adds two threads, but
these are really lightweight and just handle the potential long storage
initialization.
Vratislav Podzimek (2):
Return bool value from the GRUB.has_windows method
Set system time from HW clock and guess if it is UTC
anaconda | 11 ++++++++-
pyanaconda/bootloader.py | 2 +-
pyanaconda/kickstart.py | 7 ------
pyanaconda/timezone.py | 38 ++++++++++++++++++++++++++++++
pyanaconda/ui/gui/spokes/datetime_spoke.py | 20 ++++++++++++++++
5 files changed, 69 insertions(+), 9 deletions(-)
--
1.7.11.7
10 years, 10 months
[master/f19-branch] Initial Setup related patches
by Vratislav Podzimek
These patches are needed for the Initial Setup, together with one patch for its
own code.
Vratislav Podzimek (3):
Be more specific about what was set in the kickstart (#963970)
Add flag indicating if running in the Initial Setup
Refer to installation not kickstart in the Initial Setup (#963968)
pyanaconda/flags.py | 1 +
pyanaconda/ui/gui/spokes/password.py | 28 ++++++++++++++++++++++++----
2 files changed, 25 insertions(+), 4 deletions(-)
--
1.7.11.7
10 years, 10 months
[master/f19-branch] Fix user creation with existing home directory
by Vratislav Podzimek
When using an existing /home partition, we shouldn't fail to create a user that
already has the home directory under it. We should create the user and just
change the owner of the particular home directory to the UID of the newly
created user.
I'm not aware of any bug filed on this, but I think it should go to both master
and f19-branch, because it is and expected behaviour and a common use case. A
question is if we should show some warning, but I believe it is not necessary
and I would wait for a potential request to do so before starting to bother a
lot of users.
These patches automatically apply to the Initial Setup's functionality which
means they fix a regression between the Firstboot and the i-s.
Vratislav Podzimek (3):
Add a function to recursively change owner of a directory
Do change root properly when creating users
Handle the case where home directory already exists
pyanaconda/iutil.py | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++
pyanaconda/users.py | 16 +++++++++++++++-
2 files changed, 66 insertions(+), 1 deletion(-)
--
1.7.11.7
10 years, 10 months
[PATCH] Hook up the delete key on the resize dialog.
by Chris Lumens
---
pyanaconda/ui/gui/spokes/lib/resize.glade | 2 ++
pyanaconda/ui/gui/spokes/lib/resize.py | 12 +++++++++++-
2 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/pyanaconda/ui/gui/spokes/lib/resize.glade b/pyanaconda/ui/gui/spokes/lib/resize.glade
index ff8943d..3a4c5eb 100644
--- a/pyanaconda/ui/gui/spokes/lib/resize.glade
+++ b/pyanaconda/ui/gui/spokes/lib/resize.glade
@@ -31,11 +31,13 @@
<object class="GtkDialog" id="resizeDialog">
<property name="height_request">550</property>
<property name="can_focus">False</property>
+ <property name="events">GDK_KEY_RELEASE_MASK | GDK_STRUCTURE_MASK</property>
<property name="border_width">5</property>
<property name="resizable">False</property>
<property name="modal">True</property>
<property name="type_hint">dialog</property>
<property name="decorated">False</property>
+ <signal name="key-release-event" handler="on_key_pressed" swapped="no"/>
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox1">
<property name="can_focus">False</property>
diff --git a/pyanaconda/ui/gui/spokes/lib/resize.py b/pyanaconda/ui/gui/spokes/lib/resize.py
index 109ec65..30518aa 100644
--- a/pyanaconda/ui/gui/spokes/lib/resize.py
+++ b/pyanaconda/ui/gui/spokes/lib/resize.py
@@ -21,7 +21,8 @@
from __future__ import division
-from gi.repository import Gtk
+# pylint: disable-msg=E0611
+from gi.repository import Gdk, Gtk
from pyanaconda.i18n import _, N_, P_
from pyanaconda.ui.lib.disks import size_str
@@ -290,6 +291,15 @@ class ResizeDialog(GUIObject):
return rc
# Signal handlers.
+ def on_key_pressed(self, window, event, *args):
+ # Handle any keyboard events. Right now this is just delete for
+ # removing an existing mountpoint, but it could include more later.
+ if not event or event and event.type != Gdk.EventType.KEY_RELEASE:
+ return
+
+ if event.keyval == Gdk.KEY_Delete and self._deleteButton.get_sensitive():
+ self._deleteButton.emit("clicked")
+
def _sumReclaimableSpace(self, model, path, itr, *args):
(editable, action, ident, targetSize) = model.get(itr, EDITABLE_COL, ACTION_COL, DEVICE_ID_COL, RESIZE_TARGET_COL)
--
1.8.1.2
10 years, 10 months
[PATCH] Add a "Delete All" button to the reclaim dialog.
by Chris Lumens
This allows for clearing all editable disks in one button click. It is
positioned in the bottom box and functions the same way as the reclaim
space button when clicked - it immediately takes effect and returns the
user to the hub.
---
pyanaconda/ui/gui/spokes/lib/resize.glade | 26 ++++++++++++++++++++++----
pyanaconda/ui/gui/spokes/lib/resize.py | 8 ++++++++
2 files changed, 30 insertions(+), 4 deletions(-)
diff --git a/pyanaconda/ui/gui/spokes/lib/resize.glade b/pyanaconda/ui/gui/spokes/lib/resize.glade
index 3a4c5eb..b996fef 100644
--- a/pyanaconda/ui/gui/spokes/lib/resize.glade
+++ b/pyanaconda/ui/gui/spokes/lib/resize.glade
@@ -53,13 +53,29 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
- <property name="halign">end</property>
<property name="use_stock">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
+ <property name="non_homogeneous">True</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="deleteAllButton">
+ <property name="label" translatable="yes">Delete _all</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_underline">True</property>
+ <signal name="clicked" handler="on_delete_all_clicked" swapped="no"/>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ <property name="non_homogeneous">True</property>
</packing>
</child>
<child>
@@ -69,14 +85,14 @@
<property name="sensitive">False</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
- <property name="halign">end</property>
<property name="use_underline">True</property>
<signal name="clicked" handler="on_resize_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">1</property>
+ <property name="position">2</property>
+ <property name="non_homogeneous">True</property>
</packing>
</child>
</object>
@@ -213,6 +229,7 @@
<object class="GtkBox" id="box2">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="margin_top">6</property>
<child>
<object class="GtkButton" id="preserveButton">
<property name="label" translatable="yes">_Preserve</property>
@@ -342,7 +359,8 @@
</child>
<action-widgets>
<action-widget response="0">cancelButton</action-widget>
- <action-widget response="1">resizeButton</action-widget>
+ <action-widget response="1">deleteAllButton</action-widget>
+ <action-widget response="2">resizeButton</action-widget>
</action-widgets>
</object>
</interface>
diff --git a/pyanaconda/ui/gui/spokes/lib/resize.py b/pyanaconda/ui/gui/spokes/lib/resize.py
index 30518aa..a9bb782 100644
--- a/pyanaconda/ui/gui/spokes/lib/resize.py
+++ b/pyanaconda/ui/gui/spokes/lib/resize.py
@@ -386,6 +386,14 @@ class ResizeDialog(GUIObject):
def on_resize_clicked(self, *args):
self._diskStore.foreach(self._scheduleActions, None)
+ def on_delete_all_clicked(self, *args):
+ for row in self._diskStore:
+ if not row[EDITABLE_COL]:
+ continue
+
+ device = self.storage.devicetree.getDeviceByID(row[DEVICE_ID_COL])
+ self.storage.recursiveRemove(device)
+
def on_row_clicked(self, view, path, column):
# This handles when the user clicks on a row in the view. We use it
# only for expanding/collapsing disk headers.
--
1.8.1.2
10 years, 10 months
[PATCH] Don't fail on new kickstart commands in dracut
by Brian C. Lane
From: "Brian C. Lane" <bcl(a)redhat.com>
Anaconda will catch it if it is a problem. This lets us test new things
with updates.img containing the new pykickstart w/o having to update the
initrd too.
---
dracut/parse-kickstart | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dracut/parse-kickstart b/dracut/parse-kickstart
index 3480c5f..97beabd 100755
--- a/dracut/parse-kickstart
+++ b/dracut/parse-kickstart
@@ -389,7 +389,7 @@ def write_ifcfg(filename, ifcfg):
def process_kickstart(ksfile):
handler = DracutHandler()
handler.ksdevice = os.environ.get('ksdevice')
- parser = KickstartParser(handler, missingIncludeIsFatal=False)
+ parser = KickstartParser(handler, missingIncludeIsFatal=False, errorsAreFatal=False)
log.info("processing kickstart file %s", ksfile)
processed_file = preprocessKickstart(ksfile)
try:
--
1.8.1.4
10 years, 10 months
[f19-branch/master] Add variable substitution to repo urls (#967531)
by Brian C. Lane
From: "Brian C. Lane" <bcl(a)redhat.com>
kickstarts require an install option (cdrom, url, etc.) but previously
there was a bug and you could leave these out and it would use whatever
repos were configured. This behavior has been fixed, but that makes it
difficult to share kickstarts across releases.
This patch adds $releasever and $basearch variable support (like in yum
config files) to kickstart repos. Both baseurl and mirrorlist support
these so that now the kickstart can have this and it will do the right
thing:
url --mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-$releasever&arch=$basearch
---
pyanaconda/packaging/yumpayload.py | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/pyanaconda/packaging/yumpayload.py b/pyanaconda/packaging/yumpayload.py
index 6cd223d..5f1fcd3 100644
--- a/pyanaconda/packaging/yumpayload.py
+++ b/pyanaconda/packaging/yumpayload.py
@@ -875,6 +875,25 @@ reposdir=%s
except RepoMDError:
log.error("failed to get groups for repo %s" % yumrepo.id)
+ def _replaceVars(self, url):
+ """ Replace url variables with their values
+
+ :param url: url string to do replacement on
+ :type url: string
+ :returns: string with variables substituted
+ :rtype: string or None
+
+ Currently supports $releasever and $basearch
+ """
+ if not url:
+ return url
+
+ with _yum_lock:
+ url = url.replace("$releasever", self._yum.conf.yumvar['releasever'])
+ url = url.replace("$basearch", blivet.arch.getArch())
+
+ return url
+
def _addYumRepo(self, name, baseurl, mirrorlist=None, proxyurl=None, **kwargs):
""" Add a yum repo to the YumBase instance. """
from yum.Errors import RepoError
@@ -907,6 +926,10 @@ reposdir=%s
log.error("Failed to parse proxy for _addYumRepo %s: %s" \
% (proxyurl, e))
+ if baseurl:
+ baseurl = self._replaceVars(baseurl)
+ if mirrorlist:
+ mirrorlist = self._replaceVars(mirrorlist)
log.debug("adding yum repo %s with baseurl %s and mirrorlist %s"
% (name, baseurl, mirrorlist))
with _yum_lock:
--
1.8.1.4
10 years, 10 months
[master][PATCH] Clear placeholder text when user searches lang in welcome (#946869)
by Samantha N. Bueno
Relatively minor change; users have to manually delete the "Type
here to search" string on the welcome screen if they do in fact want
to search. This patch automatically clears that text out of the way
when a user clicks the search field to begin typing.
---
pyanaconda/ui/gui/spokes/welcome.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pyanaconda/ui/gui/spokes/welcome.py b/pyanaconda/ui/gui/spokes/welcome.py
index 812f809..7511a39 100644
--- a/pyanaconda/ui/gui/spokes/welcome.py
+++ b/pyanaconda/ui/gui/spokes/welcome.py
@@ -329,7 +329,7 @@ class WelcomeLanguageSpoke(StandaloneSpoke):
def on_clear_icon_clicked(self, entry, icon_pos, event):
if icon_pos == Gtk.EntryIconPosition.SECONDARY:
- entry.set_text(entry.get_placeholder_text())
+ entry.set_text("")
def on_entry_changed(self, *args):
self._languageStoreFilter.refilter()
--
1.7.11.7
10 years, 10 months