[master] Pass/check displaymode in collect_catories and collectCategoriesAndSpokes.
by Samantha N. Bueno
Need to have displaymode passed to so that categories can be
appropriately determined based on whether a user is in graphical or
text mode.
---
pyanaconda/ui/common.py | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/pyanaconda/ui/common.py b/pyanaconda/ui/common.py
index 08409ff..d083ba4 100644
--- a/pyanaconda/ui/common.py
+++ b/pyanaconda/ui/common.py
@@ -698,13 +698,17 @@ def collect_spokes(mask_paths, category):
return spokes
-def collect_categories(mask_paths):
+def collect_categories(mask_paths, displaymode):
"""Return a list of all category subclasses. Look for them in modules
imported as module_mask % basename(f) where f is name of all files in path.
"""
categories = []
- for mask, path in mask_paths:
- categories.extend(collect(mask, path, lambda obj: getattr(obj, "displayOnHub", None) is not None))
+ if displaymode == DISPLAY_MODE_TEXT:
+ for mask, path in mask_paths:
+ categories.extend(collect(mask, path, lambda obj: getattr(obj, "displayOnHubTUI", None) is not None))
+ else:
+ for mask, path in mask_paths:
+ categories.extend(collect(mask, path, lambda obj: getattr(obj, "displayOnHubGUI", None) is not None))
return categories
@@ -720,13 +724,10 @@ def collectCategoriesAndSpokes(paths, klass, displaymode):
# Collect all the categories this hub displays, then collect all the
# spokes belonging to all those categories.
if displaymode == DISPLAY_MODE_TEXT:
- # bit of a hack, but the category displayOnHub defaults to GUI values,
- # so just ignore displayOnHub if we're doing a text install since
- # everything goes on the summary hub anyway
- categories = sorted(collect_categories(paths["categories"]),
+ categories = sorted(filter(lambda c: c.displayOnHubTUI == klass.__name__, collect_categories(paths["categories"], displaymode)),
key=lambda c: c.sortOrder)
else:
- categories = sorted(filter(lambda c: c.displayOnHub == klass.__name__, collect_categories(paths["categories"])),
+ categories = sorted(filter(lambda c: c.displayOnHubGUI == klass.__name__, collect_categories(paths["categories"], displaymode)),
key=lambda c: c.sortOrder)
for c in categories:
ret[c] = collect_spokes(paths["spokes"], c.__name__)
--
1.8.3.1
9 years, 11 months
[anaconda][master][PATCH] Improving the Anaconda CLI help - first batch v2
by Martin Kolman
Got back to the actual help text content after improving the overall Anaconda CLI option
handling infra. Improvements based on v1 feedback:
* dlabel is no longer there with us
* made it more evident that updates image can be on local filesystem and that it only
touches the installation environment and has nothing to do with package updates
* listed some basic factors that might influence memory usage to the memcheck helptext
* marked dnf as experimental and added a url for the DNF project website
* removed trailing hyphen in livecd
More help text improvement batches coming soon. :)
Martin Kolman (1):
Add help texts to some Anaconda CLI options
anaconda | 24 ++++++++++++++++--------
data/anaconda_options.txt | 42 ++++++++++++++++++++++++++++++++++++++++++
2 files changed, 58 insertions(+), 8 deletions(-)
--
1.9.3
9 years, 11 months
[rhel6-branch] fix some crusty old bugs
by David Lehman
David Lehman (5):
Fix handling of LUKS when using onpart. (#840890)
Correctly determine whether any partitioning has been done. (#842920)
Let LVM determine alignment for PV data areas. (#962961)
Remove snapshots as needed when removing LVs. (#1043916)
Look up MD arrays by MD UUID, not FS UUID.
iw/autopart_type.py | 12 ++++++++++--
kickstart.py | 4 ++--
storage/devicelibs/lvm.py | 3 ---
storage/devices.py | 4 ++++
storage/devicetree.py | 3 ++-
5 files changed, 18 insertions(+), 8 deletions(-)
--
1.9.0
9 years, 11 months
[PATCH] Move assureLogoImage to GraphicalUserInterface (#1102238)
by David Shea
This way the backup logo is used on all installs. Change assureLogoImage
to override the background image through CSS since it might be
considered rude to modify the filesystem in certain situations where it
could now be run (image, dirinstall).
---
anaconda | 24 ------------------------
pyanaconda/ui/gui/__init__.py | 29 +++++++++++++++++++++++++++++
2 files changed, 29 insertions(+), 24 deletions(-)
diff --git a/anaconda b/anaconda
index 9c14933..30e91d7 100755
--- a/anaconda
+++ b/anaconda
@@ -136,34 +136,10 @@ def startAuditDaemon():
# auditd will turn into a daemon so catch the immediate child pid now:
os.waitpid(childpid, 0)
-def assureLogoImage():
- # make sure there is a logo image present,
- # otherwise TTY1 will get spammed by errors
- replacement_image_path = None
- logo_path = "/usr/share/anaconda/pixmaps/logo.png"
- header_path = "/usr/share/anaconda/pixmaps/anaconda_header.png"
- sad_smiley_path = "/usr/share/icons/Adwaita/48x48/emotes/face-crying.png"
- if not os.path.exists(logo_path):
- # first try to replace the missing logo with the Anaconda header image
- if os.path.exists(header_path):
- replacement_image_path = header_path
- # if the header image is not present, use a sad smiley from GTK icons
- elif os.path.exists(sad_smiley_path):
- replacement_image_path = sad_smiley_path
-
- if replacement_image_path:
- log.warning("logo image is missing, using a substitute")
- os.symlink(replacement_image_path, logo_path)
- else:
- log.warning("logo image is missing")
-
# function to handle X startup special issues for anaconda
def doStartupX11Actions():
"""Start window manager"""
- # try to make sure a logo image is present
- assureLogoImage()
-
global wm_pid # pid of the anaconda fork where the window manager is running
# now start up the window manager
wm_pid = startMetacityWM()
diff --git a/pyanaconda/ui/gui/__init__.py b/pyanaconda/ui/gui/__init__.py
index a90ce90..70b22a1 100644
--- a/pyanaconda/ui/gui/__init__.py
+++ b/pyanaconda/ui/gui/__init__.py
@@ -277,6 +277,32 @@ class GraphicalUserInterface(UserInterface):
for path in pathlist]
}
+ def _assureLogoImage(self):
+ # make sure there is a logo image present,
+ # otherwise the console will get spammed by errors
+ replacement_image_path = None
+ logo_path = "/usr/share/anaconda/pixmaps/logo.png"
+ header_path = "/usr/share/anaconda/pixmaps/anaconda_header.png"
+ sad_smiley_path = "/usr/share/icons/Adwaita/48x48/emotes/face-crying.png"
+ if not os.path.exists(logo_path):
+ # first try to replace the missing logo with the Anaconda header image
+ if os.path.exists(header_path):
+ replacement_image_path = header_path
+ # if the header image is not present, use a sad smiley from GTK icons
+ elif os.path.exists(sad_smiley_path):
+ replacement_image_path = sad_smiley_path
+
+ if replacement_image_path:
+ log.warning("logo image is missing, using a substitute")
+
+ # Add a new stylesheet overriding the background-image for .logo
+ provider = Gtk.CssProvider()
+ provider.load_from_data(".logo { background-image: url('%s'); }" % replacement_image_path)
+ Gtk.StyleContext.add_provider_for_screen(Gdk.Screen.get_default(), provider,
+ Gtk.STYLE_PROVIDER_PRIORITY_USER)
+ else:
+ log.warning("logo image is missing")
+
@property
def tty_num(self):
return 6
@@ -395,6 +421,9 @@ class GraphicalUserInterface(UserInterface):
Gtk.StyleContext.add_provider_for_screen(Gdk.Screen.get_default(), provider,
Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION)
+ # try to make sure a logo image is present
+ self._assureLogoImage()
+
self._currentAction.window.show_all()
# Do this at the last possible minute.
--
1.9.0
9 years, 11 months
[anaconda] updates related to blivet snapshot support
by David Lehman
This doesn't do anything drastic like allow creating snapshots during
installation. Snapshots will now appear in the device list, but will not be
editable in any way except deletion. Mostly it cleans up a couple of little
pieces that were previously btrfs-specific hacks.
I can see how it might be appealing to not show snapshots in the UI, but that
does limit one's options for making space for new devices. I'm open to
discussion.
David Lehman (3):
Use StorageDevice.direct to detemine if a device is directly
accessible.
Reflect the fact that some block devices cannot be reformatted.
Change emphasis from subvolumes to snapshots in removal warning.
pyanaconda/ui/gui/spokes/custom.py | 23 +++++++++++-----------
.../ui/gui/spokes/lib/custom_storage_helpers.py | 6 +++---
2 files changed, 14 insertions(+), 15 deletions(-)
--
1.9.0
9 years, 11 months
[anaconda:master 0/2] RAID patches
by Anne Mulhern
These will require the changes in the corresponding blivet RAID patches,
so I plan to bump the version number.
The first is big, the second is much smaller. If I could actually profile
I'ld be happier, but I believe that the speedup is noticeable to a human.
The only thing that bothers me is this sequence (which was not introduced
by these patches):
* For, say /, with LVM seleected, press Modify and choose a raid level that
BTRFS and LVM are supposed to share, e.g., RAID0. Save the result.
* Now, change device type to BTRFS, press modify again, and notice that
the RAID level selection is RAID0. Press Cancel or Save.
* Change device type back to LVM, press Modify, again, and the selected
RAID level is now None, not RAID0.
* Go back to BTRFS and notice that the selected RAID level is now 'single',
BTRFS's default.
I think that the simple thing to do here is to make sure that, whenever the
device type is changed to a new one, the RAID level is set back to the default
for that device type. So, in step (2) above, the selected raid level should
be the default for BTRFS, "single".
For step (2), whether Cancel or Save is pressed should matter. If Cancel,
then, on step(3), the previously selected RAID level, RAID0, should be
observed. If Save, then, on Step (3), the default RAID level for LVM, "None",
should be observed.
Note that getting the raid level for an LVM volume group seems to mostly get
None, and this may be the source of the problem. It will always be None,
unless the volume group has exactly one physical volume, because that's what
get_raid_level() does.
None of this was introduced by my changes here. But I think it would probably
be best to fix it, and also make sure that it is not sign of a deeper problem.
Feedback appreciated, thanks.
mulhern (2):
RAID related changes for custom spoke.
Memoize the results for *RaidLevelsSupported() functions
pyanaconda/storage_utils.py | 17 ---
pyanaconda/ui/gui/spokes/custom.glade | 4 -
pyanaconda/ui/gui/spokes/custom.py | 93 ++++++------
.../ui/gui/spokes/lib/custom_storage_helpers.glade | 4 +
.../ui/gui/spokes/lib/custom_storage_helpers.py | 163 ++++++++++++++++++---
5 files changed, 189 insertions(+), 92 deletions(-)
--
1.8.3.1
9 years, 11 months
[anaconda][master][PATCH] Remove the dlabel option
by Martin Kolman
As per Brians comment, I have removed the dlabel option and all the associated
code I have been able to find. I've also removed the dlabel option from the
driverdisc documentation text file, but I'm not sure how factually
correct the new wording is.
Martin Kolman (1):
Remove the dlable option
anaconda | 4 ----
docs/driverdisc.txt | 4 +---
pyanaconda/flags.py | 1 -
3 files changed, 1 insertion(+), 8 deletions(-)
--
1.9.3
9 years, 11 months
[PATCH] Make sure /var/log/anaconda gets copied under the right root.
by Chris Lumens
---
data/post-scripts/99-copy-logs.ks | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/data/post-scripts/99-copy-logs.ks b/data/post-scripts/99-copy-logs.ks
index 0060b90..d1c273a 100644
--- a/data/post-scripts/99-copy-logs.ks
+++ b/data/post-scripts/99-copy-logs.ks
@@ -1,7 +1,7 @@
# Note, this script log will not be copied to the installed system.
%post --nochroot
-mkdir -p /mnt/sysimage/var/log/anaconda
+mkdir -p $ANA_INSTALL_PATH/var/log/anaconda
[ -e /tmp/anaconda.log ] && cp /tmp/anaconda.log $ANA_INSTALL_PATH/var/log/anaconda/anaconda.log
[ -e /tmp/syslog ] && cp /tmp/syslog $ANA_INSTALL_PATH/var/log/anaconda/syslog
[ -e /tmp/X.log ] && cp /tmp/X.log $ANA_INSTALL_PATH/var/log/anaconda/anaconda.xlog
@@ -12,6 +12,6 @@ mkdir -p /mnt/sysimage/var/log/anaconda
[ -e /tmp/yum.log ] && cp /tmp/yum.log $ANA_INSTALL_PATH/var/log/anaconda/anaconda.yum.log
cp /tmp/ks-script*.log $ANA_INSTALL_PATH/var/log/anaconda/
journalctl -b > $ANA_INSTALL_PATH/var/log/anaconda/anaconda.journal.log
-chmod 0600 /mnt/sysimage/var/log/anaconda/*
+chmod 0600 $ANA_INSTALL_PATH/var/log/anaconda/*
%end
--
1.9.0
9 years, 11 months
[PATCH] format.setup in blivet now takes only kwargs.
by Chris Lumens
This is caused by 0e4f67338dfbdd665e7c9aeb220272dcad19b166 in python-blivet.
---
pyanaconda/install.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/pyanaconda/install.py b/pyanaconda/install.py
index 2bdbbd1..d9303cd 100644
--- a/pyanaconda/install.py
+++ b/pyanaconda/install.py
@@ -126,7 +126,7 @@ def moveBootMntToPhysical(storage):
return
bootmnt.format.teardown()
bootmnt.teardown()
- bootmnt.format.setup(bootmnt.format.options, chroot=iutil.getTargetPhysicalRoot())
+ bootmnt.format.setup(options=bootmnt.format.options, chroot=iutil.getTargetPhysicalRoot())
def doInstall(storage, payload, ksdata, instClass):
"""Perform an installation. This method takes the ksdata as prepared by
@@ -217,7 +217,7 @@ def doInstall(storage, payload, ksdata, instClass):
# Explicitly mount the root on the physical sysroot
rootmnt = storage.mountpoints.get('/')
rootmnt.setup()
- rootmnt.format.setup(rootmnt.format.options, chroot=iutil.getTargetPhysicalRoot())
+ rootmnt.format.setup(options=rootmnt.format.options, chroot=iutil.getTargetPhysicalRoot())
payload.prepareMountTargets(storage)
--
1.9.0
9 years, 11 months
[rhel6-branch] Fix typo from commit ed3caa7b (#1039051)
by Brian C. Lane
Related: rhbz#1039051
---
kickstart.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kickstart.py b/kickstart.py
index 1a7c5a8..df24c04 100644
--- a/kickstart.py
+++ b/kickstart.py
@@ -685,7 +685,7 @@ class NetworkData(commands.network.RHEL6_NetworkData):
anaconda.id.network.setHostname(self.hostname)
anaconda.id.network.overrideDHCPhostname = True
- if self.domain
+ if self.domain:
dev.set(("DOMAIN", self.domain))
activate_new_device = False
--
1.9.3
9 years, 11 months