Merge lp:~xnox/gnome-menus/ubuntu-py3 into lp:~ubuntu-desktop/gnome-menus/ubuntu

Proposed by Dimitri John Ledkov
Status: Merged
Merged at revision: 130
Proposed branch: lp:~xnox/gnome-menus/ubuntu-py3
Merge into: lp:~ubuntu-desktop/gnome-menus/ubuntu
Diff against target: 152 lines (+29/-22)
6 files modified
debian/changelog (+6/-0)
debian/control (+4/-5)
debian/control.in (+3/-3)
debian/gnome-menus-blacklist (+14/-13)
debian/menus.blacklist (+1/-0)
debian/rules (+1/-1)
To merge this branch: bzr merge lp:~xnox/gnome-menus/ubuntu-py3
Reviewer Review Type Date Requested Status
Iain Lane Pending
Barry Warsaw Pending
Robert Ancell Pending
Ubuntu Desktop Pending
Review via email: mp+136303@code.launchpad.net

Description of the change

We don't actually use gnome-menus-blacklist directly, but I ported it to python3 anyway to drop the python2 dependency from this seeded package.

To post a comment you must log in.

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-11-14 21:41:04 +0000
3+++ debian/changelog 2012-11-27 00:47:36 +0000
4@@ -1,3 +1,9 @@
5+gnome-menus (3.6.1-0ubuntu2) UNRELEASED; urgency=low
6+
7+ * Port gnome-menus-blacklist to python3.
8+
9+ -- Dmitrijs Ledkovs <dmitrij.ledkov@ubuntu.com> Tue, 20 Nov 2012 01:27:03 +0000
10+
11 gnome-menus (3.6.1-0ubuntu1) raring; urgency=low
12
13 * New upstream release
14
15=== modified file 'debian/control'
16--- debian/control 2012-05-21 17:15:55 +0000
17+++ debian/control 2012-11-27 00:47:36 +0000
18@@ -2,23 +2,22 @@
19 #
20 # Modifications should be made to debian/control.in instead.
21 # This file is regenerated automatically in the clean target.
22-
23 Source: gnome-menus
24 Section: gnome
25 Priority: optional
26 Maintainer: Ubuntu Desktop Team <ubuntu-desktop@lists.ubuntu.com>
27 XSBC-Original-Maintainer: Debian GNOME Maintainers <pkg-gnome-maintainers@lists.alioth.debian.org>
28-Uploaders: Debian GNOME Maintainers <pkg-gnome-maintainers@lists.alioth.debian.org>, Michael Biebl <biebl@debian.org>, Sjoerd Simons <sjoerd@debian.org>
29+Uploaders: Debian GNOME Maintainers <pkg-gnome-maintainers@lists.alioth.debian.org>
30 Build-Depends: debhelper (>= 8.1.0~),
31 cdbs (>= 0.4.73),
32 libglib2.0-dev (>= 2.30.0),
33 gnome-pkg-tools,
34- python (>= 2.6.6-3~),
35+ python3 (>= 3.1),
36 intltool (>= 0.40.0),
37 libgirepository1.0-dev (>= 0.10.7-1~),
38 gobject-introspection (>= 0.9.12-4~)
39 Standards-Version: 3.9.3
40-X-Python-Version: >= 2.3
41+X-Python3-Version: >= 3.1
42 Vcs-Bzr: https://code.launchpad.net/~ubuntu-desktop/gnome-menus/ubuntu
43
44 Package: gnome-menus
45@@ -26,7 +25,7 @@
46 Pre-Depends: ${misc:Pre-Depends}
47 Depends: ${shlibs:Depends},
48 ${misc:Depends},
49- ${python:Depends}
50+ ${python3:Depends}
51 Breaks: gnome-panel (<< 2.91),
52 gnome-control-center (<< 2.91),
53 alacarte (<< 0.13.2-2)
54
55=== modified file 'debian/control.in'
56--- debian/control.in 2012-05-21 17:15:55 +0000
57+++ debian/control.in 2012-11-27 00:47:36 +0000
58@@ -8,12 +8,12 @@
59 cdbs (>= 0.4.73),
60 libglib2.0-dev (>= 2.30.0),
61 gnome-pkg-tools,
62- python (>= 2.6.6-3~),
63+ python3 (>= 3.1),
64 intltool (>= 0.40.0),
65 libgirepository1.0-dev (>= 0.10.7-1~),
66 gobject-introspection (>= 0.9.12-4~)
67 Standards-Version: 3.9.3
68-X-Python-Version: >= 2.3
69+X-Python3-Version: >= 3.1
70 Vcs-Bzr: https://code.launchpad.net/~ubuntu-desktop/gnome-menus/ubuntu
71
72 Package: gnome-menus
73@@ -21,7 +21,7 @@
74 Pre-Depends: ${misc:Pre-Depends}
75 Depends: ${shlibs:Depends},
76 ${misc:Depends},
77- ${python:Depends}
78+ ${python3:Depends}
79 Breaks: gnome-panel (<< 2.91),
80 gnome-control-center (<< 2.91),
81 alacarte (<< 0.13.2-2)
82
83=== modified file 'debian/gnome-menus-blacklist'
84--- debian/gnome-menus-blacklist 2011-05-16 11:00:23 +0000
85+++ debian/gnome-menus-blacklist 2012-11-27 00:47:36 +0000
86@@ -1,4 +1,4 @@
87-#! /usr/bin/python
88+#! /usr/bin/python3
89
90 sourcedir = "/usr/share/applications"
91 destdir = "/usr/share/gnome/applications"
92@@ -9,11 +9,12 @@
93 # Parse blacklist file
94 blacklist = []
95 try:
96- for l in file (blacklist_file):
97- l = l.strip()
98- if l.startswith("#"):
99- continue
100- blacklist.append(l)
101+ with open(blacklist_file, 'r', encoding='utf_8') as fp:
102+ for l in fp.readlines():
103+ l = l.strip()
104+ if l.startswith("#"):
105+ continue
106+ blacklist.append(l)
107 except IOError:
108 sys.stderr.write("Warning: %s cannot be opened\n"%blacklist_file)
109
110@@ -57,13 +58,13 @@
111 # Copy file, adding a NoDisplay flag
112 if not os.path.isdir (absdir):
113 os.makedirs (absdir)
114- out = file (destfile, "w")
115- for l in file (sourcefile):
116- if l.startswith ("NoDisplay="):
117- continue
118- out.write(l)
119- out.write ("NoDisplay=true\n")
120- out.close()
121+ with open(destfile, 'wt', encoding='utf_8') as fp_out:
122+ with open(sourcefile, 'rt', encoding='utf_8') as fp_in:
123+ for l in fp_in.readlines():
124+ if l.startswith ("NoDisplay="):
125+ continue
126+ fp_out.write(l)
127+ fp_out.write("NoDisplay=true\n")
128
129 # Set mtime so that the file is not touched unless it has changed
130 os.utime (destfile, (source_time, source_time))
131
132=== modified file 'debian/menus.blacklist'
133--- debian/menus.blacklist 2012-05-21 17:15:55 +0000
134+++ debian/menus.blacklist 2012-11-27 00:47:36 +0000
135@@ -1,3 +1,4 @@
136+# -*- coding: utf-8 -*-
137 # openjdk-6
138 openjdk-6-policytool.desktop
139
140
141=== modified file 'debian/rules'
142--- debian/rules 2012-02-08 10:35:07 +0000
143+++ debian/rules 2012-11-27 00:47:36 +0000
144@@ -17,7 +17,7 @@
145 build/gnome-menus:: $(OUTFILES)
146
147 binary-install/gnome-menus::
148- dh_python2 -pgnome-menus
149+ dh_python3 -pgnome-menus
150
151 clean::
152 -rm -f $(OUTFILES)

Subscribers

People subscribed via source and target branches