Merge lp:~sergiusens/demo-assets/1182549 into lp:demo-assets

Proposed by Sergio Schvezov
Status: Merged
Approved by: Ricardo Salveti
Approved revision: 43
Merged at revision: 37
Proposed branch: lp:~sergiusens/demo-assets/1182549
Merge into: lp:demo-assets
Diff against target: 269 lines (+78/-35)
10 files modified
debian/changelog (+8/-0)
debian/control (+38/-5)
debian/demo-assets-contacts.install (+3/-0)
debian/demo-assets-music.install (+2/-0)
debian/demo-assets-pictures.install (+1/-0)
debian/demo-assets-shell.install (+2/-0)
debian/demo-assets-videos.install (+3/-0)
debian/demo-assets.install (+0/-9)
usr/bin/inject-data-into-friends-model (+1/-1)
usr/bin/manage-address-books (+20/-20)
To merge this branch: bzr merge lp:~sergiusens/demo-assets/1182549
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Approve
Ricardo Salveti (community) Approve
Bill Filler (community) Approve
Review via email: mp+165500@code.launchpad.net

Commit message

Splitting all the packages into smaller ones and changing the contact address tool to be python3

To post a comment you must log in.
lp:~sergiusens/demo-assets/1182549 updated
40. By Sergio Schvezov

Marking for release

41. By Sergio Schvezov

Adding demo-assets-pictures

Revision history for this message
Bill Filler (bfiller) wrote :

approve

review: Approve
lp:~sergiusens/demo-assets/1182549 updated
42. By Sergio Schvezov

Changing demo-assets-shell description

43. By Sergio Schvezov

Making the transition package depend on the binary:Version of what it builds

Revision history for this message
Ricardo Salveti (rsalveti) wrote :

