Merge lp:~andrewsomething/ubuntu-packaging-guide/961936 into lp:ubuntu-packaging-guide

Proposed by Andrew Starr-Bochicchio
Status: Merged
Merged at revision: 114
Proposed branch: lp:~andrewsomething/ubuntu-packaging-guide/961936
Merge into: lp:ubuntu-packaging-guide
Diff against target: 117 lines (+23/-27)
6 files modified
debian/rules (+1/-1)
debian/scripts/add-languages (+18/-15)
debian/ubuntu-packaging-guide-epub.docs (+0/-8)
debian/ubuntu-packaging-guide-html.doc-base (+2/-2)
debian/ubuntu-packaging-guide-html.docs (+1/-0)
debian/ubuntu-packaging-guide-pdf.doc-base (+1/-1)
To merge this branch: bzr merge lp:~andrewsomething/ubuntu-packaging-guide/961936
Reviewer Review Type Date Requested Status
Daniel Holbach (community) Approve
Andrew Starr-Bochicchio Pending
Review via email: mp+110541@code.launchpad.net

This proposal supersedes a proposal from 2012-06-13.

Description of the change

A few more details regarding bug #961936.

There's still actually an issue with the singlehtml stuff. It's getting installed to /usr/share/doc/ubuntu-packaging-guide-html/index.html and then overwritten by the multipage html's index.html by dh_installdocs. I'm not entirely sure how to go about fixing that right now...

To post a comment you must log in.
Revision history for this message
Daniel Holbach (dholbach) wrote : Posted in a previous version of this proposal

Hum, there seems to be a conflict in the merge.

Revision history for this message
Andrew Starr-Bochicchio (andrewsomething) wrote : Posted in a previous version of this proposal

Should be fixed

review: Needs Resubmitting
Revision history for this message
Daniel Holbach (dholbach) wrote :

Great work! :)

