Bug#569136: Chinese pages not updated properly (security/index, security/YYYY/index, homepage)
Hello
I have manually rebuilt the Chinese homepage (deleted the
index.zh-*.html files in www-master.debian.org, and run
update-parts-pabs to generate index with no subdirectories).
Attached you can find a patch for the /english/Makefile, which considers
Chinese variants when building index.wml, so this issue does not happen
again (hopefully).
I've tested in my local environment and it builds ok. I've tried
touching a file in english/security/2017 and the old Makefile does not
build the Chinese variants for the homepage, but the one containing this
patch builds them.
I plan to apply it in a week or so. If somebody else reviews it and
think it's safe to apply it sooner, please go ahead.
Note: the patch may be changed depending on the advice obtained about
using "=" or ":=" (see
https://lists.debian.org/debian-www/2017/11/msg00075.html for reference).
Best regards
--
Laura Arjona Reina
https://wiki.debian.org/LauraArjona
Index: Makefile
===================================================================
RCS file: /cvs/webwml/webwml/english/Makefile,v
retrieving revision 1.102
diff -u -r1.102 Makefile
--- Makefile 23 Jul 2017 08:31:47 -0000 1.102
+++ Makefile 24 Nov 2017 16:45:03 -0000
@@ -14,11 +14,13 @@
include $(WMLBASE)/Make.lang
ifndef SUBLANG
+INDEXPAGE = index.$(LANGUAGE).html
SITEMAP = sitemap.$(LANGUAGE).html
DESTSITEMAP = $(HTMLDIR)/$(SITEMAP)
SEARCHXML = search.$(LANGUAGE).xml
DESTSEARCHXML = $(HTMLDIR)/$(SEARCHXML)
else
+INDEXPAGE = $(sort $(foreach i,$(SUBLANG),$(subst index,index.$(LANGUAGE)-$(i),index.html)))
SITEMAP = $(sort $(foreach i,$(SUBLANG),\
$(patsubst %.wml,%.$(LANGUAGE)-$(i).html,sitemap.wml)))
DESTSITEMAP = $(patsubst %.html,$(HTMLDIR)/%.html,$(SITEMAP))
@@ -26,13 +28,20 @@
DESTSEARCHXML = $(patsubst %.xml,$(HTMLDIR)/%.xml,$(SEARCHXML))
endif
-index.$(LANGUAGE).html: index.wml $(TEMPLDIR)/mainpage.wml $(GETTEXTDEP) \
+$(INDEXPAGE): index.wml $(TEMPLDIR)/mainpage.wml $(GETTEXTDEP) \
$(wildcard News/$(CUR_YEAR)/[0-9]*.wml) $(wildcard $(ENGLISHSRCDIR)/News/$(CUR_YEAR)/[0-9]*.wml) \
$(wildcard News/$(CUR_YEAR)/[0-9]*.title) \
$(wildcard security/$(CUR_YEAR)/dsa-[0-9]*.wml) $(wildcard $(ENGLISHSRCDIR)/security/$(CUR_YEAR)/dsa-[0-9]*.wml) \
$(TEMPLDIR)/ctime.wml $(TEMPLDIR)/recent_list.wml $(TEMPLDIR)/languages.wml \
$(TEMPLDIR)/release_info.wml $(TEMPLDIR)/release_images.wml
+ifeq "$(LANGUAGE)" "zh"
+ @echo -n "Processing $(<F): "
+ $(shell echo $(WML) | perl -pe 's,:.zh-(..)\.html,:index.zh-$$1.html,g') \
+ $(shell egrep '^-D (CUR_|CHAR)' ../.wmlrc) index.wml
+ @$(GENERATE_ZH_VARIANTS) index html
+else
$(WML) index.wml
+endif
$(SITEMAP): $(ENGLISHDIR)/sitemap.wml $(TEMPLDIR)/card.wml \
$(TEMPLDIR)/links.tags.wml $(TEMPLDIR)/template.wml $(GETTEXTDEP) \
Reply to: