~launchpad-pqm/launchpad/devel

« back to all changes in this revision

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

  • Committer: j.c.sackett
  • Date: 2011-11-04 18:12:47 UTC
  • mfrom: (14253 devel)
  • mto: This revision was merged to the branch mainline in revision 14287.
  • Revision ID: jonathan.sackett@canonical.com-20111104181247-5p1rmwj734n4onis
Merged in devel.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
from lazr.delegates import delegates
18
18
from zope.interface import implements
19
19
 
20
 
from canonical.launchpad.browser.librarian import ProxiedLibraryFileAlias
 
20
from canonical.launchpad.browser.librarian import (
 
21
    FileNavigationMixin,
 
22
    ProxiedLibraryFileAlias,
 
23
    )
 
24
from canonical.launchpad.webapp import Navigation
21
25
from canonical.launchpad.webapp.authorization import check_permission
22
26
from canonical.launchpad.webapp.interfaces import ICanonicalUrlData
23
27
from canonical.launchpad.webapp.menu import structured
62
66
        return u"+binarypub/%s" % self.context.id
63
67
 
64
68
 
 
69
class SourcePackagePublishingHistoryNavigation(Navigation,
 
70
                                               FileNavigationMixin):
 
71
    usedfor = ISourcePackagePublishingHistory
 
72
 
 
73
 
65
74
class ProxiedPackageDiff:
66
75
    """A `PackageDiff` extension.
67
76
 
121
130
        accessor = attrgetter(self.timestamp_map[self.context.status])
122
131
        return accessor(self.context)
123
132
 
124
 
 
125
133
    def wasDeleted(self):
126
134
        """Whether or not a publishing record deletion was requested.
127
135
 
157
165
        archive disk once it pass through its quarantine period and it's not
158
166
        referred by any other archive publishing record.
159
167
        Archive removal represents the act of having its content purged from
160
 
        archive disk, such situation can be triggered for different status,
161
 
        each one representing a distinct step in the Soyuz publishing workflow:
 
168
        archive disk, such situation can be triggered for different
 
169
        status, each one representing a distinct step in the Soyuz
 
170
        publishing workflow:
162
171
 
163
 
         * SUPERSEDED -> the publication is not necessary since there is already
164
 
           a newer/higher/modified version available
 
172
         * SUPERSEDED -> the publication is not necessary since there is
 
173
           already a newer/higher/modified version available
165
174
 
166
175
         * DELETED -> the publishing was explicitly marked for removal by a
167
176
           archive-administrator, it's not wanted in the archive.
168
177
 
169
 
         * OBSOLETE -> the publication has become obsolete because its targeted
170
 
           distroseries has become obsolete (not supported by its developers).
 
178
         * OBSOLETE -> the publication has become obsolete because its
 
179
           targeted distroseries has become obsolete (not supported by its
 
180
           developers).
171
181
        """
172
182
        return self.context.dateremoved is not None
173
183
 
303
313
            packagename = package.binarypackagename.name
304
314
            if packagename not in packagenames:
305
315
                entry = {
306
 
                    "binarypackagename" : packagename,
307
 
                    "summary" : package.summary,
 
316
                    "binarypackagename": packagename,
 
317
                    "summary": package.summary,
308
318
                    }
309
319
                results.append(entry)
310
320
                packagenames.add(packagename)
331
341
        return check_permission('launchpad.View', archive)
332
342
 
333
343
    @property
334
 
    def recipe_build_details(self): 
 
344
    def recipe_build_details(self):
335
345
        """Return a linkified string containing details about a
336
346
        SourcePackageRecipeBuild.
337
347
        """
393
403
            return True
394
404
 
395
405
        return False
396