Merge lp:~danilo/ubuntu/raring/command-not-found/python2-package into lp:ubuntu/raring/command-not-found

Proposed by Данило Шеган
Status: Merged
Merge reported by: Barry Warsaw
Merged at revision: not available
Proposed branch: lp:~danilo/ubuntu/raring/command-not-found/python2-package
Merge into: lp:ubuntu/raring/command-not-found
Diff against target: 90 lines (+25/-2)
5 files modified
debian/changelog (+6/-0)
debian/command-not-found.install (+1/-1)
debian/control (+14/-0)
debian/python-commandnotfound.install (+1/-0)
debian/rules (+3/-1)
To merge this branch: bzr merge lp:~danilo/ubuntu/raring/command-not-found/python2-package
Reviewer Review Type Date Requested Status
Barry Warsaw (community) Approve
Ubuntu branches Pending
Review via email: mp+149494@code.launchpad.net

Description of the change

Provide a python-commandnotfound package which installs CommandNotFound into Python2 paths as well.

This is a solution for bug 1123193.

Some improvements already done as per https://code.launchpad.net/~danilo/ubuntu/quantal/command-not-found/python2-package/+merge/147965

To post a comment you must log in.
Revision history for this message
Dmitry Shachnev (mitya57) wrote :

Thanks a lot for your work here!

Only minor issues are remaining:

- lintian emits:

    W: python-commandnotfound: wrong-section-according-to-package-name python-commandnotfound => python
    I: python-commandnotfound: extended-description-is-probably-too-short
    I: command-not-found source: duplicate-short-description command-not-found python-commandnotfound

- Is the build-dependency on python[3]-dev really needed?

Revision history for this message
Данило Шеган (danilo) wrote :

Here're the simple fixes. I'll need to double check the python3?-dev deps since it was originally in.

Revision history for this message
Barry Warsaw (barry) wrote :

Hmm, I wonder if we shouldn't restructure this package in a better, more Debian Python policy compliant way.

Meaning, the following binary packages:

 * python-commandnotfound - Python 2 library
 * python3-commandnotfound - Python 3 library
 * command-not-found-data - unchanged
 * command-not-found - everything else

Obviously command-not-found would Depends on python3-commandnotfound

Revision history for this message
Barry Warsaw (barry) wrote :

How about verifying and updating Standards-Version too?

Revision history for this message
Barry Warsaw (barry) wrote :

Also, is --without=python-support really necessary?

review: Needs Fixing
Revision history for this message
Bryce Harrington (bryce) wrote :

[Setting to WIP to remove this from sponsor queue; please set back to Needs Review once it's ready for review again.]

Revision history for this message
Barry Warsaw (barry) wrote :

I'm going to fix these problems and upload - thanks Danilo!

Revision history for this message
Barry Warsaw (barry) :
review: Approve
Revision history for this message
Данило Шеган (danilo) wrote :

Thanks Barry: it'd probably take me days to get all of that fixed considering my packaging experience :)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2012-10-26 11:19:07 +0000
3+++ debian/changelog 2013-02-25 22:29:20 +0000
4@@ -1,3 +1,9 @@
5+command-not-found (0.3ubuntu7) raring; urgency=low
6+
7+ * Reintroduce Python2 support with python-commandnotfound package.
8+
9+ -- Danilo Segan <danilo@kvota.net> Wed, 20 Feb 2013 09:51:10 +0100
10+
11 command-not-found (0.3ubuntu6) raring; urgency=low
12
13 * Build depend on python3-all.
14
15=== modified file 'debian/command-not-found.install'
16--- debian/command-not-found.install 2012-02-03 10:10:52 +0000
17+++ debian/command-not-found.install 2013-02-25 22:29:20 +0000
18@@ -1,3 +1,3 @@
19-usr/lib
20+usr/lib/python3
21 usr/bin
22 etc/
23\ No newline at end of file
24
25=== modified file 'debian/control'
26--- debian/control 2012-10-26 11:19:07 +0000
27+++ debian/control 2013-02-25 22:29:20 +0000
28@@ -11,9 +11,15 @@
29 python3-apt,
30 python3-gdbm,
31 python3-distutils-extra,
32+ python,
33+ python-dev,
34+ python-apt,
35+ python-gdbm,
36+ python-distutils-extra,
37 Standards-Version: 3.7.2
38 XS-Vcs-Bzr: http://launchpad.net/~ubuntu-core-dev/command-not-found/ubuntu
39 X-Python3-Version: >= 3.2
40+X-Python-Version: >= 2.7
41
42 Package: command-not-found
43 Architecture: all
44@@ -28,3 +34,11 @@
45 Description: Set of data files for command-not-found.
46 This package provides the required data used by the command-not-found
47 application.
48+
49+Package: python-commandnotfound
50+Section: python
51+Architecture: all
52+Depends: ${python:Depends}, ${misc:Depends}, python-apt, command-not-found-data, python-gdbm, lsb-release
53+Description: Python2 bindings for command-not-found.
54+ This package will install Python2 library for command_not_found tool.
55+ Useful if you still have programs in Python2 that depend on it.
56
57=== added file 'debian/python-commandnotfound.install'
58--- debian/python-commandnotfound.install 1970-01-01 00:00:00 +0000
59+++ debian/python-commandnotfound.install 2013-02-25 22:29:20 +0000
60@@ -0,0 +1,1 @@
61+usr/lib/python2.*/*-packages/*
62
63=== modified file 'debian/rules'
64--- debian/rules 2012-06-29 13:46:06 +0000
65+++ debian/rules 2013-02-25 22:29:20 +0000
66@@ -1,7 +1,7 @@
67 #!/usr/bin/make -f
68
69 %:
70- dh $@ --with=python3 --without=python-support
71+ dh $@ --with=python2,python3 --without=python-support
72
73 PY3REQUESTED := $(shell py3versions -r)
74 PY3DEFAULT := $(shell py3versions -d)
75@@ -10,6 +10,7 @@
76 PY3 := $(filter-out $(PY3DEFAULT),$(PY3REQUESTED)) python3
77
78 override_dh_auto_build:
79+ dh_auto_build
80 set -e; for python in $(PY3); do \
81 $$python setup.py build; \
82 done
83@@ -23,6 +24,7 @@
84 find -name __pycache__ -print0 | xargs -0r rm -rf
85
86 override_dh_auto_install:
87+ dh_auto_install
88 set -e; for python in $(PY3); do \
89 $$python setup.py install --force --root=$(CURDIR)/debian/tmp \
90 --no-compile -O0 --install-layout=deb; \

Subscribers

People subscribed via source and target branches