ubuntu-packaging-guide-team team mailing list archive
-
ubuntu-packaging-guide-team team
-
Mailing list archive
-
Message #01149
lp:~andrewsomething/ubuntu-packaging-guide/add-LANGS-to-Makefile into lp:ubuntu-packaging-guide
Andrew Starr-Bochicchio has proposed merging lp:~andrewsomething/ubuntu-packaging-guide/add-LANGS-to-Makefile into lp:ubuntu-packaging-guide.
Requested reviews:
Ubuntu Packaging Guide Team (ubuntu-packaging-guide-team)
Related bugs:
Bug #1067288 in Ubuntu Packaging Guide: "./debian/scripts/add-languages produces empty packages"
https://bugs.launchpad.net/ubuntu-packaging-guide/+bug/1067288
For more details, see:
https://code.launchpad.net/~andrewsomething/ubuntu-packaging-guide/add-LANGS-to-Makefile/+merge/129973
debian/scripts/add-languages: Modify LANGS variable in Makefile when a
language reaches threshold (LP: #1067288).
--
https://code.launchpad.net/~andrewsomething/ubuntu-packaging-guide/add-LANGS-to-Makefile/+merge/129973
Your team Ubuntu Packaging Guide Team is requested to review the proposed merge of lp:~andrewsomething/ubuntu-packaging-guide/add-LANGS-to-Makefile into lp:ubuntu-packaging-guide.
=== modified file 'Makefile'
--- Makefile 2012-10-16 12:14:37 +0000
+++ Makefile 2012-10-16 19:49:25 +0000
@@ -14,7 +14,7 @@
# the i18n builder cannot share the environment and doctrees with the others
PODIR = po
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
-#LANGS = $(basename $(notdir $(wildcard $(PODIR)/*.po)))
+LANGS =
.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext locale
=== modified file 'debian/changelog'
--- debian/changelog 2012-10-12 14:53:27 +0000
+++ debian/changelog 2012-10-16 19:49:25 +0000
@@ -3,6 +3,10 @@
[ Daniel Holbach ]
* Added some additional information to the autopkgtest article.
+ [ Andrew Starr-Bochicchio ]
+ * debian/scripts/add-languages: Modify LANGS variable in Makefile
+ when a language reaches threshold (LP: #1067288).
+
-- Daniel Holbach <daniel.holbach@xxxxxxxxxx> Fri, 12 Oct 2012 16:52:11 +0200
ubuntu-packaging-guide (0.2.4) unstable; urgency=low
=== modified file 'debian/scripts/add-languages'
--- debian/scripts/add-languages 2012-09-03 14:43:05 +0000
+++ debian/scripts/add-languages 2012-10-16 19:49:25 +0000
@@ -41,6 +41,7 @@
self.base_path = os.path.join(self.script_path, "../..")
self.po_path = os.path.join(self.base_path, "po/")
self.control_file = os.path.join(self.base_path, "debian/control")
+ self.makefile = os.path.join(self.base_path, "Makefile")
self.all_pofiles = self.get_all_pofiles()
self.all_languages = self.get_all_languages()
self.semi_complete_pofiles = self.get_semi_complete_pofiles()
@@ -194,9 +195,19 @@
line = line
new_file.write(line)
+ def add_to_makefile(self, language):
+ with open(self.makefile, "r") as makefile:
+ lines = makefile.readlines()
+ with open(self.makefile, "w") as makefile:
+ for line in lines:
+ if line.startswith("LANGS =") and language not in line:
+ line = line.rstrip('\n') + " " + language + '\n'
+ makefile.write(line)
+
def add_package(self, package_name):
base_template = "-".join(package_name.split("-")[0:-1])
language = package_name.split("-")[-1]
+ self.add_to_makefile(language)
self.add_to_control_file(language, base_template)
self.add_installation_files(language, base_template)
self.add_docbase_files(language, base_template)
Follow ups