There's no API for telling if someone can upload to a particular PPA. There are two APIs that look like they might be appropriate: IArchive.isSourceUploadAllowed and IArchive.checkUpload, but they provide strange results.
{{{ >>> 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'. --- }}}
isSourceUploadAllowed() says False for me uploading 'hello' to my own PPA and raises the same error for 'whatever'.
Exacerbated by bug 814725. If there were a way of actually getting feedback on upload, then we could just try & get the failure.
There's no API for telling if someone can upload to a particular PPA. There are two APIs that look like they might be appropriate: IArchive. isSourceUploadA llowed and IArchive. checkUpload, but they provide strange results.
{{{ (person= me, distroseries= ubuntu. current_ series, sourcepackagena me='hello' , component='main', pocket='Release') (person= me, distroseries= ubuntu. current_ series, sourcepackagena me='whatever' , component='main', pocket='Release')
>>> ppa.checkUpload
True
>>> ppa.checkUpload
Traceback (most recent call last):
...
NotFound: HTTP Error 404: Not Found
Response headers:
---
...
status: 404
...
---
Response body:
---
No such source package: 'whatever'.
---
}}}
isSourceUploadA llowed( ) says False for me uploading 'hello' to my own PPA and raises the same error for 'whatever'.
Exacerbated by bug 814725. If there were a way of actually getting feedback on upload, then we could just try & get the failure.