Merge lp:~brian-murray/ubuntu-dev-tools/fix-params into lp:~ubuntu-dev/ubuntu-dev-tools/trunk

Proposed by Brian Murray
Status: Rejected
Rejected by: Mattia Rizzolo
Proposed branch: lp:~brian-murray/ubuntu-dev-tools/fix-params
Merge into: lp:~ubuntu-dev/ubuntu-dev-tools/trunk
Diff against target: 12 lines (+1/-1)
1 file modified
ubuntutools/lp/lpapicache.py (+1/-1)
To merge this branch: bzr merge lp:~brian-murray/ubuntu-dev-tools/fix-params
Reviewer Review Type Date Requested Status
Stefano Rivera Disapprove
Review via email: mp+125786@code.launchpad.net

Description of the change

Instead of this:

seeded-in-ubuntu: Error: The package 'update-manager-core' does not exist in the Ubuntu primary archive in quantal, quantal-security, quantal-updates or quantal-proposed

Report this:

seeded-in-ubuntu: Error: The source package 'update-manage-core' does not exist in the Ubuntu primary archive in quantal, quantal-security, quantal-updates or quantal-proposed

This is useful for figuring out that I was dumb and wanted to use the -b switch.

For some reason name_key was set to name which didn't really make sense to me.

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

I think you are misunderstanding the purpose of name_key. It's the name of the named parameter that will be the source/binary package name.

I don't see what this patch has to do with making seeded-in-ubuntu say "source package", either. That was already fixed in LP: #1029155

review: Disapprove
Revision history for this message
Brian Murray (brian-murray) wrote :

I was looking at lines 371+, http://bazaar.launchpad.net/~ubuntu-dev/ubuntu-dev-tools/trunk/view/head:/ubuntutools/lp/lpapicache.py#L371, which show the following:

            if latest is None:
                if name_key == 'binary_name':
                    package_type = "binary package"
                elif name_key == 'source_name':
                    package_type = "source package"
                else:
                    package_type = "package"

Additionally, there is a named_key and name parameter passed to _getPublishedItem. seeded-in-ubuntu calls getSourcePackage which then calls _getPublishedItem with name_key='source_name' so I'm really pretty sure name_key should set to name_key in the parameters and not name.

Revision history for this message
Stefano Rivera (stefanor) wrote :

That's name_key, not params[name_key]. params is only used on line 361.

Unmerged revisions

1347. By Brian Murray

don't set name_key to the package name

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'ubuntutools/lp/lpapicache.py'
2--- ubuntutools/lp/lpapicache.py 2012-07-26 19:40:49 +0000
3+++ ubuntutools/lp/lpapicache.py 2012-09-21 18:17:19 +0000
4@@ -350,7 +350,7 @@
5 index = (name, series.name, pockets)
6 if index not in cache:
7 params = {
8- name_key: name,
9+ name_key: name_key,
10 'distro_series': series(),
11 'status': 'Published',
12 'exact_match': True,

Subscribers

People subscribed via source and target branches

to status/vote changes: