[Bug 1991553] Re: can't add a private PPA
Dan Streetman
1991553 at bugs.launchpad.net
Thu Apr 20 15:14:23 UTC 2023
> 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:xxx@private-ppa.launchpadcontent.net/canonical-support-eng/soscleaner-deletedppa/ubuntu',
'https://ddstreet:xxx@private-ppa.launchpadcontent.net/canonical-support-eng/ddstreet-deletedppa/ubuntu',
'https://ddstreet:xxx@private-ppa.launchpadcontent.net/jedis/test-deletedppa1/ubuntu',
'https://ddstreet:xxx@private-ppa.launchpadcontent.net/jedis/test-deletedppa/ubuntu',
'https://ddstreet:xxx@private-ppa.launchpadcontent.net/canonical-support-eng/sf155616-deletedppa/ubuntu',
'https://ddstreet:xxx@private-ppa.launchpadcontent.net/canonical-support-eng/sf107001-deletedppa/ubuntu',
'https://ddstreet:xxx@private-ppa.launchpadcontent.net/canonical-support-eng/sf99522-deletedppa/ubuntu',
'https://ddstreet:xxx@private-ppa.launchpadcontent.net/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...
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to software-properties in Ubuntu.
https://bugs.launchpad.net/bugs/1991553
Title:
can't add a private PPA
Status in software-properties package in Ubuntu:
Confirmed
Bug description:
As per today's discussion in ~is :
add-apt-repository has a bug when adding a private PPA. Quoting
~cjwatson :
===
It asks Launchpad for all your personal archive subscriptions _that have tokens_. But `Person:+archivesubscriptions` also shows subscriptions without tokens - the token is generated when you click on Viewt here for the first time.
Instead, `add-apt-repository` should call `getArchiveSubscriptionURL` (not `getArchiveSubscriptionURLs`) for the archive it's interested in. That generates tokens on-demand. Either it will get an HTTP 401, or it will get a URL which it can parse for the username and password.
===
Thanks !
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/software-properties/+bug/1991553/+subscriptions
More information about the foundations-bugs
mailing list