Delete or undelete PPA (but not leave it grayed out)

Asked by Felix Lechner

Being relatively new to Launchpad, I uploaded like crazy to my PPAs 'linphone' and 'linphone-snapshots' to experiment. Then I deleted both them in hope of recreating them fresh and empty. Unfortunately, it looks like the delete button is a bit of a misnomer. If the deleted PPAs are not going away. Is there a way I can reactivate them to reuse the names?

The PPAs are intended for publication. I would like to use the names again.

I have no problem using the old ones. I was just trying to get rid of junk on Launchpad servers, such as multiple orig.tar.gz submissions.

Thank you.

Question information

Language:
English Edit question
Status:
Solved
For:
Launchpad itself Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Julian Edwards (julian-edwards) said :
#1

Hi, as I commented on the bug this is not possible to re-enable deleted PPAs yet. It's a simple code change though and I'm happy to mentor anyone who wants to make this change themselves. You would still not be able to re-upload the same versions of deleted files in that PPA though, that requires are far more complicated change to Launchpad.

If you want to delete old "junk" without deleting the whole PPA you can manually delete all the packages too.

Revision history for this message
Felix Lechner (felix.lechner) said :
#2

Hi Julian,

Thank you for your courteous response after I made you answer the same
question twice.

Would you please briefly outline the code change, so I understand what
it would entail?

I do not plan to re-upload the same package versions. Also, I deleted
the old packages, but that did not reduce the size of the PPA. Then I
got a little trigger happy with the 'delete PPA' button...

Felix

On Thu, Jun 17, 2010 at 3:13 AM, Julian Edwards
<email address hidden> wrote:
> Your question #114852 on Soyuz changed:
> https://answers.edge.launchpad.net/soyuz/+question/114852
>
>    Status: Open => Answered
>
> Julian Edwards proposed the following answer:
> Hi, as I commented on the bug this is not possible to re-enable deleted
> PPAs yet.  It's a simple code change though and I'm happy to mentor
> anyone who wants to make this change themselves.  You would still not be
> able to re-upload the same versions of deleted files in that PPA though,
> that requires are far more complicated change to Launchpad.
>
> If you want to delete old "junk" without deleting the whole PPA you can
> manually delete all the packages too.
>
> --
> If this answers your question, please go to the following page to let us
> know that it is solved:
> https://answers.edge.launchpad.net/soyuz/+question/114852/+confirm?answer_id=0
>
> If you still need help, you can reply to this email or go to the
> following page to enter your feedback:
> https://answers.edge.launchpad.net/soyuz/+question/114852
>
> You received this question notification because you are a direct
> subscriber of the question.
>

Revision history for this message
Julian Edwards (julian-edwards) said :
#3

On Thursday 17 June 2010 15:30:38 you wrote:
> Thank you for your courteous response after I made you answer the same
> question twice.
>
> Would you please briefly outline the code change, so I understand what
> it would entail?

Sure.

When a PPA is disabled, a few things happen, in this order:

 1. The PPA's status is changed from ACTIVE to DELETING and its 'enabled' flag
is set to False.
 2. All of the PPA's packages are marked DELETED.

at some point later a cron job fires and:

 3. Marks all the published packages as removed
 4. The repository area is wiped
 5. The PPA's status is changed to DELETED.

We have the means to set the enabled flag back to True (via the Change Details
page) but there's no way of setting the status back to ACTIVE. In the code
that lives in lib/lp/soyuz/browser/archive.py there's a class called
BaseArchiveEditView. In the code that deals with the form being saved, it
should see if the archive is being re-enabled and if its status is DELETED,
then it should be set back to ACTIVE.

Corresponding tests should be written in the file lib/lp/soyuz/stories/ppa/xx-
ppa-workflow.txt near the end.

>
> I do not plan to re-upload the same package versions. Also, I deleted
> the old packages, but that did not reduce the size of the PPA. Then I
> got a little trigger happy with the 'delete PPA' button...

Packages are not deleted instantaneously, it takes a while for the cron job to
fire (every 5-10 minutes). When the files are removed from disk, the size
reduces.

Looking forward to a patch!

Revision history for this message
Felix Lechner (felix.lechner) said :
#4

Julian,

On my Launchpad account the "change details" page shows only for
disabled archives, but not for deleted ones (the link is gone). Using
the "enable" check box on that page to set the archive status back to
ACTIVE looks only like part of the solution to me. Would you please
let me know if it is okay to also show the "change details" link for
deleted archives, and how that would be done?

From a GUI design perspective, it may be more logical to place the
"re-enable" and "re-activate" links in the yellow warning window that
tells about the archive's non-active status (in <div
class="top-portlet" style="padding-top:0.5em;">). Perhaps you could
also advise on how that would be done.

Thank you for your help.

Best,
Felix

