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

Proposed by Andrew Starr-Bochicchio on 2012-06-15
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 Approve on 2012-06-15
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.
Daniel Holbach (dholbach) wrote : Posted in a previous version of this proposal

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

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

Should be fixed

review: Resubmit
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
1=== modified file 'debian/rules'
2--- debian/rules 2012-05-10 19:32:37 +0000
3+++ debian/rules 2012-06-15 15:38:19 +0000
4@@ -9,7 +9,7 @@
5 make epub
6
7 override_dh_compress:
8- dh_compress -X usr/share/doc/ubuntu-packaging-guide/html/
9+ dh_compress -X usr/share/doc/ubuntu-packaging-guide-html/_sources
10
11 override_dh_link:
12 # symlink identical resources.
13
14=== modified file 'debian/scripts/add-languages'
15--- debian/scripts/add-languages 2012-06-13 07:28:34 +0000
16+++ debian/scripts/add-languages 2012-06-15 15:38:19 +0000
17@@ -132,12 +132,12 @@
18 line))
19
20 def add_docbase_files(self, language, template_name):
21+ new_package_name = "%s-%s" % (template_name, language)
22+ docbase_template = os.path.join(self.base_path,
23+ "debian/" + template_name + ".doc-base")
24+ new_docbase_file = os.path.join(self.base_path,
25+ "debian/" + new_package_name + ".doc-base")
26 if template_name.endswith("html"):
27- new_package_name = "%s-%s" % (template_name, language)
28- docbase_template = os.path.join(self.base_path,
29- "debian/" + template_name + ".doc-base")
30- new_docbase_file = os.path.join(self.base_path,
31- "debian/" + new_package_name + ".doc-base")
32 single_template = os.path.join(self.base_path,
33 "debian/" + template_name + ".doc-base.single")
34 new_single_file = os.path.join(self.base_path,
35@@ -146,24 +146,27 @@
36 docbase_template, new_docbase_file)
37 self.write_docbase_file(language, template_name, new_package_name,
38 single_template, new_single_file)
39+ elif template_name.endswith("pdf"):
40+ self.write_docbase_file(language, template_name, new_package_name,
41+ docbase_template, new_docbase_file)
42 else:
43 pass
44
45 def write_docbase_file(self, language, template_name, new_package_name,template_file, new_file):
46+ doc_type = template_name.split("-")[-1]
47 with open(template_file, "r") as template_file:
48 lines = template_file.readlines()
49 with open(new_file, "w") as new_file:
50 for line in lines:
51- if line.startswith("Document:"):
52- line = "Document: " + new_package_name + "\n"
53- elif line.startswith("Index:") | line.startswith("Files:"):
54- line = re.sub("/html", "/html/%s" % language, line)
55- line = re.sub("-html", "-html-%s" % language, line)
56- elif line.startswith("Title:"):
57- line = "Title: Ubuntu Packaging Guide - %s Version\n" % language
58- else:
59- line = line
60- new_file.write(line)
61+ if line.startswith("Document:"):
62+ line = "Document: " + new_package_name + "\n"
63+ elif line.startswith("Index:") | line.startswith("Files:"):
64+ line = re.sub("-%s" % doc_type, "-%s-%s" % (doc_type, language), line)
65+ elif line.startswith("Title:"):
66+ line = "Title: Ubuntu Packaging Guide - %s Version\n" % language
67+ else:
68+ line = line
69+ new_file.write(line)
70
71 def add_package(self, package_name):
72 base_template = "-".join(package_name.split("-")[0:-1])
73
74=== modified file 'debian/ubuntu-packaging-guide-epub.docs'
75--- debian/ubuntu-packaging-guide-epub.docs 2012-05-22 13:18:17 +0000
76+++ debian/ubuntu-packaging-guide-epub.docs 2012-06-15 15:38:19 +0000
77@@ -1,9 +1,1 @@
78-_build/epub/content.opf
79-_build/epub/_images
80-_build/epub/META-INF
81-_build/epub/mimetype
82-_build/epub/search.html
83-_build/epub/_static
84-_build/epub/toc.ncx
85-_build/epub/ubuntu-packaging-guide
86 _build/epub/ubuntu-packaging-guide.epub
87
88=== modified file 'debian/ubuntu-packaging-guide-html.doc-base'
89--- debian/ubuntu-packaging-guide-html.doc-base 2012-05-10 16:29:25 +0000
90+++ debian/ubuntu-packaging-guide-html.doc-base 2012-06-15 15:38:19 +0000
91@@ -7,5 +7,5 @@
92 Section: Text
93
94 Format: HTML
95-Index: /usr/share/doc/ubuntu-packaging-guide-html/html/index.html
96-Files: /usr/share/doc/ubuntu-packaging-guide-html/html/*.html
97+Index: /usr/share/doc/ubuntu-packaging-guide-html/index.html
98+Files: /usr/share/doc/ubuntu-packaging-guide-html/*.html
99
100=== modified file 'debian/ubuntu-packaging-guide-html.docs'
101--- debian/ubuntu-packaging-guide-html.docs 2012-05-22 13:18:17 +0000
102+++ debian/ubuntu-packaging-guide-html.docs 2012-06-15 15:38:19 +0000
103@@ -5,3 +5,4 @@
104 _build/html/*.html
105 _build/html/_images
106 _build/html/_static
107+_build/html/_sources
108
109=== modified file 'debian/ubuntu-packaging-guide-pdf.doc-base'
110--- debian/ubuntu-packaging-guide-pdf.doc-base 2012-05-10 16:29:25 +0000
111+++ debian/ubuntu-packaging-guide-pdf.doc-base 2012-06-15 15:38:19 +0000
112@@ -7,4 +7,4 @@
113 Section: Text
114
115 Format: PDF
116-Files: /usr/share/doc/ubuntu-packaging-guide-pdf/pdf/ubuntu-packaging-guide.pdf.gz
117+Files: /usr/share/doc/ubuntu-packaging-guide-pdf/ubuntu-packaging-guide.pdf.gz

Subscribers

People subscribed via source and target branches