This patch set should be the last part of the puzzle needed to make the help system in RHEL7 Anaconda complete.
The first patch adds handling for architectural suffixes, as unlike on Fedora, the RHEL7 installation has some content that differs based on the current architecture.
The second patch is a quite minor one - it just redirects the EULA spoke Help! button to show the Initial Setup hub content, as there is not really anything to say about the EULA Spoke.
Martin Kolman (1): Add support for architecture suffixes in help files (#1072033)
pyanaconda/ihelp.py | 42 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-)
For some Anaconda screens there might be multiple help file variants, differentiated by an architecture specific suffix. Other screens that are not influenced by architectural differences have a single version, which uses the "common" prefix. These two don't mix - the given screen is either covered by a single common file or by a set of files with architecture specific suffixes for all supported architectures.
Related: rhbz#1072033 Signed-off-by: Martin Kolman mkolman@redhat.com --- pyanaconda/ihelp.py | 42 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-)
diff --git a/pyanaconda/ihelp.py b/pyanaconda/ihelp.py index 3e7446a..6c9b79a 100644 --- a/pyanaconda/ihelp.py +++ b/pyanaconda/ihelp.py @@ -27,9 +27,13 @@ from pyanaconda.flags import flags from pyanaconda.localization import find_best_locale_match from pyanaconda.constants import DEFAULT_LANG
+import blivet + import logging log = logging.getLogger("anaconda")
+COMMON_HELP_FILE_VARIANT_SUFFIX = "common" + yelp_process = None
def _get_best_help_file(help_folder, help_file): @@ -93,8 +97,44 @@ def get_help_path(help_file, instclass): # help l10n handling
if help_file: + # Some of the RHEL7 installation guide pages might be marked as "common", + # meaning that their content is common for all architectures, while + # other pages might be architecture specific. These two categories + # are mutually exclusive - if there is a common variant, there will be + # no arch specific variant and if there are arch specific variants, + # there will be no common variant. + + #help_path = _get_best_help_file(instclass.help_folder, help_file) + + # check for the common variant + file_head, file_tail = os.path.splitext(help_file) + + help_file = "%s-%s%s" % (file_head, COMMON_HELP_FILE_VARIANT_SUFFIX, file_tail) + help_path = _get_best_help_file(instclass.help_folder, help_file) + if help_path: + log.debug("found a common help file variant at %s", help_path) + return help_path + + # check for the arch specific variant + + # the documentation files don't differentiate between 32bit and 64bit x86 + # and just use a "x86" suffix for both + if blivet.arch.isX86: + arch = "x86" + # same thing for s390 (31 bit) and s390x (64 bit), they are just "s390" + elif blivet.arch.isS390(): + arch = "s390" + # 32 bit PPC is no longer supported in RHEL and both 64 bit PPC variants (BE and LE) + # are covered with the "ppc64" suffix + elif blivet.arch.isPPC(): + arch = "ppc64" + else: + arch = blivet.arch.getArch() + + help_file = "%s-%s%s" % (file_head, arch, file_tail) help_path = _get_best_help_file(instclass.help_folder, help_file) - if help_path is not None: + if help_path: + log.debug("found arch specific help file variant at %s", help_path) return help_path
# the screen did not have a helpFile defined or the defined help file
On 01/15/2015 02:24 PM, Martin Kolman wrote:
#help_path = _get_best_help_file(instclass.help_folder, help_file)
I think you can just get rid of this line, since the real version is the same thing a few lines down. Other than that, ack to both of these.
----- Original Message -----
From: "David Shea" dshea@redhat.com To: anaconda-patches@lists.fedorahosted.org Sent: Friday, January 16, 2015 3:23:17 PM Subject: Re: [anaconda][rhel7-branch][PATCH] Add support for architecture suffixes in help files (#1072033)
On 01/15/2015 02:24 PM, Martin Kolman wrote:
#help_path = _get_best_help_file(instclass.help_folder, help_file)I think you can just get rid of this line, since the real version is the same thing a few lines down.
Good catch, fixing locally, thanks! :)
Other than that, ack to both of these. _______________________________________________ anaconda-patches mailing list anaconda-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches
On Thu, 2015-01-15 at 20:24 +0100, Martin Kolman wrote:
For some Anaconda screens there might be multiple help file variants, differentiated by an architecture specific suffix. Other screens that are not influenced by architectural differences have a single version, which uses the "common" prefix.
You call it suffix ^^^ everywhere else.
----- Original Message -----
From: "Vratislav Podzimek" vpodzime@redhat.com To: "anaconda patch review" anaconda-patches@lists.fedorahosted.org Sent: Monday, January 19, 2015 7:46:44 AM Subject: Re: [anaconda][rhel7-branch][PATCH] Add support for architecture suffixes in help files (#1072033)
On Thu, 2015-01-15 at 20:24 +0100, Martin Kolman wrote:
For some Anaconda screens there might be multiple help file variants, differentiated by an architecture specific suffix. Other screens that are not influenced by architectural differences have a single version, which uses the "common" prefix.
You call it suffix ^^^ everywhere else.
Oops! If is suffix of course. Unfortunately this patch has been already pushed in the meantime once acked for the first time. So there is not much to do about it now other than remembering that all the architecture or common indicators are indeed *suffixes*! :) Well unless we want to revert that commit and replace it with one that has a correct commit message ?
-- Vratislav Podzimek
Anaconda Rider | Red Hat, Inc. | Brno - Czech Republic
anaconda-patches mailing list anaconda-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches
The EULA spoke is self-explanatory and the hub help file covers Initial Setup in general.
Related: rhbz#1072033 Signed-off-by: Martin Kolman mkolman@redhat.com --- initial_setup/gui/spokes/eula.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/initial_setup/gui/spokes/eula.py b/initial_setup/gui/spokes/eula.py index 27d348f..0d568df 100644 --- a/initial_setup/gui/spokes/eula.py +++ b/initial_setup/gui/spokes/eula.py @@ -24,7 +24,11 @@ class EULAspoke(FirstbootOnlySpokeMixIn, NormalSpoke): builderObjects = ["eulaBuffer", "eulaWindow"] mainWidgetName = "eulaWindow" uiFile = "eula.glade" - helpFile = "EULAspoke.xml" + # The EULA spoke is self-explanatory, so just redirect its + # help button to the Initial Setup Hub help file, + # which covers the overall theory of Initial Setup + # usage. + helpFile = "InitialSetupHub.xml"
icon = "application-certificate-symbolic" title = N_("_LICENSE INFORMATION")
anaconda-patches@lists.fedorahosted.org