On Thu, Jun 17, 2010 at 7:45 AM, Julian Edwards
<email address hidden> wrote:
> Your question #114852 on Soyuz changed:
> https://answers.launchpad.net/soyuz/+question/114852
>
>    Status: Open => Answered
>
> Julian Edwards proposed the following answer:
> On Thursday 17 June 2010 15:30:38 you wrote:
>> Thank you for your courteous response after I made you answer the same
>> question twice.
>>
>> Would you please briefly outline the code change, so I understand what
>> it would entail?
>
> Sure.
>
> When a PPA is disabled, a few things happen, in this order:
>
>  1. The PPA's status is changed from ACTIVE to DELETING and its 'enabled' flag
> is set to False.
>  2. All of the PPA's packages are marked DELETED.
>
> at some point later a cron job fires and:
>
>  3. Marks all the published packages as removed
>  4. The repository area is wiped
>  5. The PPA's status is changed to DELETED.
>
> We have the means to set the enabled flag back to True (via the Change Details
> page) but there's no way of setting the status back to ACTIVE.  In the code
> that lives in lib/lp/soyuz/browser/archive.py there's a class called
> BaseArchiveEditView.  In the code that deals with the form being saved, it
> should see if the archive is being re-enabled and if its status is DELETED,
> then it should be set back to ACTIVE.
>
> Corresponding tests should be written in the file lib/lp/soyuz/stories/ppa/xx-
> ppa-workflow.txt near the end.
>
>>
>> I do not plan to re-upload the same package versions.  Also, I deleted
>> the old packages, but that did not reduce the size of the PPA.  Then I
>> got a little trigger happy with the 'delete PPA' button...
>
> Packages are not deleted instantaneously, it takes a while for the cron job to
> fire (every 5-10 minutes).  When the files are removed from disk, the size
> reduces.
>
> Looking forward to a patch!
>
> --
> If this answers your question, please go to the following page to let us
> know that it is solved:
> https://answers.launchpad.net/soyuz/+question/114852/+confirm?answer_id=2
>
> If you still need help, you can reply to this email or go to the
> following page to enter your feedback:
> https://answers.launchpad.net/soyuz/+question/114852
>
> You received this question notification because you are a direct
> subscriber of the question.
>

Revision history for this message
Michael Nelson (michael.nelson) said :
#5

Julian/Felix:

So is the suggestion to have "change details" available when an archive's status is "DELETED" (or also when the status is DELETING - this can't lead to an indeterminate state can it? - Julian?)

So, from a UI point of view, although it would seem more logical to present 're-activate' in the yellow warning message, I don't think we should do that as really we shouldn't be using the yellow warning message at all here (warning/error/message messages should only be displayed as the result of the persons immediate action). For this reason I'd recommend just using the normal menu.

To enable the "Change details" menu option, see lib/lp/soyuz/browser/archive.py, the ArchiveMenuMixin class defines the edit() method, and you'll see there it currently is only enabled if the archive is active.

Revision history for this message
Julian Edwards (julian-edwards) said :
#6

> or also when the status is DELETING - this can't lead to an indeterminate state can it? - Julian?)

It should not show when the status is DELETING. I'd be happy to have the link enabled when the status is ACTIVE or DELETED, I think that'd do the trick.

Revision history for this message
Felix Lechner (felix.lechner) said :
#7

Julian & Michael,

Attached please find a context diff that does the trick on my virtual
installation of Launchpad version r11036.

I tested the new file with status DELETING since the development
version has no cron job, but the changes were reverted for this
submission.

The development version has a new page for administering an archive.
The 'enable' check box is also accessible there regardless of archive
status. Making the 'change details' page visible may thus not be
necessary in future versions of Launchpad.

Regarding the tests in the file
lib/lp/soyuz/stories/ppa/xx-ppa-workflow.txt some sections need to be
modified, but I am otherwise unfamiliar with the syntax. Looks like a
python interpreter to me. Please advise.

Would you also please have an estimate for how long the change takes
to propagate to the production server? If it is more that just a few
days, it would be very kind if, in the meantime, someone with database
powers could manually set the status of my two PPAs 'linphone' and
'linphone-snapshot' to active.

Thank you.

Sincerely,
Felix

On Mon, Jun 21, 2010 at 2:54 AM, Julian Edwards
<email address hidden> wrote:
> Your question #114852 on Soyuz changed:
> https://answers.edge.launchpad.net/soyuz/+question/114852
>
>    Status: Open => Answered
>
> Julian Edwards proposed the following answer:
>> or also when the status is DELETING - this can't lead to an
> indeterminate state can it? - Julian?)
>
> It should not show when the status is DELETING.  I'd be happy to have
> the link enabled when the status is ACTIVE or DELETED, I think that'd do
> the trick.
>
> --
> If this answers your question, please go to the following page to let us
> know that it is solved:
> https://answers.edge.launchpad.net/soyuz/+question/114852/+confirm?answer_id=5
>
> If you still need help, you can reply to this email or go to the
> following page to enter your feedback:
> https://answers.edge.launchpad.net/soyuz/+question/114852
>
> You received this question notification because you are a direct
> subscriber of the question.
>

