[anaconda][f21-branch][PATCH] Include help content in the Anaconda tarball

Martin Kolman mkolman at redhat.com
Fri Nov 7 15:01:04 UTC 2014


When creating the Anaconda tarball clone the Installation Guide
repository, run a help processing script (which is part of the repo)
that generates help content for Anaconda and then include it in the tarball.

Signed-off-by: Martin Kolman <mkolman at redhat.com>
---
 Makefile.am                 | 25 ++++++++++++++++++++++---
 data/help/en-US/Makefile.am |  4 ++--
 2 files changed, 24 insertions(+), 5 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 37a05b5..f5f7ab2 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -47,6 +47,8 @@ ARCHIVE_TAG   = $(PACKAGE_NAME)-$(PACKAGE_VERSION)-$(PACKAGE_RELEASE)
 TX_PULL_ARGS = -a --disable-overwrite
 TX_PUSH_ARGS = -s
 
+INSTALLATION_GUIDE_REPO_URL = git://git.fedorahosted.org/git/docs/install-guide.git
+
 tag:
 	@git tag -s -a -m "Tag as $(ARCHIVE_TAG)" $(ARCHIVE_TAG)
 	@echo "Tagged as $(ARCHIVE_TAG)"
@@ -62,11 +64,11 @@ po-empty:
 		exit 1 ; \
 	done
 
-scratch: po-empty
+scratch: po-empty get-help
 	$(MAKE) ARCHIVE_TAG=HEAD dist
 	git checkout -- $(srcdir)/po/$(PACKAGE_NAME).pot
 
-scratch-bumpver: po-empty
+scratch-bumpver: po-empty get-help
 	@opts="-n $(PACKAGE_NAME) -v $(PACKAGE_VERSION) -r $(PACKAGE_RELEASE) -b $(PACKAGE_BUGREPORT)" ; \
 	if [ ! -z "$(IGNORE)" ]; then \
 		opts="$${opts} -i $(IGNORE)" ; \
@@ -83,7 +85,7 @@ scratch-bumpver: po-empty
 	( cd $(srcdir) && scripts/makebumpver $${opts} ) || exit 1 ; \
 	$(MAKE) -C po $(PACKAGE_NAME).pot-update ; 
 
-release:
+release: get-help
 	$(MAKE) dist && $(MAKE) tag && git checkout -- $(srcdir)/po/$(PACKAGE_NAME).pot
 
 api:
@@ -188,3 +190,20 @@ runglade:
 	GLADE_CATALOG_SEARCH_PATH=$(srcdir)/widgets/glade \
 	GLADE_MODULE_SEARCH_PATH=$(builddir)/widgets/src/.libs \
 	glade ${GLADE_FILE}
+
+
+# Get content for the Anaconda built-in help system by cloning the
+# installation guide git repository and running the help processing
+# script (it is part of the repository).
+# Once the help content has been generated copy it to our help folder,
+# so that it can be included in the tarball.
+# Skip the git clone if the repository already exists but run git pull
+# to make sure it is up to date. We also clone the repository
+# without history as it si rather big (>400 MB!), which is quite
+# an overkill for <100 kB of help conent. :)
+get-help:
+	if [ ! -d "install-guide" ]; then \
+		git clone --depth=1 $(INSTALLATION_GUIDE_REPO_URL) ; \
+	fi ; \
+	( cd install-guide && git pull --rebase && python prepare_anaconda_help_content.py )
+	cp -r install-guide/anaconda_help_content/* $(srcdir)/data/help
diff --git a/data/help/en-US/Makefile.am b/data/help/en-US/Makefile.am
index b7aa1bc..b97e343 100644
--- a/data/help/en-US/Makefile.am
+++ b/data/help/en-US/Makefile.am
@@ -17,7 +17,7 @@
 #
 # Author: Martin Kolman <mkolman at redhat.com>
 
-enplaceholderdir              = $(datadir)/anaconda/help/en-US
-dist_enplaceholder_DATA       = FedoraPlaceholder.html FedoraPlaceholderWithLinks.html RHEL7Placeholder.html RHEL7PlaceholderWithLinks.html
+enhelpcontentdir              = $(datadir)/anaconda/help/en-US
+dist_enhelpcontent_DATA       = *.html *.xml
 
 MAINTAINERCLEANFILES = Makefile.in
-- 
1.9.3



More information about the anaconda-patches mailing list