~launchpad-pqm/launchpad/devel

« back to all changes in this revision

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

  • Committer: Launchpad Patch Queue Manager
  • Date: 2011-07-25 17:58:32 UTC
  • mfrom: (13478.1.4 bug-788685)
  • Revision ID: launchpad@pqm.canonical.com-20110725175832-0tfzsnth7gudbpdk
[r=danilo][bug=788685] Allow translations for components other than
        'main' and 'restricted' for Oneiric and onward.

Show diffs side-by-side

added added

removed removed

Lines of Context:
60
60
# that it needs a bit of redesigning here around the publication stuff.
61
61
from lp.archivepublisher.config import getPubConfig
62
62
from lp.archivepublisher.customupload import CustomUploadError
 
63
from lp.archivepublisher.debversion import Version
63
64
from lp.archiveuploader.tagfiles import parse_tagfile_content
64
65
from lp.registry.interfaces.pocket import PackagePublishingPocket
65
66
from lp.registry.model.sourcepackagename import SourcePackageName
1298
1299
                  "in MAIN_ARCHIVE_PURPOSES.")
1299
1300
            return
1300
1301
 
 
1302
        # If the distroseries is 11.10 (oneiric) or later, the valid names
 
1303
        # check is not required.  (See bug 788685.)
 
1304
        distroseries = sourcepackagerelease.upload_distroseries
 
1305
        do_names_check = Version(distroseries.version) < Version('11.10')
 
1306
 
1301
1307
        valid_pockets = (
1302
1308
            PackagePublishingPocket.RELEASE, PackagePublishingPocket.SECURITY,
1303
1309
            PackagePublishingPocket.UPDATES, PackagePublishingPocket.PROPOSED)
1304
 
        valid_component_names = ('main', 'restricted')
 
1310
        valid_components = ('main', 'restricted')
1305
1311
        if (self.packageupload.pocket not in valid_pockets or
1306
 
            sourcepackagerelease.component.name not in valid_component_names):
 
1312
            (do_names_check and
 
1313
            sourcepackagerelease.component.name not in valid_components)):
1307
1314
            # XXX: CarlosPerelloMarin 2006-02-16 bug=31665:
1308
1315
            # This should be implemented using a more general rule to accept
1309
1316
            # different policies depending on the distribution.