IArchive.checkUpload() requires existing sourcepackagename

Bug #821366 reported by Jonathan Lange
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Launchpad itself
Triaged
High
Unassigned

Bug Description

There's no API for telling if someone can upload to a particular PPA. One API that looks like it might be appropriate is IArchive.checkUpload, but that doesn't work for new source packages.

{{{
>>> ppa.checkUpload(person=me, distroseries=ubuntu.current_series, sourcepackagename='hello', component='main', pocket='Release')
True
>>> ppa.checkUpload(person=me, distroseries=ubuntu.current_series, sourcepackagename='whatever', component='main', pocket='Release')
Traceback (most recent call last):
...
NotFound: HTTP Error 404: Not Found
Response headers:
---
...
status: 404
...
---
Response body:
---
No such source package: 'whatever'.
---
}}}

Exacerbated by bug 814725. If there were a way of actually getting feedback on upload, then we could just try & get the failure.

Tags: api ppa
Revision history for this message
Julian Edwards (julian-edwards) wrote :

(Fixed inflammatory bug title)

The API is not as useful for PPAs as it could be because it was designed for the main archive. The source name, pocket and component should be optional parameters for PPAs and mandatory for the main archive.

summary: - No API for telling if someone can upload to PPA
+ IArchive.checkUpload() requires existing sourcepackagename
Changed in launchpad:
status: New → Triaged
importance: Undecided → High
tags: added: api ppa
Revision history for this message
Jonathan Lange (jml) wrote :

Since the description was changed to refer to only one aspect of the bug, I've filed two other bugs that deal with the other aspects: bug 821374 and bug 821376.

description: updated
Revision history for this message
Jonathan Lange (jml) wrote : Re: [Bug 821366] Re: IArchive.checkUpload() requires existing sourcepackagename

On Fri, Aug 5, 2011 at 10:36 AM, Julian Edwards
<email address hidden> wrote:
> (Fixed inflammatory bug title)
>
> The API is not as useful for PPAs as it could be because it was designed
> for the main archive.  The source name, pocket and component should be
> optional parameters for PPAs and mandatory for the main archive.
>

Sorry, it wasn't meant to be inflammatory. From trying to use the API,
it looked as if it was designed for the main archive, and thus that
there was no actual API for checking to see if a user could upload to
a PPA.

jml

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.