Merge lp:~vorlon/command-not-found/dh_python2 into lp:~zyga/command-not-found/trunk

Proposed by Steve Langasek on 2011-06-10
Status: Merged
Merge reported by: Zygmunt Krynicki
Merged at revision: not available
Proposed branch: lp:~vorlon/command-not-found/dh_python2
Merge into: lp:~zyga/command-not-found/trunk
Diff against target: 284 lines (+182/-9) (has conflicts)
6 files modified
CommandNotFound/client_misc.py (+28/-1)
debian/changelog (+135/-0)
debian/control (+5/-2)
debian/rules (+3/-3)
pre-build.sh (+1/-1)
update-from-web.sh (+10/-2)
Text conflict in CommandNotFound/client_misc.py
Text conflict in debian/changelog
Text conflict in debian/control
To merge this branch: bzr merge lp:~vorlon/command-not-found/dh_python2
Reviewer Review Type Date Requested Status
Michael Vogt (community) 2011-06-10 Approve on 2011-06-10
Review via email: mp+64112@code.launchpad.net

Description of the change

Would have pushed this directly, but I can't figure out where the UnifiedDataExtractor referenced in the pre-build hook comes from... please document ;)

To post a comment you must log in.
Michael Vogt (mvo) wrote :

Thanks for this branch! I merged it into trunk now.

