Merge lp:~arvindsraj-deactivatedaccount/rhythmbox-ubuntuone/hardcoding-version-removed into lp:rhythmbox-ubuntuone

Proposed by Arvind S Raj
Status: Rejected
Rejected by: dobey
Proposed branch: lp:~arvindsraj-deactivatedaccount/rhythmbox-ubuntuone/hardcoding-version-removed
Merge into: lp:rhythmbox-ubuntuone
Diff against target: 34 lines (+12/-2)
1 file modified
umusicstore/MusicStoreWidget.py (+12/-2)
To merge this branch: bzr merge lp:~arvindsraj-deactivatedaccount/rhythmbox-ubuntuone/hardcoding-version-removed
Reviewer Review Type Date Requested Status
dobey (community) Disapprove
Review via email: mp+50735@code.launchpad.net

Description of the change

Added a function that reads the codename of the present release from /etc/lsb-release and stores it in a variable CODENAME that can be used elsewhere.

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

Hi Arvind. Thanks for the work on this. Sorry for the slow review. As you've probably heard, for 11.04 we are switching to banshee as the default player in Ubuntu. As a result, I have been working on making the u1ms extension for banshee be on par with the rhythmbox extension. Part of that work means supporting installing the mp3 plug-in for gstreamer from within banshee as well. With that in mind, we need to move this functionality to libubuntuone, which is in C; so I am going to reject this branch, based on that. Once the codec installation is supported in libubuntuone, we'll want to fix the banshee and rhythmbox extensions both to use that API instead of trying to do all this work on their own. Thanks again, and sorry for having to reject this. :)

review: Disapprove

Unmerged revisions

101. By Arvind S Raj

Eliminated hardcoding of Ubuntu codename: LP:#693536

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'umusicstore/MusicStoreWidget.py'
2--- umusicstore/MusicStoreWidget.py 2010-12-16 14:40:36 +0000
3+++ umusicstore/MusicStoreWidget.py 2011-02-22 12:43:08 +0000
4@@ -56,10 +56,20 @@
5 MUSIC_STORE_WIDGET = U1MusicStore() # keep this around for later
6 U1LIBRARYPATH = MUSIC_STORE_WIDGET.get_library_location()
7 RB_LIBRARY_LOCATIONS = "/apps/rhythmbox/library_locations"
8-PARTNER_LIST = "canonical-partner-maverick.list"
9+CODENAME = get_codename()
10+PARTNER_LIST = "canonical-partner-" + CODENAME + ".list"
11 SOURCES_DIR = "/etc/apt/sources.list.d/"
12 PLUGIN_PACKAGENAME = "gstreamer0.10-fluendo-plugins-mp3-partner"
13
14+def get_codename():
15+ lsb_release_file=file("/etc/lsb-release", "r")
16+ content = lsb_release_file.readlines()
17+ lsb_release_file.close()
18+ for line in content:
19+ field = line.split('=')
20+ if field[0] == 'DISTRIB_CODENAME':
21+ return field[1]
22+
23
24 class U1EntryType(rhythmdb.EntryType):
25 """Entry type for the Ubuntu One Music Store source."""
26@@ -436,7 +446,7 @@
27 trans = yield self.ac.add_repository(
28 src_type="deb",
29 uri="http://archive.canonical.com/",
30- dist="maverick",
31+ dist=CODENAME,
32 comps=["partner"],
33 comment="added by U1MusicStoreWidget",
34 sourcesfile=PARTNER_LIST)

Subscribers

People subscribed via source and target branches