Good, built and tested fine.

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'debian/changelog'
--- debian/changelog 2013-05-10 05:53:01 +0000
+++ debian/changelog 2013-05-24 18:06:38 +0000
@@ -1,3 +1,11 @@
1demo-assets (0.24-0ubuntu1) raring; urgency=low
2
3 * Splitting up into multiple packages (LP: #1182549).
4 * Updating packaging standards.
5 * Updating contacts creation script to python3
6
7 -- Sergio Schvezov <sergio.schvezov@canonical.com> Thu, 23 May 2013 17:00:47 -0300
8
1demo-assets (0.24) raring; urgency=low9demo-assets (0.24) raring; urgency=low
210
3 * drop users xml data and move backgrounds to /usr/share11 * drop users xml data and move backgrounds to /usr/share
412
=== modified file 'debian/control'
--- debian/control 2013-02-20 20:29:58 +0000
+++ debian/control 2013-05-24 18:06:38 +0000
@@ -4,11 +4,44 @@
4Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>4Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
5XSBC-Original-Maintainer: Ricardo Mendoza <ricardo.mendoza@canonical.com>5XSBC-Original-Maintainer: Ricardo Mendoza <ricardo.mendoza@canonical.com>
6Build-Depends: debhelper (>= 9.0.0)6Build-Depends: debhelper (>= 9.0.0)
7Standards-Version: 3.9.37Standards-Version: 3.9.4
88
9Package: demo-assets9Package: demo-assets
10Architecture: all10Architecture: all
11Depends: ${shlibs:Depends}, ${misc:Depends}, unity-lens-mock11Depends: demo-assets-shell (= ${binary:Version}),
12Description: Demo Assets12 demo-assets-contacts (= ${binary:Version}),
13 DEMO ONLY: Videos and images for demo applications13 demo-assets-music (= ${binary:Version}),
1414 demo-assets-videos (= ${binary:Version}),
15 demo-assets-pictures (= ${binary:Version}),
16Description: Demo Assets transitionary package
17 DEMO ONLY: Transition package that depends on all others.
18
19Package: demo-assets-shell
20Architecture: all
21Depends: ${shlibs:Depends}, ${misc:Depends}
22Description: Demo Assets for Shell
23 DEMO ONLY: infographics and backgrounds for greeter
24
25Package: demo-assets-contacts
26Architecture: all
27Depends: ${shlibs:Depends}, ${misc:Depends}, python3
28Description: Demo Assets for Contacts
29 DEMO ONLY: Contacts and fake conversations for demoing.
30
31Package: demo-assets-music
32Architecture: all
33Depends: ${shlibs:Depends}, ${misc:Depends}, unity-lens-mock
34Description: Demo Assets for Music
35 DEMO ONLY: Music mocks for the shell.
36
37Package: demo-assets-videos
38Architecture: all
39Depends: ${shlibs:Depends}, ${misc:Depends}, unity-lens-mock
40Description: Demo Assets for Video
41 DEMO ONLY: Video mocks for the shell.
42
43Package: demo-assets-pictures
44Architecture: all
45Depends: ${shlibs:Depends}, ${misc:Depends}, python3
46Description: Demo Assets for Gallery
47 DEMO ONLY: Fake pictures for demoing.
1548
=== added file 'debian/demo-assets-contacts.install'
--- debian/demo-assets-contacts.install 1970-01-01 00:00:00 +0000
+++ debian/demo-assets-contacts.install 2013-05-24 18:06:38 +0000
@@ -0,0 +1,3 @@
1contacts-data /usr/share/demo-assets/
2telephony-app /usr/share/demo-assets/
3/usr/bin
04
=== added file 'debian/demo-assets-music.install'
--- debian/demo-assets-music.install 1970-01-01 00:00:00 +0000
+++ debian/demo-assets-music.install 2013-05-24 18:06:38 +0000
@@ -0,0 +1,2 @@
1services/com.canonical.Unity.Lens.MockMusic.service /usr/share/dbus-1/services
2lenses/mockmusic /usr/share/unity/lenses
03
=== added file 'debian/demo-assets-pictures.install'
--- debian/demo-assets-pictures.install 1970-01-01 00:00:00 +0000
+++ debian/demo-assets-pictures.install 2013-05-24 18:06:38 +0000
@@ -0,0 +1,1 @@
1pictures.tgz /usr/share/demo-assets/
02
=== added file 'debian/demo-assets-shell.install'
--- debian/demo-assets-shell.install 1970-01-01 00:00:00 +0000
+++ debian/demo-assets-shell.install 2013-05-24 18:06:38 +0000
@@ -0,0 +1,2 @@
1shell/backgrounds/* /usr/share/backgrounds/
2shell/infographics /usr/share/demo-assets/shell/
03
=== added file 'debian/demo-assets-videos.install'
--- debian/demo-assets-videos.install 1970-01-01 00:00:00 +0000
+++ debian/demo-assets-videos.install 2013-05-24 18:06:38 +0000
@@ -0,0 +1,3 @@
1videos /usr/share/demo-assets/
2services/com.canonical.Unity.Lens.MockVideos.service /usr/share/dbus-1/services
3lenses/mockvideos /usr/share/unity/lenses
04
=== removed file 'debian/demo-assets.install'
--- debian/demo-assets.install 2013-05-10 05:53:01 +0000
+++ debian/demo-assets.install 1970-01-01 00:00:00 +0000
@@ -1,9 +0,0 @@
1pictures.tgz /usr/share/demo-assets/
2videos /usr/share/demo-assets/
3telephony-app /usr/share/demo-assets/
4contacts-data /usr/share/demo-assets/
5shell/backgrounds/* /usr/share/backgrounds/
6shell/infographics /usr/share/demo-assets/shell/
7/usr/bin
8services/* /usr/share/dbus-1/services
9lenses/* /usr/share/unity/lenses
100
=== renamed file 'usr/bin/inject-data-into-friends-model.py' => 'usr/bin/inject-data-into-friends-model'
--- usr/bin/inject-data-into-friends-model.py 2013-02-21 01:01:40 +0000
+++ usr/bin/inject-data-into-friends-model 2013-05-24 18:06:38 +0000
@@ -1,4 +1,4 @@
1#!/usr/bin/env python31#!/usr/bin/python3
2# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-2# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
3# Copyright 2013 Canonical3# Copyright 2013 Canonical
4#4#
55
=== renamed file 'usr/bin/manage-address-books.py' => 'usr/bin/manage-address-books'
--- usr/bin/manage-address-books.py 2013-02-21 01:01:40 +0000
+++ usr/bin/manage-address-books 2013-05-24 18:06:38 +0000
@@ -1,4 +1,4 @@
1#!/usr/bin/env python1#!/usr/bin/python3
2# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-2# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
3# Copyright 2013 Canonical3# Copyright 2013 Canonical
4#4#
@@ -51,7 +51,7 @@
51 return create_eds_source(book_name)51 return create_eds_source(book_name)
5252
53def create_eds_source(book_name):53def create_eds_source(book_name):
54 print("Create EDS source %s", book_name)54 print(("Create EDS source %s", book_name))
55 source = EDataServer.Source.new(None, None)55 source = EDataServer.Source.new(None, None)
56 source.set_display_name(book_name)56 source.set_display_name(book_name)
57 source.set_parent('local-stub')57 source.set_parent('local-stub')
@@ -67,12 +67,12 @@
67 source_registry.set_default_address_book(source)67 source_registry.set_default_address_book(source)
68 return source.get_uid()68 return source.get_uid()
69 else:69 else:
70 print("Error CREATING ADDRESS BOOK %s", book_name)70 print(("Error CREATING ADDRESS BOOK %s", book_name))
71 sys.exit()71 sys.exit()
7272
73def prep_data():73def prep_data():
74 print("prep_data")74 print("prep_data")
75 ifile = open('/usr/share/demo-assets/contacts-data/data.csv', "rb")75 ifile = open('/usr/share/demo-assets/contacts-data/data.csv', "r")
76 reader = csv.reader(ifile)76 reader = csv.reader(ifile)
77 rownum = 077 rownum = 0
78 for row in reader:78 for row in reader:
@@ -92,12 +92,12 @@
92 for filename in os.listdir("/usr/share/demo-assets/contacts-data/avatars"):92 for filename in os.listdir("/usr/share/demo-assets/contacts-data/avatars"):
93 parts = os.path.splitext(filename)[0].split("_")93 parts = os.path.splitext(filename)[0].split("_")
94 if int(parts[-1]) == int(facebook_id):94 if int(parts[-1]) == int(facebook_id):
95 f = open("/usr/share/demo-assets/contacts-data/avatars/" + filename, 'r')95 f = open("/usr/share/demo-assets/contacts-data/avatars/" + filename, 'rb')
96 p = EBook.ContactPhoto.new()96 p = EBook.ContactPhoto.new()
97 p.set_mime_type("image/jpeg")97 p.set_mime_type("image/jpeg")
98 p.set_inlined(f.read())98 p.set_inlined(f.read())
99 contact.set_property("photo", p)99 contact.set_property("photo", p)
100 print("found {} for {} who has id {} {} ".format(filename, name, facebook_id, str(contact.inline_local_photos())))100 print(("found {} for {} who has id {} {} ".format(filename, name, facebook_id, str(contact.inline_local_photos()))))
101 f.close()101 f.close()
102102
103103
@@ -106,7 +106,7 @@
106 source_match = source_registry.ref_source(source_uid)106 source_match = source_registry.ref_source(source_uid)
107107
108 if(source_match is None):108 if(source_match is None):
109 print("No source match from reg %s", source_uid)109 print(("No source match from reg %s", source_uid))
110 sys.exit()110 sys.exit()
111111
112112
@@ -131,7 +131,7 @@
131 name = c["Name"]131 name = c["Name"]
132 param.add_value(name)132 param.add_value(name)
133 vcard_attr.add_param(param);133 vcard_attr.add_param(param);
134 if ("FacebookID" in c.keys()):134 if ("FacebookID" in list(c.keys())):
135 param = EBook.VCardAttributeParam.new('facebook-id')135 param = EBook.VCardAttributeParam.new('facebook-id')
136 param.add_value(c["FacebookID"])136 param.add_value(c["FacebookID"])
137 vcard_attr.add_param(param)137 vcard_attr.add_param(param)
@@ -144,27 +144,27 @@
144144
145 contact = EBook.Contact.new_from_vcard(vcard.to_string(EBook.VCardFormat(1)))145 contact = EBook.Contact.new_from_vcard(vcard.to_string(EBook.VCardFormat(1)))
146146
147 for key,value in c.items():147 for key,value in list(c.items()):
148 if key == "Name":148 if key == "Name":
149 contact.set_property("full-name", value)149 contact.set_property("full-name", value)
150 elif key == "Favorite" and value == "1":150 elif key == "Favorite" and value == "1":
151 print("Favorite = TRUE")151 print("Favorite = TRUE")
152 contact.set_property("categories", 'Favorites')152 contact.set_property("categories", 'Favorites')
153 elif (key.find("E-mail 1") > -1):153 elif (key.find("E-mail 1") > -1):
154 print("email 1 = {}".format(value))154 print(("email 1 = {}".format(value)))
155 contact.set_property("email-1", value)155 contact.set_property("email-1", value)
156 elif (key.find("E-mail 2") > -1):156 elif (key.find("E-mail 2") > -1):
157 print("email 2 = {}".format(value))157 print(("email 2 = {}".format(value)))
158 contact.set_property("email-2", value)158 contact.set_property("email-2", value)
159 elif (key.find("Phone 1 - Value") > -1):159 elif (key.find("Phone 1 - Value") > -1):
160 print("phone 1 = {}".format(value))160 print(("phone 1 = {}".format(value)))
161 contact.set_property("home-phone", value)161 contact.set_property("home-phone", value)
162 elif (key.find("Phone 2 - Value") > -1):162 elif (key.find("Phone 2 - Value") > -1):
163 print("phone 2 = {}".format(value))163 print(("phone 2 = {}".format(value)))
164 contact.set_property("home-phone-2", value)164 contact.set_property("home-phone-2", value)
165 elif (key.find("FacebookID") > -1):165 elif (key.find("FacebookID") > -1):
166 if (value.isdigit()):166 if (value.isdigit()):
167 print("facebookid = {}".format(value))167 print(("facebookid = {}".format(value)))
168 find_and_set_image_path(contact, value, name)168 find_and_set_image_path(contact, value, name)
169 client.add_contact_sync(contact, None)169 client.add_contact_sync(contact, None)
170 ml.quit()170 ml.quit()
@@ -173,17 +173,17 @@
173 client = EBook.BookClient.new(source)173 client = EBook.BookClient.new(source)
174 client.open_sync(False, None)174 client.open_sync(False, None)
175 if client is None:175 if client is None:
176 print "cannot create bookclient!"176 print("cannot create bookclient!")
177 sys.exit()177 sys.exit()
178 query = EBook.book_query_any_field_contains('')178 query = EBook.book_query_any_field_contains('')
179 success, results = client.get_contacts_sync(query.to_string(), None)179 success, results = client.get_contacts_sync(query.to_string(), None)
180 if not success:180 if not success:
181 log.error('EDS search for delete all contacts failed')181 log.error('EDS search for delete all contacts failed')
182 sys.exit()182 sys.exit()
183 print('Found {} contacts to delete'.format(len(results)))183 print(('Found {} contacts to delete'.format(len(results))))
184 for contact in results:184 for contact in results:
185 print('Deleting contact {}'.format(185 print(('Deleting contact {}'.format(
186 contact.get_property('full-name')))186 contact.get_property('full-name'))))
187 client.remove_contact_sync(contact, None)187 client.remove_contact_sync(contact, None)
188188
189def create(ml):189def create(ml):
@@ -194,7 +194,7 @@
194def delete(a_book_name, ml):194def delete(a_book_name, ml):
195 book = address_book_name if a_book_name is None else a_book_name195 book = address_book_name if a_book_name is None else a_book_name
196 source_uid = get_source(book)196 source_uid = get_source(book)
197 print "delete book {}".format(book)197 print("delete book {}".format(book))
198 source_match = source_registry.ref_source(source_uid)198 source_match = source_registry.ref_source(source_uid)
199 delete_contacts(source_match)199 delete_contacts(source_match)
200 ml.quit()200 ml.quit()
@@ -207,7 +207,7 @@
207else:207else:
208 book_name = book_name[0]208 book_name = book_name[0]
209209
210print("Carry out '{}'' action on '{}' book".format(action, book_name))210print(("Carry out '{}'' action on '{}' book".format(action, book_name)))
211211
212ml = GLib.MainLoop()212ml = GLib.MainLoop()
213213

Subscribers

People subscribed via source and target branches