I also fixed the pre-build hook. It used to require a manual run of
"update-from-web.sh". This is done automatically now so bzr-buildpackage
will just DTRT.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'CommandNotFound/client_misc.py'
2--- CommandNotFound/client_misc.py 2010-04-06 23:50:44 +0000
3+++ CommandNotFound/client_misc.py 2011-06-10 03:37:23 +0000
4@@ -27,6 +27,33 @@
5 result.append(row)
6 return result
7
8+<<<<<<< TREE
9+=======
10+class ProgramDatabase:
11+ (PACKAGE, BASENAME_PATH) = range(2)
12+ def __init__(self, filename):
13+ basename = os.path.basename(filename)
14+ (self.arch, self.component) = basename.split(".")[0].split("-")
15+ self.db = BinaryDatabase(filename)
16+ def lookup(self, command):
17+ result = self.db.lookup(command)
18+ if result:
19+ return result.split("|")
20+ else:
21+ return []
22+
23+def similar_words(word):
24+ """ return a set with spelling1 distance alternative spellings
25+
26+ based on http://norvig.com/spell-correct.html"""
27+ alphabet = 'abcdefghijklmnopqrstuvwxyz-_0123456789'
28+ s = [(word[:i], word[i:]) for i in range(len(word) + 1)]
29+ deletes = [a + b[1:] for a, b in s if b]
30+ transposes = [a + b[1] + b[0] + b[2:] for a, b in s if len(b)>1]
31+ replaces = [a + c + b[1:] for a, b in s for c in alphabet if b]
32+ inserts = [a + c + b for a, b in s for c in alphabet]
33+ return set(deletes + transposes + replaces + inserts)
34+>>>>>>> MERGE-SOURCE
35
36 class CommandNotFound:
37 programs_dir = "programs.d"
38@@ -135,7 +162,7 @@
39 if len(missing) > 0:
40 print >>sys.stderr, _("The command could not be located because '%s' is not included in the PATH environment variable.") % ":".join(missing)
41 if "sbin" in ":".join(missing):
42- print >>sys.stderr, _("This is most likely caused by the lack of administrative priviledges associated with your user account.")
43+ print >>sys.stderr, _("This is most likely caused by the lack of administrative privileges associated with your user account.")
44 return False
45
46 # do not give advice if we are in a situation where apt-get
47
48=== modified file 'debian/changelog'
49--- debian/changelog 2010-04-06 23:50:44 +0000
50+++ debian/changelog 2011-06-10 03:37:23 +0000
51@@ -1,3 +1,4 @@
52+<<<<<<< TREE
53 command-not-found (0.2.42) lucid; urgency=low
54
55 * new upstream release
56@@ -10,6 +11,140 @@
57
58 -- Zygmunt Krynicki <zkrynicki@gmail.com> Wed, 10 Mar 2010 13:55:00 +0100
59
60+=======
61+command-not-found (0.2.41ubuntu3) UNRELEASED; urgency=low
62+
63+ * Migrate to dh_python2. LP: #788514.
64+
65+ -- Steve Langasek <steve.langasek@ubuntu.com> Fri, 10 Jun 2011 02:58:39 +0000
66+
67+command-not-found (0.2.41ubuntu2) natty; urgency=low
68+
69+ * updated for final natty
70+
71+ -- Michael Vogt <michael.vogt@ubuntu.com> Tue, 19 Apr 2011 13:07:19 +0200
72+
73+command-not-found (0.2.41ubuntu1) natty; urgency=low
74+
75+ * updated to current natty
76+ * updated to include ports.ubuntu.com as well in the scan.data
77+ set (LP: #533031)
78+
79+ -- Michael Vogt <michael.vogt@ubuntu.com> Tue, 05 Apr 2011 14:15:19 +0200
80+
81+command-not-found (0.2.40ubuntu21) natty; urgency=low
82+
83+ * scan.data:
84+ - updated for beta1
85+
86+ -- Michael Vogt <michael.vogt@ubuntu.com> Fri, 25 Mar 2011 21:48:16 +0100
87+
88+command-not-found (0.2.40ubuntu20) natty; urgency=low
89+
90+ * scan.data:
91+ - updated for alpha3
92+
93+ -- Michael Vogt <michael.vogt@ubuntu.com> Tue, 01 Mar 2011 10:11:33 +0100
94+
95+command-not-found (0.2.40ubuntu19) natty; urgency=low
96+
97+ * scan.data:
98+ - updated to current natty
99+
100+ -- Michael Vogt <michael.vogt@ubuntu.com> Thu, 17 Feb 2011 17:08:56 +0100
101+
102+command-not-found (0.2.40ubuntu18) natty; urgency=low
103+
104+ * scan.data:
105+ - updated to current natty
106+
107+ -- Michael Vogt <michael.vogt@ubuntu.com> Thu, 27 Jan 2011 16:56:22 +0100
108+
109+command-not-found (0.2.40ubuntu17) natty; urgency=low
110+
111+ * scan.data:
112+ - updated to current natty
113+
114+ -- Michael Vogt <michael.vogt@ubuntu.com> Fri, 07 Jan 2011 11:06:41 +0100
115+
116+command-not-found (0.2.40ubuntu16) natty; urgency=low
117+
118+ * scan.data:
119+ - updated to current natty
120+
121+ -- Michael Vogt <michael.vogt@ubuntu.com> Thu, 02 Dec 2010 14:26:56 +0100
122+
123+command-not-found (0.2.40ubuntu15) maverick; urgency=low
124+
125+ * scan.data:
126+ - updated to current maverick
127+
128+ -- Michael Vogt <michael.vogt@ubuntu.com> Thu, 16 Sep 2010 15:54:41 +0200
129+
130+command-not-found (0.2.40ubuntu14) maverick; urgency=low
131+
132+ * scan.data:
133+ - updated for maverick beta
134+
135+ -- Michael Vogt <michael.vogt@ubuntu.com> Fri, 27 Aug 2010 17:15:58 +0200
136+
137+command-not-found (0.2.40ubuntu13) maverick; urgency=low
138+
139+ * debian/rules:
140+ - generate pot during build (LP: #549106), thanks to
141+ David Planella
142+
143+ -- Michael Vogt <michael.vogt@ubuntu.com> Fri, 13 Aug 2010 12:23:33 +0200
144+
145+command-not-found (0.2.40ubuntu12) maverick; urgency=low
146+
147+ * scan.data:
148+ - updated for maverick alpha-3
149+
150+ -- Michael Vogt <michael.vogt@ubuntu.com> Wed, 04 Aug 2010 11:59:09 +0200
151+
152+command-not-found (0.2.40ubuntu11) maverick; urgency=low
153+
154+ * scan.data:
155+ - updated for maverick alpha-2
156+
157+ -- Michael Vogt <michael.vogt@ubuntu.com> Wed, 30 Jun 2010 10:13:52 +0200
158+
159+command-not-found (0.2.40ubuntu10) maverick; urgency=low
160+
161+ [ Rolf Leggewie ]
162+ * fix spelling error s/priviledge/privilege/. LP: #574577
163+
164+ [ Michael Vogt ]
165+ * scan.data:
166+ - updated for maverick alpha-1
167+
168+ -- Michael Vogt <michael.vogt@ubuntu.com> Mon, 31 May 2010 16:55:04 +0200
169+
170+command-not-found (0.2.40ubuntu5) lucid; urgency=low
171+
172+ * scan.data:
173+ - updated for RC
174+
175+ -- Michael Vogt <michael.vogt@ubuntu.com> Thu, 15 Apr 2010 09:59:35 +0200
176+
177+command-not-found (0.2.40ubuntu4) lucid; urgency=low
178+
179+ * updated for beta2
180+
181+ -- Michael Vogt <michael.vogt@ubuntu.com> Tue, 06 Apr 2010 08:45:24 +0200
182+
183+command-not-found (0.2.40ubuntu3) lucid; urgency=low
184+
185+ * CommandNotFound/CommandNotFound.py:
186+ - cherry pick "add numbers to the alphabet used for suggestions "
187+ from trunk (r116) (LP: #507760)
188+ * scan.data:
189+ - updated for beta-1
190+
191+ -- Michael Vogt <michael.vogt@ubuntu.com> Mon, 15 Mar 2010 09:36:32 +0100
192+
193+>>>>>>> MERGE-SOURCE
194 command-not-found (0.2.40ubuntu2) lucid; urgency=low
195
196 * scan.data:
197
198=== modified file 'debian/control'
199--- debian/control 2010-04-06 23:50:44 +0000
200+++ debian/control 2011-06-10 03:37:23 +0000
201@@ -3,15 +3,18 @@
202 Priority: optional
203 Maintainer: Michael Vogt <michael.vogt@ubuntu.com>
204 XSBC-Original-Maintainer: Zygmunt Krynicki <zkrynicki@gmail.com>
205-Build-Depends: debhelper (>= 5.0.38), python, python-dev, python-central (>= 0.5.6), devscripts, intltool, python-apt (>= 0.6.12), python-gdbm
206+Build-Depends: debhelper (>= 5.0.38), python, python-dev (>= 2.6.6-3~), devscripts, intltool, python-apt (>= 0.6.12), python-gdbm
207 Standards-Version: 3.7.2
208-XS-Python-Version: all
209 XS-Vcs-Bzr: http://launchpad.net/~ubuntu-core-dev/command-not-found/ubuntu
210
211 Package: command-not-found
212 Architecture: all
213+<<<<<<< TREE
214 Depends: ${python:Depends}, ${misc:Depends}, python-apt, command-not-found-data, python-gdbm, python-dbus, python-gobject, lsb-release
215 XB-Python-Version: ${python:Versions}
216+=======
217+Depends: ${python:Depends}, ${misc:Depends}, python-apt, command-not-found-data, python-gdbm, lsb-release
218+>>>>>>> MERGE-SOURCE
219 Description: Suggest installation of packages in interactive bash sessions
220 This package will install a handler for command_not_found that looks up
221 programs not currently installed but available from the repositories.
222
223=== modified file 'debian/rules'
224--- debian/rules 2010-04-06 23:50:44 +0000
225+++ debian/rules 2011-06-10 03:37:23 +0000
226@@ -38,7 +38,7 @@
227 # Add here commands to compile the package.
228 #$(MAKE)
229 ./setup.py build
230-
231+ (cd po; intltool-update -p -g command-not-found)
232 touch build-stamp
233
234 clean:
235@@ -55,7 +55,7 @@
236
237 # clean the database files as well
238 find . -name "*.gdb" -exec rm {} \;
239-
240+ find . -name "*.pot" -exec rm {} \;
241 dh_clean
242
243 install: build
244@@ -113,7 +113,7 @@
245 dh_strip
246 dh_compress
247 dh_fixperms
248- DH_PYCENTRAL=include-links dh_pycentral
249+ dh_python2
250 dh_installdeb
251 dh_shlibdeps
252 dh_gencontrol
253
254=== modified file 'pre-build.sh'
255--- pre-build.sh 2009-01-30 10:25:20 +0000
256+++ pre-build.sh 2011-06-10 03:37:23 +0000
257@@ -2,4 +2,4 @@
258
259 # meh, ugly hack :/ but I don't want to have the scan.data stuff
260 # in bzr
261-cp ../../ubuntu/UnifiedDataExtractor/scan.data UnifiedDataExtractor/
262+cp ../../trunk/UnifiedDataExtractor/scan.data UnifiedDataExtractor/
263
264=== modified file 'update-from-web.sh'
265--- update-from-web.sh 2009-06-30 08:01:27 +0000
266+++ update-from-web.sh 2011-06-10 03:37:23 +0000
267@@ -1,7 +1,15 @@
268 #!/bin/sh
269
270+
271 cd UnifiedDataExtractor
272-wget http://people.ubuntu.com/~mvo/command-not-found/scan.data-latest
273+
274+# backup copy
275 cp scan.data scan.data-old
276-mv scan.data-latest scan.data
277+
278+# rookery has the normal archive
279+wget -O scan.1 http://rookery.ubuntu.com/~mvo/command-not-found/scan.data-latest
280+# frei has ports.ubuntu.com
281+wget -O scan.2 http://rookery.ubuntu.com/~mvo/command-not-found-ports/scan.data-latest
282+# concat
283+cat scan.1 scan.2 > scan.data
284 ./diff-scan-data scan.data-old scan.data|less

Subscribers

People subscribed via source and target branches