Revision history for this message
Launchpad Janitor (janitor) said :
#8

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Revision history for this message
Felix Lechner (felix.lechner) said :
#9

Hello gentlemen,

Did you receive the patch suggestion for 'lib/lp/soyuz/browser/archive.py'?

The issue is no longer pressing for me, but I never received a response.

The Launchpad question tracker is now deleting the question.

Best regards,
Felix

On Wed, Jul 7, 2010 at 1:31 AM, Launchpad Janitor <
<email address hidden>> wrote:

> Your question #114852 on Soyuz changed:
> https://answers.launchpad.net/soyuz/+question/114852
>
> Status: Open => Expired
>
> Launchpad Janitor expired the question:
> This question was expired because it remained in the 'Open' state
> without activity for the last 15 days.
>
> --
> If you're still having this problem, you can reopen your question either
> by replying to this email or by going to the following page and
> entering more information about your problem:
> https://answers.launchpad.net/soyuz/+question/114852
>
> You received this question notification because you are a direct
> subscriber of the question.
>

Revision history for this message
Julian Edwards (julian-edwards) said :
#10

Sorry Felix, we've been busy preparing for the release last night. Your patch didn't make it through unfortunately, the best thing you can do is either:

 a) make a merge proposal against the Launchpad project
 b) file a bug and attach it there

Cheers.

Revision history for this message
Felix Lechner (felix.lechner) said :
#11

No problem. The issue has been resolved. I just called the PPAs something
different.

Thank you for the help and the work on Launchpad.

On Wed, Jul 7, 2010 at 2:08 AM, Julian Edwards <
<email address hidden>> wrote:

> Your question #114852 on Soyuz changed:
> https://answers.edge.launchpad.net/soyuz/+question/114852
>
> Status: Open => Answered
>
> Julian Edwards proposed the following answer:
> Sorry Felix, we've been busy preparing for the release last night. Your
> patch didn't make it through unfortunately, the best thing you can do is
> either:
>
> a) make a merge proposal against the Launchpad project
> b) file a bug and attach it there
>
> Cheers.
>
> --
> If this answers your question, please go to the following page to let us
> know that it is solved:
>
> https://answers.edge.launchpad.net/soyuz/+question/114852/+confirm?answer_id=9
>
> If you still need help, you can reply to this email or go to the
> following page to enter your feedback:
> https://answers.edge.launchpad.net/soyuz/+question/114852
>
> You received this question notification because you are a direct
> subscriber of the question.
>

Revision history for this message
Julian Edwards (julian-edwards) said :
#12

Closing question.

Revision history for this message
Giles Bathgate (gilesbathgate) said :
#13

okay, so using this information I realised that you can simply re-enable a deleted PPA by going to the url

https://launchpad.net/~<username>/+archive/<ppaname>/+edit

Then simply check the "enabled" and "publish" checkboxes.

It does seem to however leave the re-enabled PPA in a state where the expected links

    * Change details
    * Edit PPA dependencies
    * Delete PPA

Are missing from the side panel

Revision history for this message
Maarten Bezemer (veger) said :
#14

Thanks for your tip. Althought it seems more like a loop-hole in the system, it did the trick for me!
(Indeed the sidebar at the right is missing)

Revision history for this message
fnu (fnu) said :
#15

Thanks for the valuable hint!

Had the same problem due playing a little bit with PPA, to get a feeling how it does work, as I realized that deleted PPAs do not disapear nor the same name is reusable.

This should IMHO be changed in the system, at least in a way that a deleted PPA can be used after a specific period, e.g. 7 days or so ...

Revision history for this message
Matthew Twomey (mtwomey) said :
#16

I agree with the idea that a deleted PPA should be "purged" eventually so that the name can be reused. I fell into the same trap - deleted a PPA, thinking that would let me start over and now the name I wanted was taken. I was able to re-enable it with the "trick" above, but as stated by others - there is no sidebar.

Revision history for this message
WoLpH (rick-van-hattem) said :
#17

I seem to be having the same problem, is there a fix yet? Can we either replace the old one or fully re-enable it?

Now I'm at 50% with the half-working PPA and a different PPA with the same name (but different url) which I'd rather not use.

Revision history for this message
Elio Esteves Duarte (stvs) said :
#18

Really, this feature is annoying. Exists a open bug?

Revision history for this message
sledgehammer999 (sledgehammer-999) said :
#19

I fell into the same trap. I deleted a PPA while testing and now I cannot reuse the same name. Can somebody take a look into this? I don't want to use a different name for my PPA.

Revision history for this message
William Grant (wgrant) said :
#20

You may need to wait up to 30 minutes after you delete a PPA before you can reuse its name.

Revision history for this message
sledgehammer999 (sledgehammer-999) said :
#21

You are right. Thanks.