~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/soyuz/model/publishing.py

  • Committer: Launchpad Patch Queue Manager
  • Date: 2011-08-26 14:57:54 UTC
  • mfrom: (13794.1.12 bug-832661)
  • Revision ID: launchpad@pqm.canonical.com-20110826145754-364nkd1s6ofz4nqd
[r=adeuring][bug=832661] Create DSDJs from requestDeletion.

Show diffs side-by-side

added added

removed removed

Lines of Context:
339
339
        self.removed_by = removed_by
340
340
        self.removal_comment = removal_comment
341
341
 
342
 
    def requestDeletion(self, removed_by, removal_comment=None):
343
 
        """See `IPublishing`."""
344
 
        self.setDeleted(removed_by, removal_comment)
345
 
        if ISourcePackagePublishingHistory.providedBy(self):
346
 
            if self.archive == self.distroseries.main_archive:
347
 
                dsd_job_source = getUtility(IDistroSeriesDifferenceJobSource)
348
 
                dsd_job_source.createForPackagePublication(
349
 
                    self.distroseries,
350
 
                    self.sourcepackagerelease.sourcepackagename, self.pocket)
351
 
 
352
342
    def requestObsolescence(self):
353
343
        """See `IArchivePublisher`."""
354
344
        # The tactic here is to bypass the domination step when publishing,
901
891
    def requestDeletion(self, removed_by, removal_comment=None):
902
892
        """See `IPublishing`."""
903
893
        self.setDeleted(removed_by, removal_comment)
904
 
        if self.archive == self.distroseries.main_archive:
 
894
        if self.archive.is_main:
905
895
            dsd_job_source = getUtility(IDistroSeriesDifferenceJobSource)
906
896
            dsd_job_source.createForPackagePublication(
907
897
                self.distroseries,
2010
2000
            SourcePackagePublishingHistory, spph_ids, removed_by,
2011
2001
            removal_comment=removal_comment)
2012
2002
 
 
2003
        getUtility(IDistroSeriesDifferenceJobSource).createForSPPHs(sources)
 
2004
 
2013
2005
        # Mark binary publications deleted.
2014
2006
        bpph_ids = [
2015
2007
            bpph.id