We might have to fix the developer.u.c deployment script, but we'll work that out. :)

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'debian/rules'
--- debian/rules 2012-05-10 19:32:37 +0000
+++ debian/rules 2012-06-15 15:38:19 +0000
@@ -9,7 +9,7 @@
9 make epub9 make epub
1010
11override_dh_compress:11override_dh_compress:
12 dh_compress -X usr/share/doc/ubuntu-packaging-guide/html/12 dh_compress -X usr/share/doc/ubuntu-packaging-guide-html/_sources
1313
14override_dh_link:14override_dh_link:
15 # symlink identical resources.15 # symlink identical resources.
1616
=== modified file 'debian/scripts/add-languages'
--- debian/scripts/add-languages 2012-06-13 07:28:34 +0000
+++ debian/scripts/add-languages 2012-06-15 15:38:19 +0000
@@ -132,12 +132,12 @@
132 line))132 line))
133133
134 def add_docbase_files(self, language, template_name):134 def add_docbase_files(self, language, template_name):
135 new_package_name = "%s-%s" % (template_name, language)
136 docbase_template = os.path.join(self.base_path,
137 "debian/" + template_name + ".doc-base")
138 new_docbase_file = os.path.join(self.base_path,
139 "debian/" + new_package_name + ".doc-base")
135 if template_name.endswith("html"):140 if template_name.endswith("html"):
136 new_package_name = "%s-%s" % (template_name, language)
137 docbase_template = os.path.join(self.base_path,
138 "debian/" + template_name + ".doc-base")
139 new_docbase_file = os.path.join(self.base_path,
140 "debian/" + new_package_name + ".doc-base")
141 single_template = os.path.join(self.base_path,141 single_template = os.path.join(self.base_path,
142 "debian/" + template_name + ".doc-base.single")142 "debian/" + template_name + ".doc-base.single")
143 new_single_file = os.path.join(self.base_path,143 new_single_file = os.path.join(self.base_path,
@@ -146,24 +146,27 @@
146 docbase_template, new_docbase_file)146 docbase_template, new_docbase_file)
147 self.write_docbase_file(language, template_name, new_package_name,147 self.write_docbase_file(language, template_name, new_package_name,
148 single_template, new_single_file)148 single_template, new_single_file)
149 elif template_name.endswith("pdf"):
150 self.write_docbase_file(language, template_name, new_package_name,
151 docbase_template, new_docbase_file)
149 else:152 else:
150 pass153 pass
151154
152 def write_docbase_file(self, language, template_name, new_package_name,template_file, new_file):155 def write_docbase_file(self, language, template_name, new_package_name,template_file, new_file):
156 doc_type = template_name.split("-")[-1]
153 with open(template_file, "r") as template_file:157 with open(template_file, "r") as template_file:
154 lines = template_file.readlines()158 lines = template_file.readlines()
155 with open(new_file, "w") as new_file:159 with open(new_file, "w") as new_file:
156 for line in lines:160 for line in lines:
157 if line.startswith("Document:"):161 if line.startswith("Document:"):
158 line = "Document: " + new_package_name + "\n"162 line = "Document: " + new_package_name + "\n"
159 elif line.startswith("Index:") | line.startswith("Files:"):163 elif line.startswith("Index:") | line.startswith("Files:"):
160 line = re.sub("/html", "/html/%s" % language, line)164 line = re.sub("-%s" % doc_type, "-%s-%s" % (doc_type, language), line)
161 line = re.sub("-html", "-html-%s" % language, line)165 elif line.startswith("Title:"):
162 elif line.startswith("Title:"):166 line = "Title: Ubuntu Packaging Guide - %s Version\n" % language
163 line = "Title: Ubuntu Packaging Guide - %s Version\n" % language167 else:
164 else:168 line = line
165 line = line169 new_file.write(line)
166 new_file.write(line)
167170
168 def add_package(self, package_name):171 def add_package(self, package_name):
169 base_template = "-".join(package_name.split("-")[0:-1])172 base_template = "-".join(package_name.split("-")[0:-1])
170173
=== modified file 'debian/ubuntu-packaging-guide-epub.docs'
--- debian/ubuntu-packaging-guide-epub.docs 2012-05-22 13:18:17 +0000
+++ debian/ubuntu-packaging-guide-epub.docs 2012-06-15 15:38:19 +0000
@@ -1,9 +1,1 @@
1_build/epub/content.opf
2_build/epub/_images
3_build/epub/META-INF
4_build/epub/mimetype
5_build/epub/search.html
6_build/epub/_static
7_build/epub/toc.ncx
8_build/epub/ubuntu-packaging-guide
9_build/epub/ubuntu-packaging-guide.epub1_build/epub/ubuntu-packaging-guide.epub
102
=== modified file 'debian/ubuntu-packaging-guide-html.doc-base'
--- debian/ubuntu-packaging-guide-html.doc-base 2012-05-10 16:29:25 +0000
+++ debian/ubuntu-packaging-guide-html.doc-base 2012-06-15 15:38:19 +0000
@@ -7,5 +7,5 @@
7Section: Text7Section: Text
88
9Format: HTML9Format: HTML
10Index: /usr/share/doc/ubuntu-packaging-guide-html/html/index.html10Index: /usr/share/doc/ubuntu-packaging-guide-html/index.html
11Files: /usr/share/doc/ubuntu-packaging-guide-html/html/*.html11Files: /usr/share/doc/ubuntu-packaging-guide-html/*.html
1212
=== modified file 'debian/ubuntu-packaging-guide-html.docs'
--- debian/ubuntu-packaging-guide-html.docs 2012-05-22 13:18:17 +0000
+++ debian/ubuntu-packaging-guide-html.docs 2012-06-15 15:38:19 +0000
@@ -5,3 +5,4 @@
5_build/html/*.html5_build/html/*.html
6_build/html/_images6_build/html/_images
7_build/html/_static7_build/html/_static
8_build/html/_sources
89
=== modified file 'debian/ubuntu-packaging-guide-pdf.doc-base'
--- debian/ubuntu-packaging-guide-pdf.doc-base 2012-05-10 16:29:25 +0000
+++ debian/ubuntu-packaging-guide-pdf.doc-base 2012-06-15 15:38:19 +0000
@@ -7,4 +7,4 @@
7Section: Text7Section: Text
88
9Format: PDF9Format: PDF
10Files: /usr/share/doc/ubuntu-packaging-guide-pdf/pdf/ubuntu-packaging-guide.pdf.gz10Files: /usr/share/doc/ubuntu-packaging-guide-pdf/ubuntu-packaging-guide.pdf.gz

Subscribers

People subscribed via source and target branches