Comment 3 for bug 1991553

Revision history for this message
Dan Streetman (ddstreet) wrote (last edit ):

> Instead, `add-apt-repository` should call `getArchiveSubscriptionURL` (not `getArchiveSubscriptionURLs`)

this doesn't seem to work correctly.

For example:

In [25]: lp.me.getArchiveSubscriptionURLs()
Out[25]:
['https://ddstreet:<email address hidden>/canonical-support-eng/soscleaner-deletedppa/ubuntu',
 'https://ddstreet:<email address hidden>/canonical-support-eng/ddstreet-deletedppa/ubuntu',
 'https://ddstreet:<email address hidden>/jedis/test-deletedppa1/ubuntu',
 'https://ddstreet:<email address hidden>/jedis/test-deletedppa/ubuntu',
 'https://ddstreet:<email address hidden>/canonical-support-eng/sf155616-deletedppa/ubuntu',
 'https://ddstreet:<email address hidden>/canonical-support-eng/sf107001-deletedppa/ubuntu',
 'https://ddstreet:<email address hidden>/canonical-support-eng/sf99522-deletedppa/ubuntu',
 'https://ddstreet:<email address hidden>/canonical-support-eng/sf94878-deletedppa/ubuntu']

In [26]: jedis = lp.people('jedis')

In [28]: testdeletedppa = jedis.getPPAByName(name='test-deletedppa')

In [29]: lp.me.getArchiveSubscriptionURL(archive=testdeletedppa)
Out[29]:
{'self_link': 'https://api.launchpad.net/devel/~ddstreet',
 'web_link': 'https://launchpad.net/~ddstreet',
 'resource_type_link': 'https://api.launchpad.net/devel/#person',

...and the rest of my personal object (i.e. lp.me) as a python object.

It's the same result when I try with a non-deleted ppa, which doesn't show up in getArchiveSubscriptionURLs():

In [37]: lteam = lp.people('launch-lite')

In [38]: lppa = lteam.getPPAByName(name='ppa')

In [39]: lp.me.getArchiveSubscriptionURL(archive=lppa)
Out[39]:
{'self_link': 'https://api.launchpad.net/devel/~ddstreet',
 'web_link': 'https://launchpad.net/~ddstreet',
 'resource_type_link': 'https://api.launchpad.net/devel/#person',
...

Until that bug is fixed (and that bug isn't in software-properties), I don't think add-apt-repository can be changed to use getArchiveSubscriptionURL(). Or at least, if this bug only applies to me, then I can't make the change in software-properties since I wouldn't be able to test the change...