← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~julian-edwards/launchpad/soyuz-enums into lp:launchpad/devel

 

Julian Edwards has proposed merging lp:~julian-edwards/launchpad/soyuz-enums into lp:launchpad/devel.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

-- 
https://code.launchpad.net/~julian-edwards/launchpad/soyuz-enums/+merge/33626
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~julian-edwards/launchpad/soyuz-enums into lp:launchpad/devel.
=== modified file 'lib/canonical/launchpad/doc/tales.txt'
--- lib/canonical/launchpad/doc/tales.txt	2010-08-04 09:39:04 +0000
+++ lib/canonical/launchpad/doc/tales.txt	2010-08-25 10:56:48 +0000
@@ -113,8 +113,8 @@
 
 And finally Copy archives.
 
-    >>> from lp.soyuz.interfaces.archive import (
-    ...     ArchivePurpose, IArchiveSet)
+    >>> from lp.soyuz.interfaces.archive import IArchiveSet
+    >>> from lp.soyuz.enums import ArchivePurpose
     >>> copy = getUtility(IArchiveSet).new(
     ...     owner=mark, purpose=ArchivePurpose.COPY,
     ...     distribution=ubuntu, name='rebuild')
@@ -1292,7 +1292,7 @@
 
 Test the 'lp:' namespace for presenting DBSchema items.
 
-    >>> from canonical.launchpad.interfaces import BinaryPackageFormat
+    >>> from lp.soyuz.enums import BinaryPackageFormat
     >>> deb = BinaryPackageFormat.DEB.value
     >>> test_tales('deb/lp:BinaryPackageFormat', deb=deb)
     'Ubuntu Package'
@@ -1329,7 +1329,6 @@
 This was going to be called 'enum-value', but Zope doesn't allow this.
 To be fixed upstream.
 
-    >>> from canonical.launchpad.interfaces import BinaryPackageFormat
     >>> deb = BinaryPackageFormat.DEB
     >>> udeb = BinaryPackageFormat.UDEB
     >>> test_tales('deb/enumvalue:DEB', deb=deb)

=== modified file 'lib/canonical/launchpad/doc/validation.txt'
--- lib/canonical/launchpad/doc/validation.txt	2009-04-28 12:59:43 +0000
+++ lib/canonical/launchpad/doc/validation.txt	2010-08-25 10:56:48 +0000
@@ -58,7 +58,7 @@
 PPA.
 
     >>> from lp.soyuz.tests.ppa import publishToPPA
-    >>> from canonical.launchpad.interfaces import PackagePublishingStatus
+    >>> from lp.soyuz.enums import PackagePublishingStatus
     >>> publishToPPA(
     ...     person_name='cprov',
     ...     sourcepackage_name='foobar',

=== modified file 'lib/canonical/launchpad/doc/vocabularies.txt'
--- lib/canonical/launchpad/doc/vocabularies.txt	2010-02-17 11:13:06 +0000
+++ lib/canonical/launchpad/doc/vocabularies.txt	2010-08-25 10:56:48 +0000
@@ -724,8 +724,8 @@
 
 We will create an additional PPA for Celso named 'testing'
 
-    >>> from lp.soyuz.interfaces.archive import (
-    ...     ArchivePurpose, IArchiveSet)
+    >>> from lp.soyuz.enums import ArchivePurpose
+    >>> from lp.soyuz.interfaces.archive import IArchiveSet
 
     >>> login_person(current_user)
     >>> cprov = getUtility(IPersonSet).getByName('cprov')

=== modified file 'lib/canonical/launchpad/interfaces/_schema_circular_imports.py'
--- lib/canonical/launchpad/interfaces/_schema_circular_imports.py	2010-08-20 20:31:18 +0000
+++ lib/canonical/launchpad/interfaces/_schema_circular_imports.py	2010-08-25 10:56:48 +0000
@@ -89,6 +89,11 @@
     IStructuralSubscription,
     IStructuralSubscriptionTarget,
     )
+from lp.soyuz.enums import (
+    PackagePublishingStatus,
+    PackageUploadCustomFormat,
+    PackageUploadStatus,
+    )
 from lp.soyuz.interfaces.archive import IArchive
 from lp.soyuz.interfaces.archivedependency import IArchiveDependency
 from lp.soyuz.interfaces.archivepermission import IArchivePermission
@@ -101,12 +106,9 @@
     IBinaryPackagePublishingHistory,
     ISourcePackagePublishingHistory,
     ISourcePackagePublishingHistoryPublic,
-    PackagePublishingStatus,
     )
 from lp.soyuz.interfaces.queue import (
     IPackageUpload,
-    PackageUploadCustomFormat,
-    PackageUploadStatus,
     )
 from lp.soyuz.interfaces.sourcepackagerelease import ISourcePackageRelease
 from lp.translations.interfaces.pofile import IPOFile

=== modified file 'lib/canonical/launchpad/testing/fakepackager.py'
--- lib/canonical/launchpad/testing/fakepackager.py	2010-08-20 20:31:18 +0000
+++ lib/canonical/launchpad/testing/fakepackager.py	2010-08-25 10:56:48 +0000
@@ -24,11 +24,11 @@
 from canonical.launchpad.interfaces import (
     IDistributionSet,
     IGPGHandler,
-    PackageUploadStatus,
     )
 from canonical.launchpad.scripts import QuietFakeLogger
 from lp.archiveuploader.nascentupload import NascentUpload
 from lp.archiveuploader.uploadpolicy import findPolicyByName
+from lp.soyuz.enums import PackageUploadStatus
 
 
 changelog_entry_template = (

=== modified file 'lib/canonical/launchpad/vocabularies/dbobjects.py'
--- lib/canonical/launchpad/vocabularies/dbobjects.py	2010-08-20 20:31:18 +0000
+++ lib/canonical/launchpad/vocabularies/dbobjects.py	2010-08-25 10:56:48 +0000
@@ -112,7 +112,7 @@
 from lp.services.worlddata.interfaces.language import ILanguage
 from lp.services.worlddata.model.country import Country
 from lp.services.worlddata.model.language import Language
-from lp.soyuz.interfaces.archive import ArchivePurpose
+from lp.soyuz.enums import ArchivePurpose
 from lp.soyuz.model.component import Component
 from lp.soyuz.model.distroarchseries import DistroArchSeries
 from lp.soyuz.model.processor import (

=== modified file 'lib/canonical/launchpad/webapp/tales.py'
--- lib/canonical/launchpad/webapp/tales.py	2010-08-20 20:31:18 +0000
+++ lib/canonical/launchpad/webapp/tales.py	2010-08-25 10:56:48 +0000
@@ -60,7 +60,8 @@
 from lp.blueprints.interfaces.specification import ISpecification
 from lp.buildmaster.interfaces.buildbase import BuildStatus
 from lp.code.interfaces.branch import IBranch
-from lp.soyuz.interfaces.archive import ArchivePurpose, IPPA
+from lp.soyuz.enums import ArchivePurpose
+from lp.soyuz.interfaces.archive import IPPA
 from lp.soyuz.interfaces.archivesubscriber import IArchiveSubscriberSet
 from lp.registry.interfaces.person import IPerson
 

=== modified file 'lib/lp/archivepublisher/__init__.py'
--- lib/lp/archivepublisher/__init__.py	2009-06-24 23:28:16 +0000
+++ lib/lp/archivepublisher/__init__.py	2010-08-25 10:56:48 +0000
@@ -3,7 +3,7 @@
 
 __all__ = ['HARDCODED_COMPONENT_ORDER', 'ELIGIBLE_DOMINATION_STATES']
 
-from canonical.launchpad.interfaces import PackagePublishingStatus
+from lp.soyuz.enums import PackagePublishingStatus
 
 # XXX: kiko 2006-08-23: if people actually start seriously using
 # ComponentSelections this will need to be revisited. For instance, adding

=== modified file 'lib/lp/archivepublisher/config.py'
--- lib/lp/archivepublisher/config.py	2010-08-20 20:31:18 +0000
+++ lib/lp/archivepublisher/config.py	2010-08-25 10:56:48 +0000
@@ -11,7 +11,7 @@
 from StringIO import StringIO
 
 from canonical.config import config
-from lp.soyuz.interfaces.archive import ArchivePurpose
+from lp.soyuz.enums import ArchivePurpose
 
 
 def update_pub_config(pubconf):

=== modified file 'lib/lp/archivepublisher/deathrow.py'
--- lib/lp/archivepublisher/deathrow.py	2010-08-20 20:31:18 +0000
+++ lib/lp/archivepublisher/deathrow.py	2010-08-25 10:56:48 +0000
@@ -21,7 +21,7 @@
     )
 from lp.archivepublisher.diskpool import DiskPool
 from lp.archivepublisher.utils import process_in_batches
-from lp.soyuz.interfaces.archive import ArchivePurpose
+from lp.soyuz.enums import ArchivePurpose
 from lp.soyuz.interfaces.publishing import (
     IBinaryPackagePublishingHistory,
     ISourcePackagePublishingHistory,

=== modified file 'lib/lp/archivepublisher/domination.py'
--- lib/lp/archivepublisher/domination.py	2010-08-20 20:31:18 +0000
+++ lib/lp/archivepublisher/domination.py	2010-08-25 10:56:48 +0000
@@ -66,9 +66,11 @@
     flush_database_updates,
     sqlvalues,
     )
-from canonical.launchpad.interfaces import PackagePublishingStatus
 from lp.archivepublisher import ELIGIBLE_DOMINATION_STATES
-from lp.soyuz.interfaces.binarypackagerelease import BinaryPackageFormat
+from lp.soyuz.enums import (
+    BinaryPackageFormat,
+    PackagePublishingStatus,
+    )
 
 
 def clear_cache():

=== modified file 'lib/lp/archivepublisher/ftparchive.py'
--- lib/lp/archivepublisher/ftparchive.py	2010-08-20 20:31:18 +0000
+++ lib/lp/archivepublisher/ftparchive.py	2010-08-25 10:56:48 +0000
@@ -28,7 +28,7 @@
     pocketsuffix,
     )
 from lp.registry.model.sourcepackagename import SourcePackageName
-from lp.soyuz.interfaces.publishing import PackagePublishingStatus
+from lp.soyuz.enums import PackagePublishingStatus
 from lp.soyuz.model.component import Component
 from lp.soyuz.model.section import Section
 

=== modified file 'lib/lp/archivepublisher/publishing.py'
--- lib/lp/archivepublisher/publishing.py	2010-08-20 20:31:18 +0000
+++ lib/lp/archivepublisher/publishing.py	2010-08-25 10:56:48 +0000
@@ -39,13 +39,13 @@
     PackagePublishingPocket,
     pocketsuffix,
     )
-from lp.soyuz.interfaces.archive import (
+from lp.soyuz.enums import (
     ArchivePurpose,
     ArchiveStatus,
+    BinaryPackageFormat,
+    PackagePublishingStatus,
     )
-from lp.soyuz.interfaces.binarypackagerelease import BinaryPackageFormat
 from lp.soyuz.interfaces.component import IComponentSet
-from lp.soyuz.interfaces.publishing import PackagePublishingStatus
 
 
 suffixpocket = dict((v, k) for (k, v) in pocketsuffix.items())

=== modified file 'lib/lp/archivepublisher/scripts/generate_ppa_htaccess.py'
--- lib/lp/archivepublisher/scripts/generate_ppa_htaccess.py	2010-08-20 20:31:18 +0000
+++ lib/lp/archivepublisher/scripts/generate_ppa_htaccess.py	2010-08-25 10:56:48 +0000
@@ -25,15 +25,15 @@
 from lp.archivepublisher.config import getPubConfig
 from lp.services.mail.mailwrapper import MailWrapper
 from lp.services.scripts.base import LaunchpadCronScript
+from lp.soyuz.enums import ArchiveStatus
 from lp.soyuz.interfaces.archive import (
-    ArchiveStatus,
     IArchiveSet,
     )
 from lp.soyuz.interfaces.archiveauthtoken import IArchiveAuthTokenSet
 from lp.soyuz.interfaces.archivesubscriber import (
-    ArchiveSubscriberStatus,
     IArchiveSubscriberSet,
     )
+from lp.soyuz.enums import ArchiveSubscriberStatus
 
 # These PPAs should never have their htaccess/pwd files touched.
 BLACKLISTED_PPAS = {

=== modified file 'lib/lp/archivepublisher/tests/archive-signing.txt'
--- lib/lp/archivepublisher/tests/archive-signing.txt	2010-04-21 11:56:03 +0000
+++ lib/lp/archivepublisher/tests/archive-signing.txt	2010-08-25 10:56:48 +0000
@@ -264,7 +264,7 @@
 already configured to used the same signing-key created for the
 default PPA. We will create a named-ppa for Celso.
 
-    >>> from lp.soyuz.interfaces.archive import ArchivePurpose
+    >>> from lp.soyuz.enums import ArchivePurpose
     >>> named_ppa = getUtility(IArchiveSet).new(
     ...     owner=cprov, purpose=ArchivePurpose.PPA, name='boing')
 

=== modified file 'lib/lp/archivepublisher/tests/deathrow.txt'
--- lib/lp/archivepublisher/tests/deathrow.txt	2010-01-10 04:58:44 +0000
+++ lib/lp/archivepublisher/tests/deathrow.txt	2010-08-25 10:56:48 +0000
@@ -36,7 +36,7 @@
     >>> from lp.soyuz.tests.test_publishing import (
     ...     SoyuzTestPublisher)
     >>> from lp.registry.interfaces.pocket import PackagePublishingPocket
-    >>> from lp.soyuz.interfaces.publishing import (
+    >>> from lp.soyuz.enums import (
     ...     PackagePublishingStatus)
 
     >>> hoary = ubuntu.getSeries('hoary')

=== modified file 'lib/lp/archivepublisher/tests/process-in-batches.txt'
--- lib/lp/archivepublisher/tests/process-in-batches.txt	2009-05-13 12:02:17 +0000
+++ lib/lp/archivepublisher/tests/process-in-batches.txt	2010-08-25 10:56:48 +0000
@@ -26,7 +26,7 @@
 
     >>> from lp.soyuz.model.publishing import (
     ...     BinaryPackagePublishingHistory)
-    >>> from lp.soyuz.interfaces.publishing import (
+    >>> from lp.soyuz.enums import (
     ...     PackagePublishingStatus)
 
     >>> input = BinaryPackagePublishingHistory.selectBy(

=== modified file 'lib/lp/archivepublisher/tests/publisher-config.txt'
--- lib/lp/archivepublisher/tests/publisher-config.txt	2010-02-26 15:13:28 +0000
+++ lib/lp/archivepublisher/tests/publisher-config.txt	2010-08-25 10:56:48 +0000
@@ -177,7 +177,7 @@
 besides PRIMARY repository ones, but the distribution part is
 modified to be clearly different than the PRIMARY one.
 
-    >>> from lp.soyuz.interfaces.archive import ArchivePurpose
+    >>> from lp.soyuz.enums import ArchivePurpose
     >>> debug_archive = getUtility(IArchiveSet).new(
     ...     purpose=ArchivePurpose.DEBUG, owner=ubuntutest.owner,
     ...     distribution=ubuntutest)

=== modified file 'lib/lp/archivepublisher/tests/publishing-meta-data-files.txt'
--- lib/lp/archivepublisher/tests/publishing-meta-data-files.txt	2010-06-17 12:38:32 +0000
+++ lib/lp/archivepublisher/tests/publishing-meta-data-files.txt	2010-08-25 10:56:48 +0000
@@ -14,7 +14,7 @@
     >>> from lp.archiveuploader.tests import mock_logger
     >>> from lp.registry.interfaces.distribution import IDistributionSet
     >>> from lp.soyuz.interfaces.publishing import PackagePublishingPocket
-    >>> from lp.soyuz.interfaces.queue import PackageUploadCustomFormat
+    >>> from lp.soyuz.enums import PackageUploadCustomFormat
     >>> from lp.soyuz.model.queue import PackageUploadCustom
     >>> from cStringIO import StringIO
 

=== modified file 'lib/lp/archivepublisher/tests/test_dominator.py'
--- lib/lp/archivepublisher/tests/test_dominator.py	2010-08-20 20:31:18 +0000
+++ lib/lp/archivepublisher/tests/test_dominator.py	2010-08-25 10:56:48 +0000
@@ -11,7 +11,7 @@
 from lp.archivepublisher.domination import Dominator
 from lp.archivepublisher.publishing import Publisher
 from lp.registry.interfaces.series import SeriesStatus
-from lp.soyuz.interfaces.publishing import PackagePublishingStatus
+from lp.soyuz.enums import PackagePublishingStatus
 from lp.soyuz.tests.test_publishing import TestNativePublishingBase
 
 

=== modified file 'lib/lp/archivepublisher/tests/test_generate_ppa_htaccess.py'
--- lib/lp/archivepublisher/tests/test_generate_ppa_htaccess.py	2010-08-20 20:31:18 +0000
+++ lib/lp/archivepublisher/tests/test_generate_ppa_htaccess.py	2010-08-25 10:56:48 +0000
@@ -29,8 +29,10 @@
     HtaccessTokenGenerator,
     )
 from lp.services.mail import stub
-from lp.soyuz.interfaces.archive import ArchiveStatus
-from lp.soyuz.interfaces.archivesubscriber import ArchiveSubscriberStatus
+from lp.soyuz.enums import (
+    ArchiveStatus,
+    ArchiveSubscriberStatus,
+    )
 from lp.testing import TestCaseWithFactory
 from lp.testing.mail_helpers import pop_notifications
 

=== modified file 'lib/lp/archivepublisher/tests/test_publisher.py'
--- lib/lp/archivepublisher/tests/test_publisher.py	2010-08-20 20:31:18 +0000
+++ lib/lp/archivepublisher/tests/test_publisher.py	2010-08-25 10:56:48 +0000
@@ -35,13 +35,15 @@
 from lp.registry.interfaces.person import IPersonSet
 from lp.registry.interfaces.pocket import PackagePublishingPocket
 from lp.registry.interfaces.series import SeriesStatus
-from lp.soyuz.interfaces.archive import (
+from lp.soyuz.enums import (
     ArchivePurpose,
     ArchiveStatus,
+    BinaryPackageFormat,
+    PackagePublishingStatus,
+    )
+from lp.soyuz.interfaces.archive import (
     IArchiveSet,
     )
-from lp.soyuz.interfaces.binarypackagerelease import BinaryPackageFormat
-from lp.soyuz.interfaces.publishing import PackagePublishingStatus
 from lp.soyuz.tests.test_publishing import TestNativePublishingBase
 
 

=== modified file 'lib/lp/archivepublisher/utils.py'
--- lib/lp/archivepublisher/utils.py	2010-08-23 11:04:24 +0000
+++ lib/lp/archivepublisher/utils.py	2010-08-25 10:56:48 +0000
@@ -32,8 +32,8 @@
     MAIN_STORE,
     )
 from canonical.mem import resident
+from lp.soyuz.enums import ArchivePurpose
 from lp.soyuz.interfaces.archive import (
-    ArchivePurpose,
     default_name_by_purpose,
     )
 

=== modified file 'lib/lp/archiveuploader/changesfile.py'
--- lib/lp/archiveuploader/changesfile.py	2010-08-20 20:31:18 +0000
+++ lib/lp/archiveuploader/changesfile.py	2010-08-25 10:56:48 +0000
@@ -47,7 +47,7 @@
     SourcePackageFileType,
     SourcePackageUrgency,
     )
-from lp.soyuz.interfaces.binarypackagerelease import BinaryPackageFileType
+from lp.soyuz.enums import BinaryPackageFileType
 
 
 class CannotDetermineFileTypeError(Exception):

=== modified file 'lib/lp/archiveuploader/dscfile.py'
--- lib/lp/archiveuploader/dscfile.py	2010-08-24 08:43:51 +0000
+++ lib/lp/archiveuploader/dscfile.py	2010-08-25 10:56:48 +0000
@@ -67,11 +67,13 @@
     PersonCreationRationale,
     )
 from lp.registry.interfaces.sourcepackage import SourcePackageFileType
+from lp.soyuz.enums import (
+    ArchivePurpose,
+    SourcePackageFormat,
+    )
 from lp.soyuz.interfaces.archive import (
-    ArchivePurpose,
     IArchiveSet,
     )
-from lp.soyuz.interfaces.sourcepackageformat import SourcePackageFormat
 
 
 class DpkgSourceError(Exception):

=== modified file 'lib/lp/archiveuploader/nascentupload.py'
--- lib/lp/archiveuploader/nascentupload.py	2010-08-24 08:43:51 +0000
+++ lib/lp/archiveuploader/nascentupload.py	2010-08-25 10:56:48 +0000
@@ -46,7 +46,6 @@
 from lp.registry.interfaces.pocket import PackagePublishingPocket
 from lp.registry.interfaces.sourcepackage import SourcePackageFileType
 from lp.soyuz.interfaces.archive import (
-    ArchivePurpose,
     MAIN_ARCHIVE_PURPOSES,
     )
 
@@ -462,7 +461,7 @@
         if not self.policy.distroseries:
             # Greasy hack until above bug is fixed.
             return False
-        return self.policy.archive.purpose == ArchivePurpose.PPA
+        return self.policy.archive.is_ppa
 
     def getComponents(self):
         """Return a set of components present in the uploaded files."""

=== modified file 'lib/lp/archiveuploader/nascentuploadfile.py'
--- lib/lp/archiveuploader/nascentuploadfile.py	2010-08-20 20:31:18 +0000
+++ lib/lp/archiveuploader/nascentuploadfile.py	2010-08-25 10:56:48 +0000
@@ -45,15 +45,15 @@
     re_valid_version,
     )
 from lp.buildmaster.interfaces.buildbase import BuildStatus
+from lp.soyuz.enums import (
+    BinaryPackageFormat,
+    PackageUploadCustomFormat,
+    PackageUploadStatus,
+    )
 from lp.soyuz.interfaces.binarypackagebuild import IBinaryPackageBuildSet
 from lp.soyuz.interfaces.binarypackagename import IBinaryPackageNameSet
-from lp.soyuz.interfaces.binarypackagerelease import BinaryPackageFormat
 from lp.soyuz.interfaces.component import IComponentSet
 from lp.soyuz.interfaces.publishing import PackagePublishingPriority
-from lp.soyuz.interfaces.queue import (
-    PackageUploadCustomFormat,
-    PackageUploadStatus,
-    )
 from lp.soyuz.interfaces.section import ISectionSet
 from lp.soyuz.model.files import SourceFileMixin
 

=== modified file 'lib/lp/archiveuploader/tests/nascentupload-announcements.txt'
--- lib/lp/archiveuploader/tests/nascentupload-announcements.txt	2010-08-20 12:11:30 +0000
+++ lib/lp/archiveuploader/tests/nascentupload-announcements.txt	2010-08-25 10:56:48 +0000
@@ -256,7 +256,8 @@
 
 A PPA upload will contain the X-Launchpad-PPA header.
 
-  >>> from lp.soyuz.interfaces.archive import ArchivePurpose, IArchiveSet
+  >>> from lp.soyuz.enums import ArchivePurpose
+  >>> from lp.soyuz.interfaces.archive import IArchiveSet
   >>> from lp.registry.interfaces.distribution import IDistributionSet
   >>> from lp.registry.interfaces.person import IPersonSet
 

=== modified file 'lib/lp/archiveuploader/tests/nascentupload-ddebs.txt'
--- lib/lp/archiveuploader/tests/nascentupload-ddebs.txt	2010-07-21 08:07:08 +0000
+++ lib/lp/archiveuploader/tests/nascentupload-ddebs.txt	2010-08-25 10:56:48 +0000
@@ -148,8 +148,8 @@
 We start by creating a COPY archive and a source publication to
 receive the DDEB.
 
-    >>> from lp.soyuz.interfaces.archive import (
-    ...     IArchiveSet, ArchivePurpose)
+    >>> from lp.soyuz.enums import ArchivePurpose
+    >>> from lp.soyuz.interfaces.archive import IArchiveSet
 
     >>> copy = getUtility(IArchiveSet).new(
     ...     owner=ubuntu.owner, purpose=ArchivePurpose.COPY,

=== modified file 'lib/lp/archiveuploader/tests/nascentupload-packageset.txt'
--- lib/lp/archiveuploader/tests/nascentupload-packageset.txt	2010-08-05 10:27:01 +0000
+++ lib/lp/archiveuploader/tests/nascentupload-packageset.txt	2010-08-25 10:56:48 +0000
@@ -4,8 +4,9 @@
     >>> from lp.archiveuploader.tests import (
     ...     datadir, getPolicy, mock_logger_quiet)
     >>> from canonical.database.sqlbase import commit
+    >>> from lp.soyuz.enums import ArchivePermissionType
     >>> from canonical.launchpad.interfaces import (
-    ...     ArchivePermissionType, IArchivePermissionSet, IPackagesetSet,
+    ...     IArchivePermissionSet, IPackagesetSet,
     ...     IPersonSet, ISourcePackageNameSet)
     >>> from canonical.testing import LaunchpadZopelessLayer
 

=== modified file 'lib/lp/archiveuploader/tests/nascentupload.txt'
--- lib/lp/archiveuploader/tests/nascentupload.txt	2010-08-20 12:11:30 +0000
+++ lib/lp/archiveuploader/tests/nascentupload.txt	2010-08-25 10:56:48 +0000
@@ -478,7 +478,7 @@
   >>> print ed_src_dup.queue_root.status.name
   REJECTED
 
-  >>> from canonical.launchpad.interfaces import PackageUploadStatus
+  >>> from lp.soyuz.enums import PackageUploadStatus
   >>> hoary.getQueueItems(
   ...     status=PackageUploadStatus.REJECTED, name="ed").count()
   1
@@ -889,8 +889,8 @@
 
     >>> commit()
     >>> LaunchpadZopelessLayer.switchDbUser('launchpad')
-    >>> from canonical.launchpad.interfaces import (
-    ...     ArchivePermissionType, ISourcePackageNameSet)
+    >>> from lp.soyuz.enums import ArchivePermissionType
+    >>> from canonical.launchpad.interfaces import ISourcePackageNameSet
     >>> bar_name = getUtility(ISourcePackageNameSet).getOrCreateByName("bar")
     >>> discard = ArchivePermission(
     ...     archive=ubuntu.main_archive, person=name16,
@@ -915,8 +915,8 @@
 
 Uploads to copy archives are not allowed.
 
-    >>> from lp.soyuz.interfaces.archive import (
-    ...     ArchivePurpose, IArchiveSet)
+    >>> from lp.soyuz.enums import ArchivePurpose
+    >>> from lp.soyuz.interfaces.archive import IArchiveSet
     >>> cprov = getUtility(IPersonSet).getByName('cprov')
     >>> copy_archive = getUtility(IArchiveSet).new(
     ...     owner=cprov, purpose=ArchivePurpose.COPY,

=== modified file 'lib/lp/archiveuploader/tests/static-translations.txt'
--- lib/lp/archiveuploader/tests/static-translations.txt	2009-08-28 06:39:38 +0000
+++ lib/lp/archiveuploader/tests/static-translations.txt	2010-08-25 10:56:48 +0000
@@ -25,8 +25,9 @@
     >>> from lp.archiveuploader.tests import mock_logger
     >>> from lp.registry.interfaces.distribution import IDistributionSet
     >>> from lp.registry.interfaces.pocket import PackagePublishingPocket
+    >>> from lp.soyuz.enums import PackageUploadCustomFormat
     >>> from lp.soyuz.interfaces.queue import (
-    ...     IPackageUpload, IPackageUploadCustom, PackageUploadCustomFormat)
+    ...     IPackageUpload, IPackageUploadCustom)
     >>> from lp.soyuz.model.queue import PackageUploadCustom
     >>> class MockPackageUploadCustom(PackageUploadCustom):
     ...     implements(IPackageUploadCustom)

=== modified file 'lib/lp/archiveuploader/tests/test_buildduploads.py'
--- lib/lp/archiveuploader/tests/test_buildduploads.py	2010-08-20 20:31:18 +0000
+++ lib/lp/archiveuploader/tests/test_buildduploads.py	2010-08-25 10:56:48 +0000
@@ -7,7 +7,7 @@
 
 from canonical.database.constants import UTC_NOW
 from canonical.launchpad.ftests import import_public_test_keys
-from canonical.launchpad.interfaces import PackagePublishingStatus
+from lp.soyuz.enums import PackagePublishingStatus
 from lp.archiveuploader.tests.test_securityuploads import (
     TestStagedBinaryUploadBase,
     )

=== modified file 'lib/lp/archiveuploader/tests/test_dscfile.py'
--- lib/lp/archiveuploader/tests/test_dscfile.py	2010-08-24 08:43:51 +0000
+++ lib/lp/archiveuploader/tests/test_dscfile.py	2010-08-25 10:56:48 +0000
@@ -24,7 +24,7 @@
     )
 from lp.archiveuploader.uploadpolicy import BuildDaemonUploadPolicy
 from lp.registry.interfaces.sourcepackage import SourcePackageFileType
-from lp.soyuz.interfaces.sourcepackageformat import SourcePackageFormat
+from lp.soyuz.enums import SourcePackageFormat
 from lp.testing import (
     TestCase,
     TestCaseWithFactory,

=== modified file 'lib/lp/archiveuploader/tests/test_nascentuploadfile.py'
--- lib/lp/archiveuploader/tests/test_nascentuploadfile.py	2010-08-24 08:43:51 +0000
+++ lib/lp/archiveuploader/tests/test_nascentuploadfile.py	2010-08-25 10:56:48 +0000
@@ -22,7 +22,7 @@
     DebBinaryUploadFile,
     )
 from lp.archiveuploader.tests import AbsolutelyAnythingGoesUploadPolicy
-from lp.soyuz.interfaces.queue import PackageUploadCustomFormat
+from lp.soyuz.enums import PackageUploadCustomFormat
 from lp.testing import TestCaseWithFactory
 
 

=== modified file 'lib/lp/archiveuploader/tests/test_ppauploadprocessor.py'
--- lib/lp/archiveuploader/tests/test_ppauploadprocessor.py	2010-08-20 20:31:18 +0000
+++ lib/lp/archiveuploader/tests/test_ppauploadprocessor.py	2010-08-25 10:56:48 +0000
@@ -32,18 +32,20 @@
 from lp.registry.interfaces.person import IPersonSet
 from lp.registry.interfaces.pocket import PackagePublishingPocket
 from lp.services.mail import stub
+from lp.soyuz.enums import (
+    ArchivePurpose,
+    PackagePublishingStatus,
+    PackageUploadStatus,
+    SourcePackageFormat,
+    )
 from lp.soyuz.interfaces.archive import (
-    ArchivePurpose,
     IArchiveSet,
     )
-from lp.soyuz.interfaces.publishing import PackagePublishingStatus
 from lp.soyuz.interfaces.queue import (
     NonBuildableSourceUploadError,
-    PackageUploadStatus,
     )
 from lp.soyuz.interfaces.sourcepackageformat import (
     ISourcePackageFormatSelectionSet,
-    SourcePackageFormat,
     )
 from lp.soyuz.model.publishing import BinaryPackagePublishingHistory
 from lp.soyuz.tests.test_publishing import SoyuzTestPublisher

=== modified file 'lib/lp/archiveuploader/tests/test_recipeuploads.py'
--- lib/lp/archiveuploader/tests/test_recipeuploads.py	2010-08-20 20:31:18 +0000
+++ lib/lp/archiveuploader/tests/test_recipeuploads.py	2010-08-25 10:56:48 +0000
@@ -17,7 +17,7 @@
 from lp.code.interfaces.sourcepackagerecipebuild import (
     ISourcePackageRecipeBuildSource,
     )
-from lp.soyuz.interfaces.queue import PackageUploadStatus
+from lp.soyuz.enums import PackageUploadStatus
 
 
 class TestSourcePackageRecipeBuildUploads(TestUploadProcessorBase):

=== modified file 'lib/lp/archiveuploader/tests/test_securityuploads.py'
--- lib/lp/archiveuploader/tests/test_securityuploads.py	2010-08-20 20:31:18 +0000
+++ lib/lp/archiveuploader/tests/test_securityuploads.py	2010-08-25 10:56:48 +0000
@@ -11,12 +11,12 @@
 
 from canonical.launchpad.interfaces import (
     IDistributionSet,
-    PackageUploadStatus,
     )
 from lp.archiveuploader.tests.test_uploadprocessor import (
     TestUploadProcessorBase,
     )
 from lp.registry.interfaces.pocket import PackagePublishingPocket
+from lp.soyuz.enums import PackageUploadStatus
 from lp.soyuz.model.binarypackagebuild import BinaryPackageBuild
 from lp.soyuz.model.processor import ProcessorFamily
 

=== modified file 'lib/lp/archiveuploader/tests/test_uploadprocessor.py'
--- lib/lp/archiveuploader/tests/test_uploadprocessor.py	2010-08-20 20:31:18 +0000
+++ lib/lp/archiveuploader/tests/test_uploadprocessor.py	2010-08-25 10:56:48 +0000
@@ -50,12 +50,16 @@
 from lp.registry.interfaces.sourcepackagename import ISourcePackageNameSet
 from lp.registry.model.sourcepackagename import SourcePackageName
 from lp.services.mail import stub
+from lp.soyuz.enums import (
+    ArchivePermissionType,
+    ArchivePurpose,
+    PackageUploadStatus,
+    SourcePackageFormat,
+    )
 from lp.soyuz.interfaces.archive import (
-    ArchivePurpose,
     IArchiveSet,
     )
 from lp.soyuz.interfaces.archivepermission import (
-    ArchivePermissionType,
     IArchivePermissionSet,
     )
 from lp.soyuz.interfaces.component import IComponentSet
@@ -65,12 +69,10 @@
     PackagePublishingStatus,
     )
 from lp.soyuz.interfaces.queue import (
-    PackageUploadStatus,
     QueueInconsistentStateError,
     )
 from lp.soyuz.interfaces.sourcepackageformat import (
     ISourcePackageFormatSelectionSet,
-    SourcePackageFormat,
     )
 from lp.soyuz.model.archivepermission import ArchivePermission
 from lp.soyuz.model.binarypackagename import BinaryPackageName

=== modified file 'lib/lp/archiveuploader/tests/test_utils.py'
--- lib/lp/archiveuploader/tests/test_utils.py	2010-08-20 20:31:18 +0000
+++ lib/lp/archiveuploader/tests/test_utils.py	2010-08-25 10:56:48 +0000
@@ -15,7 +15,7 @@
     re_issource,
     )
 from lp.registry.interfaces.sourcepackage import SourcePackageFileType
-from lp.soyuz.interfaces.binarypackagerelease import BinaryPackageFileType
+from lp.soyuz.enums import BinaryPackageFileType
 
 
 class TestUtilities(TestCase):

=== modified file 'lib/lp/archiveuploader/tests/upload-karma.txt'
--- lib/lp/archiveuploader/tests/upload-karma.txt	2010-02-16 20:36:48 +0000
+++ lib/lp/archiveuploader/tests/upload-karma.txt	2010-08-25 10:56:48 +0000
@@ -82,7 +82,8 @@
 will generate another different karma event for the uploader.
 
     >>> from lp.archiveuploader.tests import getPolicy
-    >>> from lp.soyuz.interfaces.archive import ArchivePurpose, IArchiveSet
+    >>> from lp.soyuz.enums import ArchivePurpose
+    >>> from lp.soyuz.interfaces.archive import IArchiveSet
     >>> from lp.registry.interfaces.distribution import IDistributionSet
     >>> ubuntu = getUtility(IDistributionSet)['ubuntu']
     >>> name16_ppa = getUtility(IArchiveSet).new(

=== modified file 'lib/lp/archiveuploader/tests/upload-path-parsing.txt'
--- lib/lp/archiveuploader/tests/upload-path-parsing.txt	2010-01-12 09:04:43 +0000
+++ lib/lp/archiveuploader/tests/upload-path-parsing.txt	2010-08-25 10:56:48 +0000
@@ -166,8 +166,8 @@
 
 We will create a 'beta' PPA for Celso.
 
-    >>> from lp.soyuz.interfaces.archive import (
-    ...     ArchivePurpose, IArchiveSet)
+    >>> from lp.soyuz.enums import ArchivePurpose
+    >>> from lp.soyuz.interfaces.archive import IArchiveSet
     >>> beta_ppa = getUtility(IArchiveSet).new(
     ...     ArchivePurpose.PPA, cprov, 'beta')
 

=== modified file 'lib/lp/archiveuploader/utils.py'
--- lib/lp/archiveuploader/utils.py	2010-08-20 20:31:18 +0000
+++ lib/lp/archiveuploader/utils.py	2010-08-25 10:56:48 +0000
@@ -33,6 +33,7 @@
     guess as guess_encoding,
     )
 from lp.archiveuploader.tagfiles import TagFileParseError
+from lp.soyuz.enums import BinaryPackageFileType
 
 
 re_taint_free = re.compile(r"^[-+~/\.\w]+$")
@@ -94,9 +95,6 @@
 
 def determine_binary_file_type(filename):
     """Determine the BinaryPackageFileType of the given filename."""
-    # Avoid circular imports.
-    from lp.soyuz.interfaces.binarypackagerelease import BinaryPackageFileType
-
     if filename.endswith(".deb"):
         return BinaryPackageFileType.DEB
     elif filename.endswith(".udeb"):

=== modified file 'lib/lp/bugs/model/bugtask.py'
--- lib/lp/bugs/model/bugtask.py	2010-08-22 18:31:30 +0000
+++ lib/lp/bugs/model/bugtask.py	2010-08-25 10:56:48 +0000
@@ -153,7 +153,7 @@
 from lp.registry.interfaces.sourcepackagename import ISourcePackageNameSet
 from lp.registry.model.pillar import pillar_sort_key
 from lp.registry.model.sourcepackagename import SourcePackageName
-from lp.soyuz.interfaces.publishing import PackagePublishingStatus
+from lp.soyuz.enums import PackagePublishingStatus
 from lp.soyuz.model.publishing import SourcePackagePublishingHistory
 from lp.soyuz.model.sourcepackagerelease import SourcePackageRelease
 

=== modified file 'lib/lp/buildmaster/tests/test_builder.py'
--- lib/lp/buildmaster/tests/test_builder.py	2010-08-23 10:38:44 +0000
+++ lib/lp/buildmaster/tests/test_builder.py	2010-08-25 10:56:48 +0000
@@ -23,9 +23,11 @@
 from lp.buildmaster.interfaces.buildqueue import IBuildQueueSet
 from lp.buildmaster.model.buildfarmjobbehavior import IdleBuildBehavior
 from lp.buildmaster.model.buildqueue import BuildQueue
-from lp.soyuz.interfaces.archive import ArchivePurpose
+from lp.soyuz.enums import (
+    ArchivePurpose,
+    PackagePublishingStatus,
+    )
 from lp.soyuz.interfaces.binarypackagebuild import IBinaryPackageBuildSet
-from lp.soyuz.interfaces.publishing import PackagePublishingStatus
 from lp.soyuz.model.binarypackagebuildbehavior import (
     BinaryPackageBuildBehavior,
     )

=== modified file 'lib/lp/buildmaster/tests/test_buildqueue.py'
--- lib/lp/buildmaster/tests/test_buildqueue.py	2010-08-20 20:31:18 +0000
+++ lib/lp/buildmaster/tests/test_buildqueue.py	2010-08-25 10:56:48 +0000
@@ -41,8 +41,10 @@
     get_builder_data,
     )
 from lp.services.job.model.job import Job
-from lp.soyuz.interfaces.archive import ArchivePurpose
-from lp.soyuz.interfaces.publishing import PackagePublishingStatus
+from lp.soyuz.enums import (
+    ArchivePurpose,
+    PackagePublishingStatus,
+    )
 from lp.soyuz.model.binarypackagebuild import BinaryPackageBuild
 from lp.soyuz.model.processor import ProcessorFamilySet
 from lp.soyuz.tests.test_publishing import SoyuzTestPublisher

=== modified file 'lib/lp/code/model/sourcepackagerecipe.py'
--- lib/lp/code/model/sourcepackagerecipe.py	2010-08-20 20:31:18 +0000
+++ lib/lp/code/model/sourcepackagerecipe.py	2010-08-25 10:56:48 +0000
@@ -56,7 +56,6 @@
 from lp.registry.interfaces.distroseries import IDistroSeriesSet
 from lp.registry.model.distroseries import DistroSeries
 from lp.soyuz.interfaces.archive import (
-    ArchivePurpose,
     IArchiveSet,
     )
 from lp.soyuz.interfaces.component import IComponentSet
@@ -221,7 +220,7 @@
         """See `ISourcePackageRecipe`."""
         if not config.build_from_branch.enabled:
             raise ValueError('Source package recipe builds disabled.')
-        if archive.purpose != ArchivePurpose.PPA:
+        if not archive.is_ppa:
             raise NonPPABuildRequest
         component = getUtility(IComponentSet)["multiverse"]
 

=== modified file 'lib/lp/code/model/tests/test_sourcepackagerecipe.py'
--- lib/lp/code/model/tests/test_sourcepackagerecipe.py	2010-08-20 20:31:18 +0000
+++ lib/lp/code/model/tests/test_sourcepackagerecipe.py	2010-08-25 10:56:48 +0000
@@ -57,9 +57,9 @@
     IJob,
     JobStatus,
     )
+from lp.soyuz.enums import ArchivePurpose
 from lp.soyuz.interfaces.archive import (
     ArchiveDisabled,
-    ArchivePurpose,
     CannotUploadToArchive,
     InvalidPocketForPPA,
     )

=== modified file 'lib/lp/code/scripts/tests/test_request_daily_builds.py'
--- lib/lp/code/scripts/tests/test_request_daily_builds.py	2010-08-20 20:31:18 +0000
+++ lib/lp/code/scripts/tests/test_request_daily_builds.py	2010-08-25 10:56:48 +0000
@@ -12,7 +12,7 @@
 from canonical.launchpad.scripts.tests import run_script
 from canonical.launchpad.webapp.errorlog import ErrorReportingUtility
 from canonical.testing import ZopelessAppServerLayer
-from lp.soyuz.interfaces.archive import ArchivePurpose
+from lp.soyuz.enums import ArchivePurpose
 from lp.testing import TestCaseWithFactory
 
 

=== modified file 'lib/lp/registry/browser/distribution.py'
--- lib/lp/registry/browser/distribution.py	2010-08-23 09:10:10 +0000
+++ lib/lp/registry/browser/distribution.py	2010-08-25 10:56:48 +0000
@@ -109,8 +109,8 @@
 from lp.registry.interfaces.product import IProduct
 from lp.registry.interfaces.series import SeriesStatus
 from lp.soyuz.browser.packagesearch import PackageSearchViewBase
+from lp.soyuz.enums import ArchivePurpose
 from lp.soyuz.interfaces.archive import (
-    ArchivePurpose,
     IArchiveSet,
     )
 

=== modified file 'lib/lp/registry/browser/person.py'
--- lib/lp/registry/browser/person.py	2010-08-23 03:25:20 +0000
+++ lib/lp/registry/browser/person.py	2010-08-25 10:56:48 +0000
@@ -313,7 +313,7 @@
 from lp.soyuz.browser.archivesubscription import (
     traverse_archive_subscription_for_subscriber,
     )
-from lp.soyuz.interfaces.archive import ArchiveStatus
+from lp.soyuz.enums import ArchiveStatus
 from lp.soyuz.interfaces.archivesubscriber import IArchiveSubscriberSet
 from lp.soyuz.interfaces.binarypackagebuild import IBinaryPackageBuildSet
 from lp.soyuz.interfaces.sourcepackagerelease import ISourcePackageRelease

=== modified file 'lib/lp/registry/browser/tests/distributionsourcepackage-views.txt'
--- lib/lp/registry/browser/tests/distributionsourcepackage-views.txt	2010-06-16 08:22:00 +0000
+++ lib/lp/registry/browser/tests/distributionsourcepackage-views.txt	2010-08-25 10:56:48 +0000
@@ -16,7 +16,7 @@
     # Publish the source 'gedit' in the ubuntutest main archive.
     >>> from datetime import datetime
     >>> import pytz
-    >>> from lp.soyuz.interfaces.publishing import PackagePublishingStatus
+    >>> from lp.soyuz.enums import PackagePublishingStatus
     >>> gedit_main_src_hist = publisher.getPubSource(
     ...     sourcename="gedit", archive=ubuntutest.main_archive,
     ...     date_uploaded=datetime(2010, 12, 30, tzinfo=pytz.UTC),

=== modified file 'lib/lp/registry/browser/tests/private-team-creation-views.txt'
--- lib/lp/registry/browser/tests/private-team-creation-views.txt	2010-07-15 10:56:30 +0000
+++ lib/lp/registry/browser/tests/private-team-creation-views.txt	2010-08-25 10:56:48 +0000
@@ -293,8 +293,8 @@
     ...     evolution.setBranchVisibilityTeamPolicy(
     ...         team, BranchVisibilityRule.PRIVATE)
     ...     # A PPA.
-    ...     from lp.soyuz.interfaces.archive import (
-    ...         ArchivePurpose, IArchiveSet)
+    ...     from lp.soyuz.enums import ArchivePurpose
+    ...     from lp.soyuz.interfaces.archive import IArchiveSet
     ...     from lp.registry.interfaces.distribution import (
     ...         IDistributionSet)
     ...     ubuntu = getUtility(IDistributionSet)['ubuntu']

=== modified file 'lib/lp/registry/browser/tests/product-portlet-packages-view.txt'
--- lib/lp/registry/browser/tests/product-portlet-packages-view.txt	2010-05-03 14:40:32 +0000
+++ lib/lp/registry/browser/tests/product-portlet-packages-view.txt	2010-08-25 10:56:48 +0000
@@ -103,7 +103,7 @@
 A source package that does NOT have a publishing history in the PENDING
 or PUBLISHED statuses will NOT be suggested.
 
-    >>> from lp.soyuz.interfaces.publishing import PackagePublishingStatus
+    >>> from lp.soyuz.enums import PackagePublishingStatus
     >>> spph = factory.makeSourcePackagePublishingHistory(
     ...     sourcepackagename=spn, distroseries=ubuntu.currentseries,
     ...     status=PackagePublishingStatus.DELETED)

=== modified file 'lib/lp/registry/browser/tests/test_person_view.py'
--- lib/lp/registry/browser/tests/test_person_view.py	2010-08-22 03:09:51 +0000
+++ lib/lp/registry/browser/tests/test_person_view.py	2010-08-25 10:56:48 +0000
@@ -29,8 +29,10 @@
 from lp.registry.interfaces.person import PersonVisibility
 from lp.registry.interfaces.teammembership import TeamMembershipStatus
 from lp.registry.model.karma import KarmaCategory
-from lp.soyuz.interfaces.archive import ArchiveStatus
-from lp.soyuz.interfaces.publishing import PackagePublishingStatus
+from lp.soyuz.enums import (
+    ArchiveStatus,
+    PackagePublishingStatus,
+    )
 from lp.soyuz.tests.test_publishing import SoyuzTestPublisher
 from lp.testing import (
     login_person,

=== modified file 'lib/lp/registry/doc/distribution-sourcepackage.txt'
--- lib/lp/registry/doc/distribution-sourcepackage.txt	2010-07-02 20:32:58 +0000
+++ lib/lp/registry/doc/distribution-sourcepackage.txt	2010-08-25 10:56:48 +0000
@@ -88,7 +88,7 @@
 excluded.
 
     >>> from lp.soyuz.tests.test_publishing import SoyuzTestPublisher
-    >>> from lp.soyuz.interfaces.publishing import PackagePublishingStatus
+    >>> from lp.soyuz.enums import PackagePublishingStatus
     >>> publisher = SoyuzTestPublisher()
     >>> publisher.prepareBreezyAutotest()
     >>> warty = ubuntu['warty']
@@ -263,7 +263,6 @@
     ...     name="beta", distribution=ubuntu_test)
 
     # Next publish some sources in them.
-    >>> from lp.soyuz.interfaces.publishing import PackagePublishingStatus
     >>> gedit_nightly_src_hist = publisher.getPubSource(
     ...     sourcename="gedit", archive=ppa_nightly,
     ...     creator=ppa_nightly.owner,

=== modified file 'lib/lp/registry/doc/distroseries.txt'
--- lib/lp/registry/doc/distroseries.txt	2010-08-13 06:08:36 +0000
+++ lib/lp/registry/doc/distroseries.txt	2010-08-25 10:56:48 +0000
@@ -619,9 +619,6 @@
     >>> ubuntu = getUtility(IDistributionSet)['ubuntu']
     >>> hoary = ubuntu['hoary']
 
-    >>> from canonical.launchpad.interfaces import (
-    ...    PackagePublishingStatus)
-
     >>> hoary_pub_sources = hoary.getSourcePackagePublishing(
     ...     PackagePublishingStatus.PUBLISHED,
     ...     PackagePublishingPocket.RELEASE)

=== modified file 'lib/lp/registry/doc/private-team-roles.txt'
--- lib/lp/registry/doc/private-team-roles.txt	2010-08-16 13:40:20 +0000
+++ lib/lp/registry/doc/private-team-roles.txt	2010-08-25 10:56:48 +0000
@@ -114,8 +114,8 @@
 
 Private teams can own PPAs.
 
-    >>> from lp.soyuz.interfaces.archive import (
-    ...     ArchivePurpose, IArchiveSet)
+    >>> from lp.soyuz.enums import ArchivePurpose
+    >>> from lp.soyuz.interfaces.archive import IArchiveSet
     >>> from lp.registry.interfaces.distribution import (
     ...     IDistributionSet)
     >>> ubuntu = getUtility(IDistributionSet)['ubuntu']

=== modified file 'lib/lp/registry/doc/sourcepackage.txt'
--- lib/lp/registry/doc/sourcepackage.txt	2010-08-22 18:31:30 +0000
+++ lib/lp/registry/doc/sourcepackage.txt	2010-08-25 10:56:48 +0000
@@ -150,7 +150,7 @@
 Only PUBLISHED records are considered when looking the latest published
 component. If there are no PUBLISHED records, None is returned.
 
-    >>> from canonical.launchpad.interfaces import PackagePublishingStatus
+    >>> from lp.soyuz.enums import PackagePublishingStatus
 
     >>> latest_publishing.status = PackagePublishingStatus.SUPERSEDED
     >>> syncUpdate(latest_publishing)

=== modified file 'lib/lp/registry/interfaces/distributionsourcepackage.py'
--- lib/lp/registry/interfaces/distributionsourcepackage.py	2010-08-20 20:31:18 +0000
+++ lib/lp/registry/interfaces/distributionsourcepackage.py	2010-08-25 10:56:48 +0000
@@ -44,7 +44,7 @@
 from lp.registry.interfaces.structuralsubscription import (
     IStructuralSubscriptionTarget,
     )
-from lp.soyuz.interfaces.archive import ArchivePurpose
+from lp.soyuz.enums import ArchivePurpose
 
 
 class IDistributionSourcePackage(IBugTarget, IHasBranches, IHasMergeProposals,

=== modified file 'lib/lp/registry/model/distribution.py'
--- lib/lp/registry/model/distribution.py	2010-08-22 19:26:46 +0000
+++ lib/lp/registry/model/distribution.py	2010-08-25 10:56:48 +0000
@@ -159,9 +159,13 @@
 from lp.registry.model.structuralsubscription import (
     StructuralSubscriptionTargetMixin,
     )
-from lp.soyuz.interfaces.archive import (
+from lp.soyuz.enums import (
     ArchivePurpose,
     ArchiveStatus,
+    PackagePublishingStatus,
+    PackageUploadStatus,
+    )
+from lp.soyuz.interfaces.archive import (
     IArchiveSet,
     MAIN_ARCHIVE_PURPOSES,
     )
@@ -170,13 +174,8 @@
 from lp.soyuz.interfaces.buildrecords import IHasBuildRecords
 from lp.soyuz.interfaces.publishing import (
     active_publishing_status,
-    PackagePublishingStatus,
     )
-from lp.soyuz.interfaces.queue import PackageUploadStatus
-from lp.soyuz.model.archive import Archive
 from lp.soyuz.model.binarypackagebuild import BinaryPackageBuild
-from lp.soyuz.model.binarypackagename import BinaryPackageName
-from lp.soyuz.model.binarypackagerelease import BinaryPackageRelease
 from lp.soyuz.model.distributionsourcepackagecache import (
     DistributionSourcePackageCache,
     )

=== modified file 'lib/lp/registry/model/distributionmirror.py'
--- lib/lp/registry/model/distributionmirror.py	2010-08-20 20:31:18 +0000
+++ lib/lp/registry/model/distributionmirror.py	2010-08-25 10:56:48 +0000
@@ -83,9 +83,11 @@
 from lp.registry.interfaces.series import SeriesStatus
 from lp.registry.interfaces.sourcepackage import SourcePackageFileType
 from lp.services.worlddata.model.country import Country
-from lp.soyuz.interfaces.binarypackagerelease import BinaryPackageFileType
+from lp.soyuz.enums import (
+    BinaryPackageFileType,
+    PackagePublishingStatus,
+    )
 from lp.soyuz.interfaces.distroarchseries import IDistroArchSeries
-from lp.soyuz.interfaces.publishing import PackagePublishingStatus
 from lp.soyuz.model.files import (
     BinaryPackageFile,
     SourcePackageReleaseFile,

=== modified file 'lib/lp/registry/model/distributionsourcepackage.py'
--- lib/lp/registry/model/distributionsourcepackage.py	2010-08-20 20:31:18 +0000
+++ lib/lp/registry/model/distributionsourcepackage.py	2010-08-25 10:56:48 +0000
@@ -74,8 +74,10 @@
 from lp.registry.model.structuralsubscription import (
     StructuralSubscriptionTargetMixin,
     )
-from lp.soyuz.interfaces.archive import ArchivePurpose
-from lp.soyuz.interfaces.publishing import PackagePublishingStatus
+from lp.soyuz.enums import (
+    ArchivePurpose,
+    PackagePublishingStatus,
+    )
 from lp.soyuz.model.archive import Archive
 from lp.soyuz.model.distributionsourcepackagerelease import (
     DistributionSourcePackageRelease,

=== modified file 'lib/lp/registry/model/distroseries.py'
--- lib/lp/registry/model/distroseries.py	2010-08-23 09:10:10 +0000
+++ lib/lp/registry/model/distroseries.py	2010-08-25 10:56:48 +0000
@@ -113,9 +113,13 @@
     StructuralSubscriptionTargetMixin,
     )
 from lp.services.worlddata.model.language import Language
+from lp.soyuz.enums import (
+    ArchivePurpose,
+    PackagePublishingStatus,
+    PackageUploadStatus,
+    )
 from lp.soyuz.interfaces.archive import (
     ALLOW_RELEASE_BUILDS,
-    ArchivePurpose,
     )
 from lp.soyuz.interfaces.binarypackagebuild import IBinaryPackageBuildSet
 from lp.soyuz.interfaces.binarypackagename import IBinaryPackageName
@@ -123,12 +127,10 @@
 from lp.soyuz.interfaces.publishing import (
     active_publishing_status,
     ICanPublishPackages,
-    PackagePublishingStatus,
     )
 from lp.soyuz.interfaces.queue import (
     IHasQueueItems,
     IPackageUploadSet,
-    PackageUploadStatus,
     )
 from lp.soyuz.interfaces.sourcepackageformat import (
     ISourcePackageFormatSelectionSet,

=== modified file 'lib/lp/registry/model/person.py'
--- lib/lp/registry/model/person.py	2010-08-22 17:13:25 +0000
+++ lib/lp/registry/model/person.py	2010-08-25 10:56:48 +0000
@@ -272,8 +272,8 @@
     VOUCHER_STATUSES,
     )
 from lp.services.worlddata.model.language import Language
+from lp.soyuz.enums import ArchivePurpose
 from lp.soyuz.interfaces.archive import (
-    ArchivePurpose,
     IArchiveSet,
     )
 from lp.soyuz.interfaces.archivepermission import IArchivePermissionSet

=== modified file 'lib/lp/registry/model/sourcepackage.py'
--- lib/lp/registry/model/sourcepackage.py	2010-08-22 18:31:30 +0000
+++ lib/lp/registry/model/sourcepackage.py	2010-08-25 10:56:48 +0000
@@ -70,13 +70,15 @@
     )
 from lp.registry.model.packaging import Packaging
 from lp.registry.model.suitesourcepackage import SuiteSourcePackage
+from lp.soyuz.enums import (
+    ArchivePurpose,
+    PackagePublishingStatus,
+    PackageUploadCustomFormat,
+    )
 from lp.soyuz.interfaces.archive import (
-    ArchivePurpose,
     IArchiveSet,
     )
 from lp.soyuz.interfaces.buildrecords import IHasBuildRecords
-from lp.soyuz.interfaces.publishing import PackagePublishingStatus
-from lp.soyuz.interfaces.queue import PackageUploadCustomFormat
 from lp.soyuz.model.binarypackagebuild import (
     BinaryPackageBuild,
     BinaryPackageBuildSet,

=== modified file 'lib/lp/registry/tests/test_distributionsourcepackage.py'
--- lib/lp/registry/tests/test_distributionsourcepackage.py	2010-08-20 20:31:18 +0000
+++ lib/lp/registry/tests/test_distributionsourcepackage.py	2010-08-25 10:56:48 +0000
@@ -17,7 +17,7 @@
     )
 from lp.registry.interfaces.distribution import IDistributionSet
 from lp.registry.model.karma import KarmaTotalCache
-from lp.soyuz.interfaces.publishing import PackagePublishingStatus
+from lp.soyuz.enums import PackagePublishingStatus
 from lp.soyuz.tests.test_publishing import SoyuzTestPublisher
 from lp.testing import TestCaseWithFactory
 

=== modified file 'lib/lp/registry/tests/test_distroseries.py'
--- lib/lp/registry/tests/test_distroseries.py	2010-08-20 20:31:18 +0000
+++ lib/lp/registry/tests/test_distroseries.py	2010-08-25 10:56:48 +0000
@@ -24,8 +24,11 @@
     NoSuchDistroSeries,
     )
 from lp.registry.interfaces.pocket import PackagePublishingPocket
+from lp.soyuz.enums import (
+    ArchivePurpose,
+    PackagePublishingStatus,
+    )
 from lp.soyuz.interfaces.archive import (
-    ArchivePurpose,
     IArchiveSet,
     )
 from lp.soyuz.interfaces.component import IComponentSet
@@ -34,7 +37,6 @@
     )
 from lp.soyuz.interfaces.publishing import (
     active_publishing_status,
-    PackagePublishingStatus,
     )
 from lp.soyuz.model.processor import ProcessorFamilySet
 from lp.soyuz.tests.test_publishing import SoyuzTestPublisher

=== modified file 'lib/lp/registry/tests/test_sourcepackage.py'
--- lib/lp/registry/tests/test_sourcepackage.py	2010-08-20 20:31:18 +0000
+++ lib/lp/registry/tests/test_sourcepackage.py	2010-08-25 10:56:48 +0000
@@ -25,9 +25,11 @@
 from lp.registry.interfaces.distribution import NoPartnerArchive
 from lp.registry.interfaces.pocket import PackagePublishingPocket
 from lp.registry.interfaces.series import SeriesStatus
-from lp.soyuz.interfaces.archive import ArchivePurpose
+from lp.soyuz.enums import (
+    ArchivePurpose,
+    PackagePublishingStatus,
+    )
 from lp.soyuz.interfaces.component import IComponentSet
-from lp.soyuz.interfaces.publishing import PackagePublishingStatus
 from lp.testing import (
     person_logged_in,
     TestCaseWithFactory,

=== modified file 'lib/lp/scripts/utilities/sanitizedb.py'
--- lib/lp/scripts/utilities/sanitizedb.py	2010-08-20 20:31:18 +0000
+++ lib/lp/scripts/utilities/sanitizedb.py	2010-08-25 10:56:48 +0000
@@ -389,7 +389,7 @@
 
     def removePPAArchivePermissions(self):
         """Remove ArchivePermission records for PPAs."""
-        from lp.soyuz.interfaces.archive import ArchivePurpose
+        from lp.soyuz.enums import ArchivePurpose
         count = self.store.execute("""
             DELETE FROM ArchivePermission
             USING Archive

=== modified file 'lib/lp/soyuz/adapters/archivedependencies.py'
--- lib/lp/soyuz/adapters/archivedependencies.py	2010-08-20 20:31:18 +0000
+++ lib/lp/soyuz/adapters/archivedependencies.py	2010-08-25 10:56:48 +0000
@@ -47,11 +47,13 @@
     PackagePublishingPocket,
     pocketsuffix,
     )
+from lp.soyuz.enums import (
+    ArchivePurpose,
+    PackagePublishingStatus,
+    )
 from lp.soyuz.interfaces.archive import (
     ALLOW_RELEASE_BUILDS,
-    ArchivePurpose,
     )
-from lp.soyuz.interfaces.publishing import PackagePublishingStatus
 
 
 component_dependencies = {

=== modified file 'lib/lp/soyuz/adapters/packagelocation.py'
--- lib/lp/soyuz/adapters/packagelocation.py	2010-08-02 02:13:52 +0000
+++ lib/lp/soyuz/adapters/packagelocation.py	2010-08-25 10:56:48 +0000
@@ -15,6 +15,7 @@
 from zope.component import getUtility
 
 from lp.app.errors import NotFoundError
+from lp.soyuz.enums import ArchivePurpose
 
 
 class PackageLocation:
@@ -94,7 +95,7 @@
 
     # Avoid circular imports.
     from lp.registry.interfaces.distribution import IDistributionSet
-    from lp.soyuz.interfaces.archive import ArchivePurpose, IArchiveSet
+    from lp.soyuz.interfaces.archive import IArchiveSet
     from lp.soyuz.interfaces.packageset import IPackagesetSet
     from lp.registry.interfaces.pocket import PackagePublishingPocket
 

=== modified file 'lib/lp/soyuz/adapters/tests/test_packagelocation.py'
--- lib/lp/soyuz/adapters/tests/test_packagelocation.py	2010-08-20 20:31:18 +0000
+++ lib/lp/soyuz/adapters/tests/test_packagelocation.py	2010-08-25 10:56:48 +0000
@@ -12,7 +12,7 @@
     build_package_location,
     PackageLocationError,
     )
-from lp.soyuz.interfaces.archive import ArchivePurpose
+from lp.soyuz.enums import ArchivePurpose
 from lp.soyuz.interfaces.component import IComponentSet
 from lp.testing import TestCaseWithFactory
 from lp.testing.factory import remove_security_proxy_and_shout_at_engineer

=== modified file 'lib/lp/soyuz/browser/archive.py'
--- lib/lp/soyuz/browser/archive.py	2010-08-20 20:31:18 +0000
+++ lib/lp/soyuz/browser/archive.py	2010-08-25 10:56:48 +0000
@@ -120,9 +120,13 @@
     SourcesListEntries,
     SourcesListEntriesView,
     )
-from lp.soyuz.interfaces.archive import (
+from lp.soyuz.enums import (
+    ArchivePermissionType,
     ArchivePurpose,
     ArchiveStatus,
+    PackagePublishingStatus,
+    )
+from lp.soyuz.interfaces.archive import (
     CannotCopy,
     IArchive,
     IArchiveEditDependenciesForm,
@@ -131,7 +135,6 @@
     NoSuchPPA,
     )
 from lp.soyuz.interfaces.archivepermission import (
-    ArchivePermissionType,
     IArchivePermissionSet,
     )
 from lp.soyuz.interfaces.archivesubscriber import IArchiveSubscriberSet
@@ -140,7 +143,6 @@
     IBinaryPackageBuildSet,
     )
 from lp.soyuz.interfaces.binarypackagename import IBinaryPackageNameSet
-from lp.soyuz.interfaces.buildrecords import IHasBuildRecords
 from lp.soyuz.interfaces.component import IComponentSet
 from lp.soyuz.interfaces.packagecopyrequest import IPackageCopyRequestSet
 from lp.soyuz.interfaces.packageset import IPackagesetSet
@@ -149,7 +151,6 @@
     active_publishing_status,
     inactive_publishing_status,
     IPublishingSet,
-    PackagePublishingStatus,
     )
 from lp.soyuz.scripts.packagecopier import do_copy
 

=== modified file 'lib/lp/soyuz/browser/archivepermission.py'
--- lib/lp/soyuz/browser/archivepermission.py	2010-08-20 20:31:18 +0000
+++ lib/lp/soyuz/browser/archivepermission.py	2010-08-25 10:56:48 +0000
@@ -12,7 +12,7 @@
 from zope.interface import implements
 
 from canonical.launchpad.webapp.interfaces import ICanonicalUrlData
-from lp.soyuz.interfaces.archivepermission import ArchivePermissionType
+from lp.soyuz.enums import ArchivePermissionType
 
 
 class ArchivePermissionURL:

=== modified file 'lib/lp/soyuz/browser/build.py'
--- lib/lp/soyuz/browser/build.py	2010-08-20 20:31:18 +0000
+++ lib/lp/soyuz/browser/build.py	2010-08-25 10:56:48 +0000
@@ -49,8 +49,7 @@
     IBinaryPackageBuildSet,
     IBuildRescoreForm,
     )
-from lp.soyuz.interfaces.buildrecords import IHasBuildRecords
-from lp.soyuz.interfaces.queue import PackageUploadStatus
+from lp.soyuz.enums import PackageUploadStatus
 
 
 class BuildUrl:

=== modified file 'lib/lp/soyuz/browser/distributionsourcepackagerelease.py'
--- lib/lp/soyuz/browser/distributionsourcepackagerelease.py	2010-08-20 20:31:18 +0000
+++ lib/lp/soyuz/browser/distributionsourcepackagerelease.py	2010-08-25 10:56:48 +0000
@@ -29,7 +29,7 @@
 from lp.soyuz.interfaces.distributionsourcepackagerelease import (
     IDistributionSourcePackageRelease,
     )
-from lp.soyuz.interfaces.publishing import PackagePublishingStatus
+from lp.soyuz.enums import PackagePublishingStatus
 
 
 class DistributionSourcePackageReleaseBreadcrumb(Breadcrumb):

=== modified file 'lib/lp/soyuz/browser/publishing.py'
--- lib/lp/soyuz/browser/publishing.py	2010-08-20 20:31:18 +0000
+++ lib/lp/soyuz/browser/publishing.py	2010-08-25 10:56:48 +0000
@@ -22,12 +22,12 @@
 from canonical.launchpad.webapp.authorization import check_permission
 from canonical.launchpad.webapp.interfaces import ICanonicalUrlData
 from canonical.launchpad.webapp.publisher import LaunchpadView
+from lp.soyuz.enums import PackagePublishingStatus
 from lp.soyuz.interfaces.binarypackagebuild import BuildSetStatus
 from lp.soyuz.interfaces.packagediff import IPackageDiff
 from lp.soyuz.interfaces.publishing import (
     IBinaryPackagePublishingHistory,
     ISourcePackagePublishingHistory,
-    PackagePublishingStatus,
     )
 
 

=== modified file 'lib/lp/soyuz/browser/queue.py'
--- lib/lp/soyuz/browser/queue.py	2010-08-20 20:31:18 +0000
+++ lib/lp/soyuz/browser/queue.py	2010-08-25 10:56:48 +0000
@@ -22,6 +22,9 @@
     NotFoundError,
     UnexpectedFormData,
     )
+from lp.soyuz.enums import (
+    PackageUploadStatus,
+    )
 from lp.soyuz.interfaces.archivepermission import IArchivePermissionSet
 from lp.soyuz.interfaces.binarypackagename import IBinaryPackageNameSet
 from lp.soyuz.interfaces.component import IComponentSet
@@ -35,10 +38,8 @@
     PackagePublishingPriority,
     )
 from lp.soyuz.interfaces.queue import (
-    IHasQueueItems,
     IPackageUpload,
     IPackageUploadSet,
-    PackageUploadStatus,
     QueueInconsistentStateError,
     )
 from lp.soyuz.interfaces.section import ISectionSet

=== modified file 'lib/lp/soyuz/browser/tests/archive-views.txt'
--- lib/lp/soyuz/browser/tests/archive-views.txt	2010-07-21 10:18:43 +0000
+++ lib/lp/soyuz/browser/tests/archive-views.txt	2010-08-25 10:56:48 +0000
@@ -1164,8 +1164,8 @@
 
     >>> ubuntu_team = getUtility(IPersonSet).getByName('ubuntu-team')
 
-    >>> from lp.soyuz.interfaces.archive import (
-    ...     ArchivePurpose, IArchiveSet)
+    >>> from lp.soyuz.enums import ArchivePurpose
+    >>> from lp.soyuz.interfaces.archive import IArchiveSet
     >>> ubuntu_team_ppa = getUtility(IArchiveSet).new(
     ...     owner=ubuntu_team, distribution=None, purpose=ArchivePurpose.PPA,
     ...     description="Don't we have a distribution ?")

=== modified file 'lib/lp/soyuz/browser/tests/build-views.txt'
--- lib/lp/soyuz/browser/tests/build-views.txt	2010-05-21 15:15:57 +0000
+++ lib/lp/soyuz/browser/tests/build-views.txt	2010-08-25 10:56:48 +0000
@@ -125,7 +125,7 @@
 
     >>> from lp.soyuz.tests.test_publishing import (
     ...      SoyuzTestPublisher)
-    >>> from lp.soyuz.interfaces.publishing import (
+    >>> from lp.soyuz.enums import (
     ...     PackagePublishingStatus)
     >>> test_publisher = SoyuzTestPublisher()
     >>> test_publisher.prepareBreezyAutotest()

=== modified file 'lib/lp/soyuz/browser/tests/builder-views.txt'
--- lib/lp/soyuz/browser/tests/builder-views.txt	2010-06-04 15:18:52 +0000
+++ lib/lp/soyuz/browser/tests/builder-views.txt	2010-08-25 10:56:48 +0000
@@ -144,7 +144,7 @@
     >>> from lp.buildmaster.interfaces.buildbase import BuildStatus
     >>> from lp.soyuz.tests.test_publishing import (
     ...      SoyuzTestPublisher)
-    >>> from lp.soyuz.interfaces.publishing import (
+    >>> from lp.soyuz.enums import (
     ...     PackagePublishingStatus)
 
     >>> test_publisher = SoyuzTestPublisher()

=== modified file 'lib/lp/soyuz/browser/tests/distroseriesqueue-views.txt'
--- lib/lp/soyuz/browser/tests/distroseriesqueue-views.txt	2010-08-20 12:11:30 +0000
+++ lib/lp/soyuz/browser/tests/distroseriesqueue-views.txt	2010-08-25 10:56:48 +0000
@@ -46,7 +46,7 @@
 
 Let's instantiate the view for a specific queue:
 
-  >>> from canonical.launchpad.interfaces import PackageUploadStatus
+  >>> from lp.soyuz.enums import PackageUploadStatus
   >>> request = LaunchpadTestRequest(
   ...     form={'queue_state': PackageUploadStatus.DONE.value})
   >>> warty = ubuntu['warty']
@@ -230,7 +230,7 @@
 
     >>> from lp.soyuz.tests.test_publishing import (
     ...     SoyuzTestPublisher)
-    >>> from lp.soyuz.interfaces.publishing import (
+    >>> from lp.soyuz.enums import (
     ...     PackagePublishingStatus)
     >>> from canonical.launchpad.interfaces import ILibraryFileAliasSet
     >>> stp = SoyuzTestPublisher()

=== modified file 'lib/lp/soyuz/browser/tests/publishing-views.txt'
--- lib/lp/soyuz/browser/tests/publishing-views.txt	2010-01-10 04:58:44 +0000
+++ lib/lp/soyuz/browser/tests/publishing-views.txt	2010-08-25 10:56:48 +0000
@@ -14,7 +14,7 @@
 
     >>> from lp.soyuz.tests.test_publishing import (
     ...     SoyuzTestPublisher)
-    >>> from lp.soyuz.interfaces.publishing import (
+    >>> from lp.soyuz.enums import (
     ...     PackagePublishingStatus)
     >>> login('foo.bar@xxxxxxxxxxxxx')
     >>> stp = SoyuzTestPublisher()
@@ -138,7 +138,6 @@
 enumeration but neglect to update BasePublishingRecordView.timestamp_map
 accordingly.
 
-    >>> from canonical.launchpad.interfaces import PackagePublishingStatus
     >>> from lp.soyuz.browser.publishing import (
     ...     BasePublishingRecordView)
     >>> for pps in PackagePublishingStatus.items:

=== modified file 'lib/lp/soyuz/browser/tests/test_archive_webservice.py'
--- lib/lp/soyuz/browser/tests/test_archive_webservice.py	2010-08-20 20:31:18 +0000
+++ lib/lp/soyuz/browser/tests/test_archive_webservice.py	2010-08-25 10:56:48 +0000
@@ -11,7 +11,7 @@
 
 from canonical.launchpad.testing.pages import LaunchpadWebServiceCaller
 from canonical.testing import DatabaseFunctionalLayer
-from lp.soyuz.interfaces.archive import ArchivePurpose
+from lp.soyuz.enums import ArchivePurpose
 from lp.testing import (
     celebrity_logged_in,
     launchpadlib_for,

=== modified file 'lib/lp/soyuz/browser/tests/test_queue.py'
--- lib/lp/soyuz/browser/tests/test_queue.py	2010-08-20 20:31:18 +0000
+++ lib/lp/soyuz/browser/tests/test_queue.py	2010-08-25 10:56:48 +0000
@@ -18,10 +18,10 @@
 from canonical.launchpad.webapp.servers import LaunchpadTestRequest
 from canonical.testing import LaunchpadFunctionalLayer
 from lp.archiveuploader.tests import datadir
+from lp.soyuz.enums import PackageUploadStatus
 from lp.soyuz.interfaces.archivepermission import IArchivePermissionSet
 from lp.soyuz.interfaces.queue import (
     IPackageUploadSet,
-    PackageUploadStatus,
     )
 from lp.soyuz.tests.test_publishing import SoyuzTestPublisher
 from lp.testing import (

=== modified file 'lib/lp/soyuz/doc/archive-deletion.txt'
--- lib/lp/soyuz/doc/archive-deletion.txt	2010-04-30 03:21:30 +0000
+++ lib/lp/soyuz/doc/archive-deletion.txt	2010-08-25 10:56:48 +0000
@@ -9,8 +9,9 @@
 This status tells the publisher to then delete the repository area.  Once
 it completes that task it will set the status to DELETED.
 
+    >>> from lp.soyuz.enums import ArchiveStatus
     >>> from lp.soyuz.interfaces.archive import (
-    ...     ArchiveStatus, IArchiveSet, IArchive)
+    ...     IArchiveSet, IArchive)
     >>> from lp.soyuz.tests.test_publishing import SoyuzTestPublisher
     >>> login("admin@xxxxxxxxxxxxx")
     >>> stp = SoyuzTestPublisher()
@@ -28,7 +29,7 @@
 
 We can create some packages in it using the test publisher:
 
-    >>> from lp.soyuz.interfaces.publishing import PackagePublishingStatus
+    >>> from lp.soyuz.enums import PackagePublishingStatus
     >>> ignore = stp.getPubBinaries(
     ...     archive=archive, binaryname="foo-bin1",
     ...     status=PackagePublishingStatus.PENDING)

=== modified file 'lib/lp/soyuz/doc/archive-dependencies.txt'
--- lib/lp/soyuz/doc/archive-dependencies.txt	2010-07-19 10:49:47 +0000
+++ lib/lp/soyuz/doc/archive-dependencies.txt	2010-08-25 10:56:48 +0000
@@ -217,7 +217,7 @@
 no binary published in Celso's PPA hoary/i386, so there is
 no need to request the builder to load its archive indexes.
 
-    >>> from lp.soyuz.interfaces.publishing import (
+    >>> from lp.soyuz.enums import (
     ...     PackagePublishingStatus)
 
     >>> cprov.archive.getAllPublishedBinaries(

=== modified file 'lib/lp/soyuz/doc/archive.txt'
--- lib/lp/soyuz/doc/archive.txt	2010-07-21 15:48:46 +0000
+++ lib/lp/soyuz/doc/archive.txt	2010-08-25 10:56:48 +0000
@@ -9,8 +9,9 @@
     ...     IDistributionSet)
     >>> from lp.registry.interfaces.person import (
     ...     IPersonSet)
+    >>> from lp.soyuz.enums import ArchivePurpose, ArchiveStatus
     >>> from lp.soyuz.interfaces.archive import (
-    ...     ArchivePurpose, IArchiveSet, IArchive)
+    ...     IArchiveSet, IArchive)
 
     >>> cprov = getUtility(IPersonSet).getByName('cprov')
     >>> cprov_archive = cprov.archive
@@ -184,7 +185,6 @@
     >>> print cprov_archive.status.name
     ACTIVE
 
-    >>> from lp.soyuz.interfaces.archive import ArchiveStatus
     >>> cprov_archive.status = ArchiveStatus.DELETING
     >>> print cprov_archive.status.name
     DELETING
@@ -300,7 +300,7 @@
  * 'version': exact version string matching;
  * 'status': a item or a list of PackagePublishingStatus.
 
-    >>> from canonical.launchpad.interfaces import PackagePublishingStatus
+    >>> from lp.soyuz.enums import PackagePublishingStatus
 
     >>> active_status = [PackagePublishingStatus.PENDING,
     ...                  PackagePublishingStatus.PUBLISHED]

=== modified file 'lib/lp/soyuz/doc/archivearch.txt'
--- lib/lp/soyuz/doc/archivearch.txt	2009-06-12 16:36:02 +0000
+++ lib/lp/soyuz/doc/archivearch.txt	2010-08-25 10:56:48 +0000
@@ -3,7 +3,7 @@
 processors the source packages in a certain archives will be built
 for.
 
-    >>> from lp.soyuz.interfaces.archive import ArchivePurpose
+    >>> from lp.soyuz.enums import ArchivePurpose
     >>> rebuild_archive = factory.makeArchive(
     ...     purpose=ArchivePurpose.COPY, name='archivearch-test')
 

=== modified file 'lib/lp/soyuz/doc/archivepermission.txt'
--- lib/lp/soyuz/doc/archivepermission.txt	2010-04-12 03:06:35 +0000
+++ lib/lp/soyuz/doc/archivepermission.txt	2010-08-25 10:56:48 +0000
@@ -7,8 +7,9 @@
 Two main operations are supported: upload and queue administration.
 
     >>> from canonical.launchpad.webapp.testing import verifyObject
+    >>> from lp.soyuz.enums import ArchivePermissionType
     >>> from lp.soyuz.interfaces.archivepermission import (
-    ...     ArchivePermissionType, IArchivePermission, IArchivePermissionSet)
+    ...     IArchivePermission, IArchivePermissionSet)
     >>> from lp.soyuz.model.archivepermission import ArchivePermission
 
     >>> permission_set = getUtility(IArchivePermissionSet)

=== modified file 'lib/lp/soyuz/doc/archivesubscriber.txt'
--- lib/lp/soyuz/doc/archivesubscriber.txt	2010-07-12 13:32:53 +0000
+++ lib/lp/soyuz/doc/archivesubscriber.txt	2010-08-25 10:56:48 +0000
@@ -204,8 +204,9 @@
 privilege which applies to the person in the subscriptions and launchpad
 admins.
 
+    >>> from lp.soyuz.enums import ArchiveSubscriberStatus
     >>> from lp.soyuz.interfaces.archivesubscriber import (
-    ...     ArchiveSubscriberStatus, IArchiveSubscriberSet)
+    ...     IArchiveSubscriberSet)
     >>> sub_set = getUtility(IArchiveSubscriberSet)
 
     >>> login("no-priv@xxxxxxxxxxxxx")
@@ -360,8 +361,6 @@
 
     >>> login("admin@xxxxxxxxxxxxx")
     >>> new_sub.description = u"changed by admin"
-    >>> from lp.soyuz.interfaces.archivesubscriber import (
-    ...     ArchiveSubscriberStatus)
     >>> new_sub.status = ArchiveSubscriberStatus.EXPIRED
 
 The subscriber and registrant properties are not editable.

=== modified file 'lib/lp/soyuz/doc/binarypackagebuild.txt'
--- lib/lp/soyuz/doc/binarypackagebuild.txt	2010-08-10 21:54:41 +0000
+++ lib/lp/soyuz/doc/binarypackagebuild.txt	2010-08-25 10:56:48 +0000
@@ -304,11 +304,11 @@
     >>> version = '0.0.1-demo'
     >>> summary = 'Summmmmmmmary'
     >>> description = 'Descripppppppption'
-    >>> from canonical.launchpad.interfaces import BinaryPackageFormat
+    >>> from lp.soyuz.enums import BinaryPackageFormat
     >>> binpackageformat = BinaryPackageFormat.DEB
     >>> component = firefox_build.source_package_release.component.id
     >>> section = firefox_build.source_package_release.section.id
-    >>> from canonical.launchpad.interfaces import PackagePublishingPriority
+    >>> from lp.soyuz.enums import PackagePublishingPriority
     >>> priority = PackagePublishingPriority.STANDARD
     >>> shlibdeps = None
     >>> depends = None
@@ -627,7 +627,7 @@
     # Create a rebuild archive, copy the 'old-source' source
     # publications to it and create builds in the rebuild archive
     # context.
-    >>> from lp.soyuz.interfaces.archive import ArchivePurpose
+    >>> from lp.soyuz.enums import ArchivePurpose
     >>> login('foo.bar@xxxxxxxxxxxxx')
     >>> rebuild_archive = factory.makeArchive(
     ...     ubuntutest, ubuntutest.owner, 'test-rebuild',

=== modified file 'lib/lp/soyuz/doc/build-notification.txt'
--- lib/lp/soyuz/doc/build-notification.txt	2010-05-21 12:12:58 +0000
+++ lib/lp/soyuz/doc/build-notification.txt	2010-08-25 10:56:48 +0000
@@ -568,8 +568,8 @@
   >>> commit()
   >>> LaunchpadZopelessLayer.switchDbUser('launchpad')
 
-  >>> from lp.soyuz.interfaces.archive import (
-  ...     ArchivePurpose, IArchiveSet)
+  >>> from lp.soyuz.enums import ArchivePurpose
+  >>> from lp.soyuz.interfaces.archive import IArchiveSet
   >>> named_ppa = getUtility(IArchiveSet).new(
   ...     owner=cprov, name='testing', purpose=ArchivePurpose.PPA)
 

=== modified file 'lib/lp/soyuz/doc/buildd-mass-retry.txt'
--- lib/lp/soyuz/doc/buildd-mass-retry.txt	2010-05-13 15:46:46 +0000
+++ lib/lp/soyuz/doc/buildd-mass-retry.txt	2010-08-25 10:56:48 +0000
@@ -53,7 +53,7 @@
   >>> from zope.security.proxy import removeSecurityProxy
   >>> from lp.soyuz.interfaces.binarypackagebuild import (
   ...     IBinaryPackageBuildSet)
-  >>> from lp.soyuz.interfaces.publishing import PackagePublishingStatus
+  >>> from lp.soyuz.enums import PackagePublishingStatus
   >>> build = getUtility(IBinaryPackageBuildSet).getByBuildID(12)
   >>> pub = removeSecurityProxy(build.current_source_publication)
 

=== modified file 'lib/lp/soyuz/doc/buildd-queuebuilder-lookup.txt'
--- lib/lp/soyuz/doc/buildd-queuebuilder-lookup.txt	2010-01-10 05:39:50 +0000
+++ lib/lp/soyuz/doc/buildd-queuebuilder-lookup.txt	2010-08-25 10:56:48 +0000
@@ -22,10 +22,8 @@
     >>> from lp.registry.interfaces.distribution import IDistributionSet
     >>> from lp.registry.interfaces.person import IPersonSet
     >>> from lp.registry.interfaces.pocket import PackagePublishingPocket
-    >>> from lp.soyuz.interfaces.archive import (
-    ...     ArchivePurpose, IArchiveSet)
-    >>> from lp.soyuz.interfaces.publishing import (
-    ...     PackagePublishingStatus)
+    >>> from lp.soyuz.enums import ArchivePurpose, PackagePublishingStatus
+    >>> from lp.soyuz.interfaces.archive import IArchiveSet
 
     >>> ubuntu = getUtility(IDistributionSet)['ubuntu']
     >>> cprov = getUtility(IPersonSet).getByName('cprov')

=== modified file 'lib/lp/soyuz/doc/buildd-scoring.txt'
--- lib/lp/soyuz/doc/buildd-scoring.txt	2010-05-21 06:30:00 +0000
+++ lib/lp/soyuz/doc/buildd-scoring.txt	2010-08-25 10:56:48 +0000
@@ -29,8 +29,9 @@
     u'The Hoary Hedgehog Release for i386 (x86)'
 
     >>> from canonical.database.sqlbase import commit
+    >>> from lp.soyuz.enums import PackagePublishingStatus
     >>> from canonical.launchpad.interfaces import (
-    ...     PackagePublishingStatus, SourcePackageUrgency)
+    ...     SourcePackageUrgency)
     >>> from lp.registry.interfaces.pocket import PackagePublishingPocket
     >>> from lp.soyuz.tests.test_publishing import (
     ...     SoyuzTestPublisher)
@@ -255,8 +256,8 @@
 they were created.
 
     >>> LaunchpadZopelessLayer.switchDbUser('launchpad')
-    >>> from canonical.launchpad.interfaces import (
-    ...     ArchivePurpose, IArchiveSet)
+    >>> from lp.soyuz.enums import ArchivePurpose
+    >>> from canonical.launchpad.interfaces import IArchiveSet
     >>> copy = getUtility(IArchiveSet).new(
     ...     owner=ubuntu.owner, purpose=ArchivePurpose.COPY,
     ...     name='test-rebuild')

=== modified file 'lib/lp/soyuz/doc/buildd-slavescanner.txt'
--- lib/lp/soyuz/doc/buildd-slavescanner.txt	2010-08-17 12:02:30 +0000
+++ lib/lp/soyuz/doc/buildd-slavescanner.txt	2010-08-25 10:56:48 +0000
@@ -745,7 +745,7 @@
 permissive database user.
 
     >>> from canonical.config import config
-    >>> from canonical.launchpad.interfaces import PackagePublishingStatus
+    >>> from lp.soyuz.enums import PackagePublishingStatus
     >>> from canonical.testing.layers import LaunchpadZopelessLayer
 
     >>> spr = build.source_package_release

=== modified file 'lib/lp/soyuz/doc/distribution.txt'
--- lib/lp/soyuz/doc/distribution.txt	2010-08-19 11:00:37 +0000
+++ lib/lp/soyuz/doc/distribution.txt	2010-08-25 10:56:48 +0000
@@ -14,9 +14,9 @@
 
     >>> from lp.registry.interfaces.distribution import IDistributionSet
     >>> from lp.registry.interfaces.pocket import PackagePublishingPocket
+    >>> from lp.soyuz.enums import PackagePublishingStatus
     >>> from canonical.launchpad.interfaces import (
-    ...     ISourcePackageName, IBinaryPackageName,
-    ...     PackagePublishingStatus)
+    ...     ISourcePackageName, IBinaryPackageName)
 
     >>> distroset = getUtility(IDistributionSet)
     >>> gentoo = distroset.getByName("gentoo")
@@ -398,7 +398,6 @@
 Publishing the record will exclude Celso's PPA from pending-publication
 state:
 
-    >>> from canonical.launchpad.interfaces import PackagePublishingStatus
     >>> src_pub.status = PackagePublishingStatus.PUBLISHED
 
     >>> ubuntu.getPendingPublicationPPAs().count()

=== modified file 'lib/lp/soyuz/doc/distroarchseriesbinarypackage.txt'
--- lib/lp/soyuz/doc/distroarchseriesbinarypackage.txt	2010-07-21 11:13:19 +0000
+++ lib/lp/soyuz/doc/distroarchseriesbinarypackage.txt	2010-08-25 10:56:48 +0000
@@ -35,10 +35,11 @@
 
   >>> main_component = Component.selectOneBy(name="main")
   >>> misc_section = Section.selectOneBy(name="base")
-  >>> from canonical.launchpad.interfaces import BinaryPackageFormat
+  >>> from lp.soyuz.enums import BinaryPackageFormat
   >>> binpackageformat = BinaryPackageFormat.DEB
+  >>> from lp.soyuz.enums import (
+  ...     PackagePublishingPriority, PackagePublishingStatus)
   >>> from canonical.launchpad.interfaces import (
-  ...     PackagePublishingPriority, PackagePublishingStatus,
   ...     IDistributionSet)
   >>> from lp.registry.interfaces.pocket import PackagePublishingPocket
   >>> priority = PackagePublishingPriority.STANDARD
@@ -228,7 +229,6 @@
   >>> from canonical.launchpad.database import (
   ...   DistroArchSeries, DistroArchSeriesBinaryPackage,
   ...   BinaryPackageName, BinaryPackagePublishingHistory)
-  >>> from canonical.launchpad.interfaces import PackagePublishingStatus
   >>> warty_i386 = DistroArchSeries.get(1)
   >>> pmount_name = BinaryPackageName.selectOneBy(name="pmount")
   >>> pmount_warty_i386 = DistroArchSeriesBinaryPackage(warty_i386,

=== modified file 'lib/lp/soyuz/doc/distroseriesqueue-ddtp-tarball.txt'
--- lib/lp/soyuz/doc/distroseriesqueue-ddtp-tarball.txt	2010-08-04 00:16:44 +0000
+++ lib/lp/soyuz/doc/distroseriesqueue-ddtp-tarball.txt	2010-08-25 10:56:48 +0000
@@ -168,7 +168,7 @@
 Inspect the QUEUE looking for an ACCEPTED entry corresponding to the
 previous upload:
 
-  >>> from canonical.launchpad.interfaces import PackageUploadStatus
+  >>> from lp.soyuz.enums import PackageUploadStatus
   >>> queue_item = breezy_autotest.getQueueItems(
   ...      status=PackageUploadStatus.ACCEPTED)[0]
   >>> queue_item.customfiles[0].libraryfilealias.filename

=== modified file 'lib/lp/soyuz/doc/distroseriesqueue-dist-upgrader.txt'
--- lib/lp/soyuz/doc/distroseriesqueue-dist-upgrader.txt	2010-08-12 21:02:47 +0000
+++ lib/lp/soyuz/doc/distroseriesqueue-dist-upgrader.txt	2010-08-25 10:56:48 +0000
@@ -162,7 +162,7 @@
 Inspect the QUEUE looking for an ACCEPTED entry corresponding to the
 previous upload:
 
-  >>> from lp.soyuz.interfaces.queue import PackageUploadStatus
+  >>> from lp.soyuz.enums import PackageUploadStatus
   >>> queue_item = breezy_autotest.getQueueItems(
   ...      status=PackageUploadStatus.ACCEPTED)[0]
   >>> queue_item.customfiles[0].libraryfilealias.filename
@@ -273,7 +273,8 @@
 files in the respective PPA location.
 
   >>> from lp.registry.interfaces.person import IPersonSet
-  >>> from lp.soyuz.interfaces.archive import ArchivePurpose, IArchiveSet
+  >>> from lp.soyuz.enums import ArchivePurpose
+  >>> from lp.soyuz.interfaces.archive import IArchiveSet
   >>> from canonical.launchpad.interfaces import ILaunchpadCelebrities
 
   >>> beta_testers = getUtility(ILaunchpadCelebrities).launchpad_beta_testers

=== modified file 'lib/lp/soyuz/doc/distroseriesqueue-translations.txt'
--- lib/lp/soyuz/doc/distroseriesqueue-translations.txt	2010-08-04 00:16:44 +0000
+++ lib/lp/soyuz/doc/distroseriesqueue-translations.txt	2010-08-25 10:56:48 +0000
@@ -13,7 +13,7 @@
   >>> from lp.registry.interfaces.distroseries import IDistroSeriesSet
   >>> from lp.registry.interfaces.pocket import PackagePublishingPocket
   >>> from lp.soyuz.interfaces.component import IComponentSet
-  >>> from lp.soyuz.interfaces.publishing import (
+  >>> from lp.soyuz.enums import (
   ...     PackagePublishingStatus)
   >>> from lp.registry.interfaces.sourcepackagename import (
   ...     ISourcePackageNameSet)
@@ -148,7 +148,7 @@
 
 An upload to the RELEASE pocket will add items to the import queue:
 
-  >>> from lp.soyuz.interfaces.queue import PackageUploadStatus
+  >>> from lp.soyuz.enums import PackageUploadStatus
   >>> queue_item = dapper.getQueueItems(
   ...     status=PackageUploadStatus.NEW)[0]
   >>> queue_item.customfiles[0].publish()
@@ -285,7 +285,8 @@
 Distribution archives (i.e. PPAs).
 
   >>> from lp.registry.interfaces.person import IPersonSet
-  >>> from lp.soyuz.interfaces.archive import ArchivePurpose, IArchiveSet
+  >>> from lp.soyuz.enums import ArchivePurpose
+  >>> from lp.soyuz.interfaces.archive import IArchiveSet
 
   >>> foobar_archive = getUtility(IArchiveSet).new(
   ...     purpose=ArchivePurpose.PPA,
@@ -345,7 +346,7 @@
   ...     IArchive, ArchivePurpose)
   >>> from lp.soyuz.interfaces.queue import (
   ...     IPackageUpload, IPackageUploadCustom)
-  >>> from lp.soyuz.interfaces.queue import PackageUploadCustomFormat
+  >>> from lp.soyuz.enums import PackageUploadCustomFormat
   >>> from lp.soyuz.interfaces.component import IComponentSet
   >>> from lp.registry.interfaces.person import IPerson
   >>> from lp.soyuz.interfaces.sourcepackagerelease import (

=== modified file 'lib/lp/soyuz/doc/distroseriesqueue.txt'
--- lib/lp/soyuz/doc/distroseriesqueue.txt	2010-08-20 12:11:30 +0000
+++ lib/lp/soyuz/doc/distroseriesqueue.txt	2010-08-25 10:56:48 +0000
@@ -82,7 +82,7 @@
 
   >>> from canonical.launchpad.interfaces import (
   ...      QueueInconsistentStateError)
-  >>> from canonical.launchpad.interfaces import PackageUploadStatus
+  >>> from lp.soyuz.enums import PackageUploadStatus
 
   >>> new_queue = hoary.getQueueItems(PackageUploadStatus.NEW)
 
@@ -113,7 +113,7 @@
 Confirm we can now find ed published in hoary.
 
   >>> from canonical.launchpad.database import SourcePackagePublishingHistory
-  >>> from canonical.launchpad.interfaces import PackagePublishingStatus
+  >>> from lp.soyuz.enums import PackagePublishingStatus
   >>> for release in SourcePackagePublishingHistory.selectBy(
   ...     distroseries=hoary, status=PackagePublishingStatus.PENDING):
   ...     if release.sourcepackagerelease.sourcepackagename.name == "ed":
@@ -162,7 +162,6 @@
 Retrieve some data from DB to play more with counter.
 
   >>> from canonical.launchpad.interfaces import IDistributionSet
-  >>> from canonical.launchpad.interfaces import PackageUploadStatus
   >>> distro = getUtility(IDistributionSet).getByName('ubuntu')
   >>> breezy_autotest = distro['breezy-autotest']
 
@@ -858,7 +857,7 @@
     ...     binary_package.priority.title)
     main/base/Important
 
-    >>> from canonical.launchpad.interfaces import PackagePublishingPriority
+    >>> from lp.soyuz.enums import PackagePublishingPriority
     >>> print item.overrideBinaries(
     ...     new_component=restricted,
     ...     new_section=web,
@@ -901,14 +900,14 @@
 
 Filtering by status:
 
-    >>> from lp.soyuz.interfaces.queue import PackageUploadStatus
     >>> warty.getPackageUploads(
     ...     status=PackageUploadStatus.DONE).count()
     1
 
 Filtering by archive:
 
-    >>> from lp.soyuz.interfaces.archive import ArchivePurpose, IArchiveSet
+    >>> from lp.soyuz.enums import ArchivePurpose
+    >>> from lp.soyuz.interfaces.archive import IArchiveSet
     >>> partner_archive = getUtility(IArchiveSet).getByDistroPurpose(
     ...     warty.distribution, ArchivePurpose.PARTNER)
     >>> warty.getPackageUploads(archive=partner_archive).count()
@@ -922,7 +921,7 @@
 
 Filtering by custom_type.  We need to add some custom uploads to show this.
 
-    >>> from lp.soyuz.interfaces.queue import PackageUploadCustomFormat
+    >>> from lp.soyuz.enums import PackageUploadCustomFormat
     >>> static_xlat = PackageUploadCustomFormat.STATIC_TRANSLATIONS
     >>> def add_static_xlat_upload():
     ...     upload = warty.createQueueEntry(

=== modified file 'lib/lp/soyuz/doc/fakepackager.txt'
--- lib/lp/soyuz/doc/fakepackager.txt	2009-05-06 20:53:05 +0000
+++ lib/lp/soyuz/doc/fakepackager.txt	2010-08-25 10:56:48 +0000
@@ -306,8 +306,8 @@
     >>> print foobar.archive
     None
 
-    >>> from lp.soyuz.interfaces.archive import (
-    ...     ArchivePurpose, IArchiveSet)
+    >>> from lp.soyuz.enums import ArchivePurpose
+    >>> from lp.soyuz.interfaces.archive import IArchiveSet
     >>> ppa = getUtility(IArchiveSet).new(
     ...     owner=foobar, distribution=ubuntu, purpose=ArchivePurpose.PPA)
 

=== modified file 'lib/lp/soyuz/doc/gina.txt'
--- lib/lp/soyuz/doc/gina.txt	2010-05-14 06:10:48 +0000
+++ lib/lp/soyuz/doc/gina.txt	2010-08-25 10:56:48 +0000
@@ -541,7 +541,7 @@
 that's what overrides actually do.
 
     >>> from canonical.database.sqlbase import sqlvalues
-    >>> from canonical.launchpad.interfaces import PackagePublishingStatus
+    >>> from lp.soyuz.enums import PackagePublishingStatus
     >>> x11_pub = SSPPH.select("""sourcepackagerelease = %s
     ...                           AND distroseries = %s
     ...                           AND status in (%s, %s)""" %

=== modified file 'lib/lp/soyuz/doc/package-arch-specific.txt'
--- lib/lp/soyuz/doc/package-arch-specific.txt	2010-07-31 07:16:38 +0000
+++ lib/lp/soyuz/doc/package-arch-specific.txt	2010-08-25 10:56:48 +0000
@@ -255,7 +255,7 @@
 To check binary PAS listings we'll use a source publication for which
 produces a single binary.
 
-    >>> from lp.soyuz.interfaces.publishing import (
+    >>> from lp.soyuz.enums import (
     ...     PackagePublishingStatus)
 
     >>> LaunchpadZopelessLayer.switchDbUser("launchpad")

=== modified file 'lib/lp/soyuz/doc/package-cache.txt'
--- lib/lp/soyuz/doc/package-cache.txt	2010-03-15 11:33:52 +0000
+++ lib/lp/soyuz/doc/package-cache.txt	2010-08-25 10:56:48 +0000
@@ -508,7 +508,7 @@
 We will use `SoyuzTestPublisher` for creating convenient publications.
 
   >>> from canonical.database.sqlbase import commit
-  >>> from lp.soyuz.interfaces.publishing import (
+  >>> from lp.soyuz.enums import (
   ...     PackagePublishingStatus)
   >>> from lp.soyuz.tests.test_publishing import (
   ...     SoyuzTestPublisher)

=== modified file 'lib/lp/soyuz/doc/package-diff.txt'
--- lib/lp/soyuz/doc/package-diff.txt	2010-08-23 09:10:10 +0000
+++ lib/lp/soyuz/doc/package-diff.txt	2010-08-25 10:56:48 +0000
@@ -228,8 +228,8 @@
 For testing diffs in the PPA context we need to activate the PPA for
 Foo Bar.
 
-    >>> from lp.soyuz.interfaces.archive import (
-    ...     ArchivePurpose, IArchiveSet)
+    >>> from lp.soyuz.enums import ArchivePurpose
+    >>> from lp.soyuz.interfaces.archive import IArchiveSet
     >>> foobar = getUtility(IPersonSet).getByName('name16')
     >>> ppa = getUtility(IArchiveSet).new(
     ...     owner=foobar, distribution=ubuntu, purpose=ArchivePurpose.PPA)
@@ -675,7 +675,7 @@
 default, which will stop the diff script from attempting to create the diff.
 
     >>> from lp.soyuz.tests.test_publishing import SoyuzTestPublisher
-    >>> from lp.soyuz.interfaces.publishing import PackagePublishingStatus
+    >>> from lp.soyuz.enums import PackagePublishingStatus
     >>> stp = SoyuzTestPublisher()
     >>> discard = stp.setUpDefaultDistroSeries(hoary)
     >>> udev_orig = stp.getPubSource(

=== modified file 'lib/lp/soyuz/doc/package-meta-classes.txt'
--- lib/lp/soyuz/doc/package-meta-classes.txt	2010-05-14 07:20:41 +0000
+++ lib/lp/soyuz/doc/package-meta-classes.txt	2010-08-25 10:56:48 +0000
@@ -73,7 +73,7 @@
 
     >>> from lp.registry.interfaces.distribution import (
     ...     IDistributionSet)
-    >>> from lp.soyuz.interfaces.publishing import (
+    >>> from lp.soyuz.enums import (
     ...     PackagePublishingStatus)
     >>> from lp.soyuz.tests.test_publishing import (
     ...      SoyuzTestPublisher)

=== modified file 'lib/lp/soyuz/doc/packagecopyrequest.txt'
--- lib/lp/soyuz/doc/packagecopyrequest.txt	2009-08-13 15:12:16 +0000
+++ lib/lp/soyuz/doc/packagecopyrequest.txt	2010-08-25 10:56:48 +0000
@@ -10,9 +10,9 @@
     >>> from lp.soyuz.adapters.packagelocation import (
     ...     build_package_location)
     >>> from lp.soyuz.interfaces.packagecopyrequest import (
-    ...     IPackageCopyRequest, IPackageCopyRequestSet, PackageCopyStatus)
-    >>> from lp.soyuz.interfaces.archive import (
-    ...     ArchivePurpose, IArchiveSet)
+    ...     IPackageCopyRequest, IPackageCopyRequestSet)
+    >>> from lp.soyuz.enums import ArchivePurpose, PackageCopyStatus
+    >>> from lp.soyuz.interfaces.archive import IArchiveSet
     >>> from canonical.launchpad.interfaces import (
     ...     IPersonSet, IDistributionSet)
     >>> from canonical.launchpad.webapp.testing import verifyObject

=== modified file 'lib/lp/soyuz/doc/packageset.txt'
--- lib/lp/soyuz/doc/packageset.txt	2010-03-16 01:30:39 +0000
+++ lib/lp/soyuz/doc/packageset.txt	2010-08-25 10:56:48 +0000
@@ -611,8 +611,8 @@
 As it stands package sets will first be used for governing source package
 uploads i.e. in conjunction with `ArchivePermission` data.
 
-    >>> from canonical.launchpad.interfaces import (
-    ...     ArchivePermissionType, IArchivePermissionSet)
+    >>> from lp.soyuz.enums import ArchivePermissionType
+    >>> from canonical.launchpad.interfaces import IArchivePermissionSet
     >>> ap_set = getUtility(IArchivePermissionSet)
 
 So, let's assign upload permissions for the 'mozilla' package set to our
@@ -636,8 +636,8 @@
 Introduce a copy archive that will be used to disambiguate archive
 permissions.
 
-    >>> from lp.soyuz.interfaces.archive import (
-    ...     ArchivePurpose, IArchiveSet)
+    >>> from lp.soyuz.enums import ArchivePurpose
+    >>> from lp.soyuz.interfaces.archive import IArchiveSet
     >>> rebuild_archive = getUtility(IArchiveSet).new(
     ...     owner=person1, purpose=ArchivePurpose.COPY,
     ...     distribution=ubuntu, name='copy-archive',

=== modified file 'lib/lp/soyuz/doc/publishing.txt'
--- lib/lp/soyuz/doc/publishing.txt	2010-07-12 03:14:42 +0000
+++ lib/lp/soyuz/doc/publishing.txt	2010-08-25 10:56:48 +0000
@@ -172,7 +172,7 @@
 a rebuild archive then the status summary will always display
 FULLY_BUILT.
 
-    >>> from lp.soyuz.interfaces.archive import ArchivePurpose
+    >>> from lp.soyuz.enums import ArchivePurpose
     >>> spph.archive.purpose = ArchivePurpose.COPY
     >>> build_status_summary = spph.getStatusSummaryForBuilds()
     >>> print_build_status_summary(build_status_summary)
@@ -185,7 +185,7 @@
 
 If one of the builds becomes published, it will not appear in the summary:
 
-    >>> from lp.soyuz.interfaces.publishing import (
+    >>> from lp.soyuz.enums import (
     ...     PackagePublishingStatus)
     >>> bpr = test_publisher.uploadBinaryForBuild(builds[0], 'abc-bin')
     >>> bpph = test_publisher.publishBinaryInArchive(bpr, spph.archive,

=== modified file 'lib/lp/soyuz/doc/queuebuilder.txt'
--- lib/lp/soyuz/doc/queuebuilder.txt	2010-05-21 12:34:25 +0000
+++ lib/lp/soyuz/doc/queuebuilder.txt	2010-08-25 10:56:48 +0000
@@ -21,7 +21,7 @@
     >>> from lp.buildmaster.model.buildqueue import BuildQueue
     >>> from lp.registry.model.distroseries import DistroSeries
     >>> from lp.registry.interfaces.pocket import PackagePublishingPocket
-    >>> from lp.soyuz.interfaces.publishing import PackagePublishingStatus
+    >>> from lp.soyuz.enums import PackagePublishingStatus
     >>> from lp.soyuz.model.binarypackagebuild import BinaryPackageBuild
     >>> from lp.soyuz.model.distroarchseries import (
     ...     DistroArchSeries, PocketChroot)

=== modified file 'lib/lp/soyuz/doc/sourcepackagerelease-build-lookup.txt'
--- lib/lp/soyuz/doc/sourcepackagerelease-build-lookup.txt	2010-05-21 12:39:44 +0000
+++ lib/lp/soyuz/doc/sourcepackagerelease-build-lookup.txt	2010-08-25 10:56:48 +0000
@@ -118,7 +118,7 @@
 SoyuzTestPublisher helper to create fake but complete publication for
 this test.
 
-    >>> from canonical.launchpad.interfaces import (
+    >>> from lp.soyuz.enums import (
     ...    PackagePublishingStatus)
     >>> from lp.soyuz.tests.test_publishing import (
     ...     SoyuzTestPublisher)

=== modified file 'lib/lp/soyuz/doc/soyuz-set-of-uploads.txt'
--- lib/lp/soyuz/doc/soyuz-set-of-uploads.txt	2010-08-06 14:29:36 +0000
+++ lib/lp/soyuz/doc/soyuz-set-of-uploads.txt	2010-08-25 10:56:48 +0000
@@ -71,7 +71,7 @@
 
   >>> from lp.registry.model.distribution import Distribution
   >>> from lp.registry.interfaces.pocket import PackagePublishingPocket
-  >>> from lp.soyuz.interfaces.queue import PackageUploadStatus
+  >>> from lp.soyuz.enums import PackageUploadStatus
   >>> from lp.soyuz.scripts.initialise_distroseries import (
   ...     InitialiseDistroSeries)
   >>> from canonical.launchpad.database import LibraryFileAlias
@@ -153,7 +153,6 @@
 
   >>> from zope.component import getUtility
   >>> from canonical.launchpad.interfaces import IDistributionSet
-  >>> from canonical.launchpad.interfaces import PackageUploadStatus
   >>> from canonical.launchpad.ftests import login
   >>> from canonical.launchpad.ftests import syncUpdate
 
@@ -192,7 +191,7 @@
   >>> from canonical.launchpad.database import (
   ...     SourcePackagePublishingHistory as SPPH,
   ...     BinaryPackagePublishingHistory as BPPH)
-  >>> from canonical.launchpad.interfaces import PackagePublishingStatus as PPS
+  >>> from lp.soyuz.enums import PackagePublishingStatus as PPS
   >>> from canonical.database.constants import UTC_NOW
   >>> def simple_publish(distro):
   ...     srcs_to_publish = SPPH.select("""

=== modified file 'lib/lp/soyuz/doc/soyuz-upload.txt'
--- lib/lp/soyuz/doc/soyuz-upload.txt	2010-08-20 11:32:21 +0000
+++ lib/lp/soyuz/doc/soyuz-upload.txt	2010-08-25 10:56:48 +0000
@@ -429,8 +429,9 @@
 as NEW
 
   >>> from lp.registry.interfaces.distribution import IDistributionSet
+  >>> from lp.soyuz.enums import PackageUploadStatus
   >>> from lp.soyuz.interfaces.queue import (
-  ...     PackageUploadStatus, QueueInconsistentStateError)
+  ...     QueueInconsistentStateError)
 
 Since we landed correct security adapters for Upload,
 we need to perform further actions logged in as an admins, which have

=== added file 'lib/lp/soyuz/enums.py'
--- lib/lp/soyuz/enums.py	1970-01-01 00:00:00 +0000
+++ lib/lp/soyuz/enums.py	2010-08-25 10:56:48 +0000
@@ -0,0 +1,537 @@
+# Copyright 2010 Canonical Ltd.  This software is licensed under the
+# GNU Affero General Public License version 3 (see the file LICENSE).
+
+"""Enumerations used in the lp/soyuz modules."""
+
+__metaclass__ = type
+__all__ = [
+    'ArchiveJobType',
+    'ArchivePermissionType',
+    'ArchivePurpose',
+    'ArchiveStatus',
+    'ArchiveSubscriberStatus',
+    'BinaryPackageFileType',
+    'BinaryPackageFormat',
+    'PackageCopyStatus',
+    'PackageDiffStatus',
+    'PackagePublishingPriority',
+    'PackagePublishingStatus',
+    'PackageUploadCustomFormat',
+    'PackageUploadStatus',
+    'SourcePackageFormat',
+    ]
+
+from lazr.enum import (
+    DBEnumeratedType,
+    DBItem,
+    )
+
+
+class ArchiveJobType(DBEnumeratedType):
+    """Values that IArchiveJob.job_type can take."""
+
+    COPY_ARCHIVE = DBItem(0, """
+        Create a copy archive.
+
+        This job creates a copy archive from the current state of
+        the archive.
+        """)
+
+
+class ArchivePermissionType(DBEnumeratedType):
+    """Archive Permission Type.
+
+    The permission being granted, such as upload rights, or queue
+    manipulation rights.
+    """
+
+    UPLOAD = DBItem(1, """
+        Archive Upload Rights
+
+        This permission allows a user to upload.
+        """)
+
+    QUEUE_ADMIN = DBItem(2, """
+        Queue Administration Rights
+
+        This permission allows a user to administer the distroseries
+        upload queue.
+        """)
+
+
+class ArchivePurpose(DBEnumeratedType):
+    """The purpose, or type, of an archive.
+
+    A distribution can be associated with different archives and this
+    schema item enumerates the different archive types and their purpose.
+
+    For example, Partner/ISV software in ubuntu is stored in a separate
+    archive. PPAs are separate archives and contain packages that 'overlay'
+    the ubuntu PRIMARY archive.
+    """
+
+    PRIMARY = DBItem(1, """
+        Primary Archive
+
+        This is the primary Ubuntu archive.
+        """)
+
+    PPA = DBItem(2, """
+        PPA Archive
+
+        This is a Personal Package Archive.
+        """)
+
+    PARTNER = DBItem(4, """
+        Partner Archive
+
+        This is the archive for partner packages.
+        """)
+
+    COPY = DBItem(6, """
+        Generalized copy archive
+
+        This kind of archive will be used for rebuilds, snapshots etc.
+        """)
+
+    DEBUG = DBItem(7, """
+        Debug Archive
+
+        This kind of archive will be user for publishing package with
+        debug-symbols.
+        """)
+
+
+class ArchiveStatus(DBEnumeratedType):
+    """The status of an archive, e.g. active, disabled. """
+
+    ACTIVE = DBItem(0, """
+        Active
+
+        This archive accepts uploads, copying and publishes packages.
+        """)
+
+    DELETING = DBItem(1, """
+        Deleting
+
+        This archive is in the process of being deleted.  This is a user-
+        requested and short-lived status.
+        """)
+
+    DELETED = DBItem(2, """
+        Deleted
+
+        This archive has been deleted and removed from disk.
+        """)
+
+
+class ArchiveSubscriberStatus(DBEnumeratedType):
+    """The status of an `ArchiveSubscriber`."""
+    
+    CURRENT = DBItem(1, """
+        Active
+
+        The subscription is current.
+        """)
+    
+    EXPIRED = DBItem(2, """
+        Expired
+
+        The subscription has expired.
+        """)
+    
+    CANCELLED = DBItem(3, """
+        Cancelled
+
+        The subscription was cancelled.
+        """)
+
+
+class BinaryPackageFileType(DBEnumeratedType):
+    """Binary Package File Type
+
+    Launchpad handles a variety of packaging systems and binary package
+    formats. This schema documents the known binary package file types.
+    """
+
+    DEB = DBItem(1, """
+        DEB Format
+
+        This format is the standard package format used on Ubuntu and other
+        similar operating systems.
+        """)
+
+    RPM = DBItem(2, """
+        RPM Format
+
+        This format is used on mandrake, Red Hat, Suse and other similar
+        distributions.
+        """)
+
+    UDEB = DBItem(3, """
+        UDEB Format
+
+        This format is the standard package format used on Ubuntu and other
+        similar operating systems for the installation system.
+        """)
+
+    DDEB = DBItem(4, """
+        DDEB Format
+
+        This format is the standard package format used on Ubuntu and other
+        similar operating systems for distributing debug symbols.
+        """)
+
+
+class BinaryPackageFormat(DBEnumeratedType):
+    """Binary Package Format
+
+    Launchpad tracks a variety of binary package formats. This schema
+    documents the list of binary package formats that are supported
+    in Launchpad.
+    """
+
+    DEB = DBItem(1, """
+        Ubuntu Package
+
+        This is the binary package format used by Ubuntu and all similar
+        distributions. It includes dependency information to allow the
+        system to ensure it always has all the software installed to make
+        any new package work correctly.  """)
+
+    UDEB = DBItem(2, """
+        Ubuntu Installer Package
+
+        This is the binary package format used by the installer in Ubuntu and
+        similar distributions.  """)
+
+    EBUILD = DBItem(3, """
+        Gentoo Ebuild Package
+
+        This is the Gentoo binary package format. While Gentoo is primarily
+        known for being a build-it-from-source-yourself kind of
+        distribution, it is possible to exchange binary packages between
+        Gentoo systems.  """)
+
+    RPM = DBItem(4, """
+        RPM Package
+
+        This is the format used by Mandrake and other similar distributions.
+        It does not include dependency tracking information.  """)
+
+    DDEB = DBItem(5, """
+        Ubuntu Debug Package
+
+        This is the binary package format used for shipping debug symbols
+        in Ubuntu and similar distributions.""")
+
+
+class PackageCopyStatus(DBEnumeratedType):
+    """Package copy status type.
+
+    The status may be one of the following: new, in progress, complete,
+    failed, canceling, cancelled.
+    """
+
+    NEW = DBItem(0, """
+        New
+
+        A new package copy operation was requested.
+        """)
+
+    INPROGRESS = DBItem(1, """
+        In progress
+
+        The package copy operation is in progress.
+        """)
+
+    COMPLETE = DBItem(2, """
+        Complete
+
+        The package copy operation has completed successfully.
+        """)
+
+    FAILED = DBItem(3, """
+        Failed
+
+        The package copy operation has failed.
+        """)
+
+    CANCELING = DBItem(4, """
+        Canceling
+
+        The package copy operation was cancelled by the user and the
+        cancellation is in progress.
+        """)
+
+    CANCELLED = DBItem(5, """
+        Cancelled
+
+        The package copy operation was cancelled by the user.
+        """)
+
+
+class PackageDiffStatus(DBEnumeratedType):
+    """The status of a PackageDiff request."""
+
+
+    PENDING = DBItem(0, """
+        Pending
+
+        This diff request is pending processing.
+        """)
+
+    COMPLETED = DBItem(1, """
+        Completed
+
+        This diff request was successfully completed.
+        """)
+
+    FAILED = DBItem(2, """
+        Failed
+
+        This diff request has failed.
+        """)
+
+
+class PackagePublishingPriority(DBEnumeratedType):
+    """Package Publishing Priority
+
+    Binary packages have a priority which is related to how important
+    it is to have that package installed in a system. Common priorities
+    range from required to optional and various others are available.
+    """
+
+    REQUIRED = DBItem(50, """
+        Required
+
+        This priority indicates that the package is required. This priority
+        is likely to be hard-coded into various package tools. Without all
+        the packages at this priority it may become impossible to use dpkg.
+        """)
+
+    IMPORTANT = DBItem(40, """
+        Important
+
+        If foo is in a package; and "What is going on?! Where on earth is
+        foo?!?!" would be the reaction of an experienced UNIX hacker were
+        the package not installed, then the package is important.
+        """)
+
+    STANDARD = DBItem(30, """
+        Standard
+
+        Packages at this priority are standard ones you can rely on to be in
+        a distribution. They will be installed by default and provide a
+        basic character-interface userland.
+        """)
+
+    OPTIONAL = DBItem(20, """
+        Optional
+
+        This is the software you might reasonably want to install if you did
+        not know what it was or what your requiredments were. Systems such
+        as X or TeX will live here.
+        """)
+
+    EXTRA = DBItem(10, """
+        Extra
+
+        This contains all the packages which conflict with those at the
+        other priority levels; or packages which are only useful to people
+        who have very specialised needs.
+        """)
+
+
+class PackagePublishingStatus(DBEnumeratedType):
+    """Package Publishing Status
+
+     A package has various levels of being published within a DistroSeries.
+     This is important because of how new source uploads dominate binary
+     uploads bit-by-bit. Packages (source or binary) enter the publishing
+     tables as 'Pending', progress through to 'Published' eventually become
+     'Superseded' and then become 'PendingRemoval'. Once removed from the
+     DistroSeries the publishing record is also removed.
+     """
+
+    PENDING = DBItem(1, """
+        Pending
+
+        This [source] package has been accepted into the DistroSeries and
+        is now pending the addition of the files to the published disk area.
+        In due course, this source package will be published.
+        """)
+
+    PUBLISHED = DBItem(2, """
+        Published
+
+        This package is currently published as part of the archive for that
+        distroseries. In general there will only ever be one version of any
+        source/binary package published at any one time. Once a newer
+        version becomes published the older version is marked as superseded.
+        """)
+
+    SUPERSEDED = DBItem(3, """
+        Superseded
+
+        When a newer version of a [source] package is published the existing
+        one is marked as "superseded".  """)
+
+    DELETED = DBItem(4, """
+        Deleted
+
+        When a publication was "deleted" from the archive by user request.
+        Records in this state contain a reference to the Launchpad user
+        responsible for the deletion and a text comment with the removal
+        reason.
+        """)
+
+    OBSOLETE = DBItem(5, """
+        Obsolete
+
+        When a distroseries becomes obsolete, its published packages
+        are no longer required in the archive.  The publications for
+        those packages are marked as "obsolete" and are subsequently
+        removed during domination and death row processing.
+        """)
+
+
+# If you change this (add items, change the meaning, whatever) search for
+# the token ##CUSTOMFORMAT## e.g. database/queue.py or nascentupload.py and
+# update the stuff marked with it.
+class PackageUploadCustomFormat(DBEnumeratedType):
+    """Custom formats valid for the upload queue
+
+    An upload has various files potentially associated with it, from source
+    package releases, through binary builds, to specialist upload forms such
+    as a debian-installer tarball or a set of translations.
+    """
+
+    DEBIAN_INSTALLER = DBItem(0, """
+        raw-installer
+
+        A raw-installer file is a tarball. This is processed as a version
+        of the debian-installer to be unpacked into the archive root.
+        """)
+
+    ROSETTA_TRANSLATIONS = DBItem(1, """
+        raw-translations
+
+        A raw-translations file is a tarball. This is passed to the rosetta
+        import queue to be incorporated into that package's translations.
+        """)
+
+    DIST_UPGRADER = DBItem(2, """
+        raw-dist-upgrader
+
+        A raw-dist-upgrader file is a tarball. It is simply published into
+        the archive.
+        """)
+
+    DDTP_TARBALL = DBItem(3, """
+        raw-ddtp-tarball
+
+        A raw-ddtp-tarball contains all the translated package description
+        indexes for a component.
+        """)
+
+    STATIC_TRANSLATIONS = DBItem(4, """
+        raw-translations-static
+
+        A tarball containing raw (Gnome) help file translations.
+        """)
+
+    META_DATA = DBItem(5, """
+        meta-data
+
+        A file containing meta-data about the package, mainly for use in
+        the Software Center.
+        """)
+
+
+class PackageUploadStatus(DBEnumeratedType):
+    """Distro Release Queue Status
+
+    An upload has various stages it must pass through before becoming part
+    of a DistroSeries. These are managed via the Upload table
+    and related tables and eventually (assuming a successful upload into the
+    DistroSeries) the effects are published via the PackagePublishing and
+    SourcePackagePublishing tables.
+    """
+
+    NEW = DBItem(0, """
+        New
+
+        This upload is either a brand-new source package or contains a
+        binary package with brand new debs or similar. The package must sit
+        here until someone with the right role in the DistroSeries checks
+        and either accepts or rejects the upload. If the upload is accepted
+        then entries will be made in the overrides tables and further
+        uploads will bypass this state. """)
+
+    UNAPPROVED = DBItem(1, """
+        Unapproved
+
+        If a DistroSeries is frozen or locked out of ordinary updates then
+        this state is used to mean that while the package is correct from a
+        technical point of view; it has yet to be approved for inclusion in
+        this DistroSeries. One use of this state may be for security
+        releases where you want the security team of a DistroSeries to
+        approve uploads.""")
+
+    ACCEPTED = DBItem(2, """
+        Accepted
+
+        An upload in this state has passed all the checks required of it and
+        is ready to have its publishing records created.""")
+
+    DONE = DBItem(3, """
+        Done
+
+        An upload in this state has had its publishing records created if it
+        needs them and is fully processed into the DistroSeries. This state
+        exists so that a logging and/or auditing tool can pick up accepted
+        uploads and create entries in a journal or similar before removing
+        the queue item.""")
+
+    REJECTED = DBItem(4, """
+        Rejected
+
+        An upload which reaches this state has, for some reason or another
+        not passed the requirements (technical or human) for entry into the
+        DistroSeries it was targetting. As for the 'done' state, this state
+        is present to allow logging tools to record the rejection and then
+        clean up any subsequently unnecessary records.""")
+
+
+class SourcePackageFormat(DBEnumeratedType):
+    """Source package format
+
+    There are currently three formats of Debian source packages. The Format
+    field in the .dsc file must specify one of these formats.
+    """
+
+    FORMAT_1_0 = DBItem(0, """
+        1.0
+
+        Specifies either a native (having a single tar.gz) or non-native
+        (having an orig.tar.gz and a diff.gz) package. Supports only gzip
+        compression.
+        """)
+
+    FORMAT_3_0_QUILT = DBItem(1, """
+        3.0 (quilt)
+
+        Specifies a non-native package, with an orig.tar.* and a debian.tar.*.
+        Supports gzip and bzip2 compression.
+        """)
+
+    FORMAT_3_0_NATIVE = DBItem(2, """
+        3.0 (native)
+
+        Specifies a native package, with a single tar.*. Supports gzip and
+        bzip2 compression.
+        """)
+
+
+

=== modified file 'lib/lp/soyuz/interfaces/archive.py'
--- lib/lp/soyuz/interfaces/archive.py	2010-08-20 20:31:18 +0000
+++ lib/lp/soyuz/interfaces/archive.py	2010-08-25 10:56:48 +0000
@@ -13,8 +13,6 @@
     'ArchiveDependencyError',
     'ArchiveDisabled',
     'ArchiveNotPrivate',
-    'ArchivePurpose',
-    'ArchiveStatus',
     'CannotCopy',
     'CannotSwitchPrivacy',
     'ComponentNotFound',
@@ -48,7 +46,6 @@
 
 from lazr.enum import (
     DBEnumeratedType,
-    DBItem,
     )
 from lazr.restful.declarations import (
     call_with,
@@ -96,6 +93,7 @@
     PublicPersonChoice,
     StrippedTextLine,
     )
+from lp.soyuz.enums import ArchivePurpose
 from lp.soyuz.interfaces.buildrecords import IHasBuildRecords
 from lp.soyuz.interfaces.processor import IProcessorFamily
 
@@ -1629,72 +1627,6 @@
         """
 
 
-class ArchivePurpose(DBEnumeratedType):
-    """The purpose, or type, of an archive.
-
-    A distribution can be associated with different archives and this
-    schema item enumerates the different archive types and their purpose.
-
-    For example, Partner/ISV software in ubuntu is stored in a separate
-    archive. PPAs are separate archives and contain packages that 'overlay'
-    the ubuntu PRIMARY archive.
-    """
-
-    PRIMARY = DBItem(1, """
-        Primary Archive
-
-        This is the primary Ubuntu archive.
-        """)
-
-    PPA = DBItem(2, """
-        PPA Archive
-
-        This is a Personal Package Archive.
-        """)
-
-    PARTNER = DBItem(4, """
-        Partner Archive
-
-        This is the archive for partner packages.
-        """)
-
-    COPY = DBItem(6, """
-        Generalized copy archive
-
-        This kind of archive will be used for rebuilds, snapshots etc.
-        """)
-
-    DEBUG = DBItem(7, """
-        Debug Archive
-
-        This kind of archive will be user for publishing package with
-        debug-symbols.
-        """)
-
-
-class ArchiveStatus(DBEnumeratedType):
-    """The status of an archive, e.g. active, disabled. """
-
-    ACTIVE = DBItem(0, """
-        Active
-
-        This archive accepts uploads, copying and publishes packages.
-        """)
-
-    DELETING = DBItem(1, """
-        Deleting
-
-        This archive is in the process of being deleted.  This is a user-
-        requested and short-lived status.
-        """)
-
-    DELETED = DBItem(2, """
-        Deleted
-
-        This archive has been deleted and removed from disk.
-        """)
-
-
 default_name_by_purpose = {
     ArchivePurpose.PRIMARY: 'primary',
     ArchivePurpose.PPA: 'ppa',

=== modified file 'lib/lp/soyuz/interfaces/archivejob.py'
--- lib/lp/soyuz/interfaces/archivejob.py	2010-08-20 20:31:18 +0000
+++ lib/lp/soyuz/interfaces/archivejob.py	2010-08-25 10:56:48 +0000
@@ -1,7 +1,6 @@
-from lazr.enum import (
-    DBEnumeratedType,
-    DBItem,
-    )
+# Copyright 2010 Canonical Ltd.  This software is licensed under the
+# GNU Affero General Public License version 3 (see the file LICENSE).
+
 from zope.interface import (
     Attribute,
     Interface,
@@ -20,17 +19,6 @@
 from lp.soyuz.interfaces.archive import IArchive
 
 
-class ArchiveJobType(DBEnumeratedType):
-    """Values that IArchiveJob.job_type can take."""
-
-    COPY_ARCHIVE = DBItem(0, """
-        Create a copy archive.
-
-        This job creates a copy archive from the current state of
-        the archive.
-        """)
-
-
 class IArchiveJob(Interface):
     """A Job related to an Archive."""
 

=== modified file 'lib/lp/soyuz/interfaces/archivepermission.py'
--- lib/lp/soyuz/interfaces/archivepermission.py	2010-08-20 20:31:18 +0000
+++ lib/lp/soyuz/interfaces/archivepermission.py	2010-08-25 10:56:48 +0000
@@ -8,17 +8,12 @@
 __metaclass__ = type
 
 __all__ = [
-    'ArchivePermissionType',
     'IArchivePermission',
     'IArchivePermissionSet',
     'IArchiveUploader',
     'IArchiveQueueAdmin',
     ]
 
-from lazr.enum import (
-    DBEnumeratedType,
-    DBItem,
-    )
 from lazr.restful.declarations import (
     export_as_webservice_entry,
     exported,
@@ -38,32 +33,12 @@
 from canonical.launchpad import _
 from lp.registry.interfaces.sourcepackagename import ISourcePackageName
 from lp.services.fields import PublicPersonChoice
+from lp.soyuz.enums import ArchivePermissionType
 from lp.soyuz.interfaces.archive import IArchive
 from lp.soyuz.interfaces.component import IComponent
 from lp.soyuz.interfaces.packageset import IPackageset
 
 
-class ArchivePermissionType(DBEnumeratedType):
-    """Archive Permission Type.
-
-    The permission being granted, such as upload rights, or queue
-    manipulation rights.
-    """
-
-    UPLOAD = DBItem(1, """
-        Archive Upload Rights
-
-        This permission allows a user to upload.
-        """)
-
-    QUEUE_ADMIN = DBItem(2, """
-        Queue Administration Rights
-
-        This permission allows a user to administer the distroseries
-        upload queue.
-        """)
-
-
 class IArchivePermission(Interface):
     """The interface for `ArchivePermission`."""
     export_as_webservice_entry()

=== modified file 'lib/lp/soyuz/interfaces/archivesubscriber.py'
--- lib/lp/soyuz/interfaces/archivesubscriber.py	2010-08-20 20:31:18 +0000
+++ lib/lp/soyuz/interfaces/archivesubscriber.py	2010-08-25 10:56:48 +0000
@@ -8,17 +8,12 @@
 __metaclass__ = type
 
 __all__ = [
-    'ArchiveSubscriberStatus',
     'ArchiveSubscriptionError',
     'IArchiveSubscriber',
     'IArchiveSubscriberSet',
     'IPersonalArchiveSubscription'
     ]
 
-from lazr.enum import (
-    DBEnumeratedType,
-    DBItem,
-    )
 from lazr.restful.declarations import (
     export_as_webservice_entry,
     exported,
@@ -36,31 +31,10 @@
 from canonical.launchpad import _
 from lp.registry.interfaces.person import IPerson
 from lp.services.fields import PersonChoice
+from lp.soyuz.enums import ArchiveSubscriberStatus
 from lp.soyuz.interfaces.archive import IArchive
 
 
-class ArchiveSubscriberStatus(DBEnumeratedType):
-    """The status of an `ArchiveSubscriber`."""
-
-    CURRENT = DBItem(1, """
-        Active
-
-        The subscription is current.
-        """)
-
-    EXPIRED = DBItem(2, """
-        Expired
-
-        The subscription has expired.
-        """)
-
-    CANCELLED = DBItem(3, """
-        Cancelled
-
-        The subscription was cancelled.
-        """)
-
-
 class ArchiveSubscriptionError(Exception):
     """Raised for various errors when creating and activating subscriptions.
     """

=== modified file 'lib/lp/soyuz/interfaces/binarypackagerelease.py'
--- lib/lp/soyuz/interfaces/binarypackagerelease.py	2010-08-20 20:31:18 +0000
+++ lib/lp/soyuz/interfaces/binarypackagerelease.py	2010-08-25 10:56:48 +0000
@@ -8,17 +8,11 @@
 __metaclass__ = type
 
 __all__ = [
-    'BinaryPackageFileType',
-    'BinaryPackageFormat',
     'IBinaryPackageRelease',
     'IBinaryPackageReleaseDownloadCount',
     'IBinaryPackageReleaseSet',
     ]
 
-from lazr.enum import (
-    DBEnumeratedType,
-    DBItem,
-    )
 from lazr.restful.declarations import (
     export_as_webservice_entry,
     exported,
@@ -146,82 +140,3 @@
         ReferenceChoice(
             title=_('Country'), required=False, readonly=True,
             vocabulary='CountryName', schema=ICountry))
-
-
-class BinaryPackageFileType(DBEnumeratedType):
-    """Binary Package File Type
-
-    Launchpad handles a variety of packaging systems and binary package
-    formats. This schema documents the known binary package file types.
-    """
-
-    DEB = DBItem(1, """
-        DEB Format
-
-        This format is the standard package format used on Ubuntu and other
-        similar operating systems.
-        """)
-
-    RPM = DBItem(2, """
-        RPM Format
-
-        This format is used on mandrake, Red Hat, Suse and other similar
-        distributions.
-        """)
-
-    UDEB = DBItem(3, """
-        UDEB Format
-
-        This format is the standard package format used on Ubuntu and other
-        similar operating systems for the installation system.
-        """)
-
-    DDEB = DBItem(4, """
-        DDEB Format
-
-        This format is the standard package format used on Ubuntu and other
-        similar operating systems for distributing debug symbols.
-        """)
-
-
-class BinaryPackageFormat(DBEnumeratedType):
-    """Binary Package Format
-
-    Launchpad tracks a variety of binary package formats. This schema
-    documents the list of binary package formats that are supported
-    in Launchpad.
-    """
-
-    DEB = DBItem(1, """
-        Ubuntu Package
-
-        This is the binary package format used by Ubuntu and all similar
-        distributions. It includes dependency information to allow the
-        system to ensure it always has all the software installed to make
-        any new package work correctly.  """)
-
-    UDEB = DBItem(2, """
-        Ubuntu Installer Package
-
-        This is the binary package format used by the installer in Ubuntu and
-        similar distributions.  """)
-
-    EBUILD = DBItem(3, """
-        Gentoo Ebuild Package
-
-        This is the Gentoo binary package format. While Gentoo is primarily
-        known for being a build-it-from-source-yourself kind of
-        distribution, it is possible to exchange binary packages between
-        Gentoo systems.  """)
-
-    RPM = DBItem(4, """
-        RPM Package
-
-        This is the format used by Mandrake and other similar distributions.
-        It does not include dependency tracking information.  """)
-
-    DDEB = DBItem(5, """
-        Ubuntu Debug Package
-
-        This is the binary package format used for shipping debug symbols
-        in Ubuntu and similar distributions.""")

=== modified file 'lib/lp/soyuz/interfaces/packagecopyrequest.py'
--- lib/lp/soyuz/interfaces/packagecopyrequest.py	2010-08-20 20:31:18 +0000
+++ lib/lp/soyuz/interfaces/packagecopyrequest.py	2010-08-25 10:56:48 +0000
@@ -8,15 +8,10 @@
 __metaclass__ = type
 
 __all__ = [
-    'PackageCopyStatus',
     'IPackageCopyRequest',
     'IPackageCopyRequestSet',
     ]
 
-from lazr.enum import (
-    DBEnumeratedType,
-    DBItem,
-    )
 from zope.interface import Interface
 from zope.schema import (
     Bool,
@@ -31,55 +26,11 @@
 from lp.registry.interfaces.distroseries import IDistroSeries
 from lp.registry.interfaces.person import IPerson
 from lp.registry.interfaces.pocket import PackagePublishingPocket
+from lp.soyuz.enums import PackageCopyStatus
 from lp.soyuz.interfaces.archive import IArchive
 from lp.soyuz.interfaces.component import IComponent
 
 
-class PackageCopyStatus(DBEnumeratedType):
-    """Package copy status type.
-
-    The status may be one of the following: new, in progress, complete,
-    failed, canceling, cancelled.
-    """
-
-    NEW = DBItem(0, """
-        New
-
-        A new package copy operation was requested.
-        """)
-
-    INPROGRESS = DBItem(1, """
-        In progress
-
-        The package copy operation is in progress.
-        """)
-
-    COMPLETE = DBItem(2, """
-        Complete
-
-        The package copy operation has completed successfully.
-        """)
-
-    FAILED = DBItem(3, """
-        Failed
-
-        The package copy operation has failed.
-        """)
-
-    CANCELING = DBItem(4, """
-        Canceling
-
-        The package copy operation was cancelled by the user and the
-        cancellation is in progress.
-        """)
-
-    CANCELLED = DBItem(5, """
-        Cancelled
-
-        The package copy operation was cancelled by the user.
-        """)
-
-
 class IPackageCopyRequest(Interface):
     """A Build interface"""
 

=== modified file 'lib/lp/soyuz/interfaces/packagediff.py'
--- lib/lp/soyuz/interfaces/packagediff.py	2010-08-20 20:31:18 +0000
+++ lib/lp/soyuz/interfaces/packagediff.py	2010-08-25 10:56:48 +0000
@@ -11,13 +11,8 @@
     'IPackageDiff',
     'IPackageDiffSet',
     'PackageDiffAlreadyRequested',
-    'PackageDiffStatus',
     ]
 
-from lazr.enum import (
-    DBEnumeratedType,
-    DBItem,
-    )
 from zope.interface import (
     Attribute,
     Interface,
@@ -31,34 +26,13 @@
 from canonical.launchpad import _
 from canonical.launchpad.interfaces.librarian import ILibraryFileAlias
 
+from lp.soyuz.enums import PackageDiffStatus
+
 
 class PackageDiffAlreadyRequested(Exception):
     """Raised on attempts to request an already recorded diff request. """
 
 
-class PackageDiffStatus(DBEnumeratedType):
-    """The status of a PackageDiff request."""
-
-
-    PENDING = DBItem(0, """
-        Pending
-
-        This diff request is pending processing.
-        """)
-
-    COMPLETED = DBItem(1, """
-        Completed
-
-        This diff request was successfully completed.
-        """)
-
-    FAILED = DBItem(2, """
-        Failed
-
-        This diff request has failed.
-        """)
-
-
 class IPackageDiff(Interface):
     """Package diff request and storage.
 

=== modified file 'lib/lp/soyuz/interfaces/publishing.py'
--- lib/lp/soyuz/interfaces/publishing.py	2010-08-20 20:31:18 +0000
+++ lib/lp/soyuz/interfaces/publishing.py	2010-08-25 10:56:48 +0000
@@ -21,18 +21,12 @@
     'ISourcePackagePublishingHistoryPublic',
     'MissingSymlinkInPool',
     'NotInPool',
-    'PackagePublishingPriority',
-    'PackagePublishingStatus',
     'PoolFileOverwriteError',
     'active_publishing_status',
     'inactive_publishing_status',
     'name_priority_map',
     ]
 
-from lazr.enum import (
-    DBEnumeratedType,
-    DBItem,
-    )
 from lazr.restful.declarations import (
     call_with,
     export_as_webservice_entry,
@@ -61,6 +55,10 @@
 from lp.registry.interfaces.distroseries import IDistroSeries
 from lp.registry.interfaces.person import IPerson
 from lp.registry.interfaces.pocket import PackagePublishingPocket
+from lp.soyuz.enums import (
+    PackagePublishingPriority,
+    PackagePublishingStatus,
+    )
 from lp.soyuz.interfaces.binarypackagerelease import (
     IBinaryPackageReleaseDownloadCount,
     )
@@ -93,108 +91,6 @@
     continues.
     """
 
-class PackagePublishingStatus(DBEnumeratedType):
-    """Package Publishing Status
-
-     A package has various levels of being published within a DistroSeries.
-     This is important because of how new source uploads dominate binary
-     uploads bit-by-bit. Packages (source or binary) enter the publishing
-     tables as 'Pending', progress through to 'Published' eventually become
-     'Superseded' and then become 'PendingRemoval'. Once removed from the
-     DistroSeries the publishing record is also removed.
-     """
-
-    PENDING = DBItem(1, """
-        Pending
-
-        This [source] package has been accepted into the DistroSeries and
-        is now pending the addition of the files to the published disk area.
-        In due course, this source package will be published.
-        """)
-
-    PUBLISHED = DBItem(2, """
-        Published
-
-        This package is currently published as part of the archive for that
-        distroseries. In general there will only ever be one version of any
-        source/binary package published at any one time. Once a newer
-        version becomes published the older version is marked as superseded.
-        """)
-
-    SUPERSEDED = DBItem(3, """
-        Superseded
-
-        When a newer version of a [source] package is published the existing
-        one is marked as "superseded".  """)
-
-    DELETED = DBItem(4, """
-        Deleted
-
-        When a publication was "deleted" from the archive by user request.
-        Records in this state contain a reference to the Launchpad user
-        responsible for the deletion and a text comment with the removal
-        reason.
-        """)
-
-    OBSOLETE = DBItem(5, """
-        Obsolete
-
-        When a distroseries becomes obsolete, its published packages
-        are no longer required in the archive.  The publications for
-        those packages are marked as "obsolete" and are subsequently
-        removed during domination and death row processing.
-        """)
-
-
-class PackagePublishingPriority(DBEnumeratedType):
-    """Package Publishing Priority
-
-    Binary packages have a priority which is related to how important
-    it is to have that package installed in a system. Common priorities
-    range from required to optional and various others are available.
-    """
-
-    REQUIRED = DBItem(50, """
-        Required
-
-        This priority indicates that the package is required. This priority
-        is likely to be hard-coded into various package tools. Without all
-        the packages at this priority it may become impossible to use dpkg.
-        """)
-
-    IMPORTANT = DBItem(40, """
-        Important
-
-        If foo is in a package; and "What is going on?! Where on earth is
-        foo?!?!" would be the reaction of an experienced UNIX hacker were
-        the package not installed, then the package is important.
-        """)
-
-    STANDARD = DBItem(30, """
-        Standard
-
-        Packages at this priority are standard ones you can rely on to be in
-        a distribution. They will be installed by default and provide a
-        basic character-interface userland.
-        """)
-
-    OPTIONAL = DBItem(20, """
-        Optional
-
-        This is the software you might reasonably want to install if you did
-        not know what it was or what your requiredments were. Systems such
-        as X or TeX will live here.
-        """)
-
-    EXTRA = DBItem(10, """
-        Extra
-
-        This contains all the packages which conflict with those at the
-        other priority levels; or packages which are only useful to people
-        who have very specialised needs.
-        """)
-
-
 name_priority_map = {
     'required': PackagePublishingPriority.REQUIRED,
     'important': PackagePublishingPriority.IMPORTANT,

=== modified file 'lib/lp/soyuz/interfaces/queue.py'
--- lib/lp/soyuz/interfaces/queue.py	2010-08-20 20:31:18 +0000
+++ lib/lp/soyuz/interfaces/queue.py	2010-08-25 10:56:48 +0000
@@ -16,8 +16,6 @@
     'IPackageUploadCustom',
     'IPackageUploadSet',
     'NonBuildableSourceUploadError',
-    'PackageUploadStatus',
-    'PackageUploadCustomFormat',
     'QueueBuildAcceptError',
     'QueueInconsistentStateError',
     'QueueSourceAcceptError',
@@ -26,8 +24,8 @@
 
 from lazr.enum import (
     DBEnumeratedType,
-    DBItem,
     )
+
 from lazr.restful.declarations import (
     export_as_webservice_entry,
     exported,
@@ -47,6 +45,8 @@
 
 from canonical.launchpad import _
 
+from lp.soyuz.enums import PackageUploadStatus
+
 
 class QueueStateWriteProtectedError(Exception):
     """This exception prevent directly set operation in queue state.
@@ -96,61 +96,6 @@
     """
 
 
-class PackageUploadStatus(DBEnumeratedType):
-    """Distro Release Queue Status
-
-    An upload has various stages it must pass through before becoming part
-    of a DistroSeries. These are managed via the Upload table
-    and related tables and eventually (assuming a successful upload into the
-    DistroSeries) the effects are published via the PackagePublishing and
-    SourcePackagePublishing tables.
-    """
-
-    NEW = DBItem(0, """
-        New
-
-        This upload is either a brand-new source package or contains a
-        binary package with brand new debs or similar. The package must sit
-        here until someone with the right role in the DistroSeries checks
-        and either accepts or rejects the upload. If the upload is accepted
-        then entries will be made in the overrides tables and further
-        uploads will bypass this state. """)
-
-    UNAPPROVED = DBItem(1, """
-        Unapproved
-
-        If a DistroSeries is frozen or locked out of ordinary updates then
-        this state is used to mean that while the package is correct from a
-        technical point of view; it has yet to be approved for inclusion in
-        this DistroSeries. One use of this state may be for security
-        releases where you want the security team of a DistroSeries to
-        approve uploads.""")
-
-    ACCEPTED = DBItem(2, """
-        Accepted
-
-        An upload in this state has passed all the checks required of it and
-        is ready to have its publishing records created.""")
-
-    DONE = DBItem(3, """
-        Done
-
-        An upload in this state has had its publishing records created if it
-        needs them and is fully processed into the DistroSeries. This state
-        exists so that a logging and/or auditing tool can pick up accepted
-        uploads and create entries in a journal or similar before removing
-        the queue item.""")
-
-    REJECTED = DBItem(4, """
-        Rejected
-
-        An upload which reaches this state has, for some reason or another
-        not passed the requirements (technical or human) for entry into the
-        DistroSeries it was targetting. As for the 'done' state, this state
-        is present to allow logging tools to record the rejection and then
-        clean up any subsequently unnecessary records.""")
-
-
 class IPackageUpload(Interface):
     """A Queue item for the archive uploader."""
 
@@ -721,55 +666,3 @@
 
         Use 'exact_match' argument for precise results.
         """
-
-# If you change this (add items, change the meaning, whatever) search for
-# the token ##CUSTOMFORMAT## e.g. database/queue.py or nascentupload.py and
-# update the stuff marked with it.
-class PackageUploadCustomFormat(DBEnumeratedType):
-    """Custom formats valid for the upload queue
-
-    An upload has various files potentially associated with it, from source
-    package releases, through binary builds, to specialist upload forms such
-    as a debian-installer tarball or a set of translations.
-    """
-
-    DEBIAN_INSTALLER = DBItem(0, """
-        raw-installer
-
-        A raw-installer file is a tarball. This is processed as a version
-        of the debian-installer to be unpacked into the archive root.
-        """)
-
-    ROSETTA_TRANSLATIONS = DBItem(1, """
-        raw-translations
-
-        A raw-translations file is a tarball. This is passed to the rosetta
-        import queue to be incorporated into that package's translations.
-        """)
-
-    DIST_UPGRADER = DBItem(2, """
-        raw-dist-upgrader
-
-        A raw-dist-upgrader file is a tarball. It is simply published into
-        the archive.
-        """)
-
-    DDTP_TARBALL = DBItem(3, """
-        raw-ddtp-tarball
-
-        A raw-ddtp-tarball contains all the translated package description
-        indexes for a component.
-        """)
-
-    STATIC_TRANSLATIONS = DBItem(4, """
-        raw-translations-static
-
-        A tarball containing raw (Gnome) help file translations.
-        """)
-
-    META_DATA = DBItem(5, """
-        meta-data
-
-        A file containing meta-data about the package, mainly for use in
-        the Software Center.
-        """)

=== modified file 'lib/lp/soyuz/interfaces/sourcepackageformat.py'
--- lib/lp/soyuz/interfaces/sourcepackageformat.py	2010-08-20 20:31:18 +0000
+++ lib/lp/soyuz/interfaces/sourcepackageformat.py	2010-08-25 10:56:48 +0000
@@ -6,51 +6,16 @@
 __metaclass__ = type
 
 __all__ = [
-    'SourcePackageFormat',
     'ISourcePackageFormatSelection',
     'ISourcePackageFormatSelectionSet',
     ]
 
-from lazr.enum import (
-    DBEnumeratedType,
-    DBItem,
-    )
 from zope.interface import (
     Attribute,
     Interface,
     )
 
 
-class SourcePackageFormat(DBEnumeratedType):
-    """Source package format
-
-    There are currently three formats of Debian source packages. The Format
-    field in the .dsc file must specify one of these formats.
-    """
-
-    FORMAT_1_0 = DBItem(0, """
-        1.0
-
-        Specifies either a native (having a single tar.gz) or non-native
-        (having an orig.tar.gz and a diff.gz) package. Supports only gzip
-        compression.
-        """)
-
-    FORMAT_3_0_QUILT = DBItem(1, """
-        3.0 (quilt)
-
-        Specifies a non-native package, with an orig.tar.* and a debian.tar.*.
-        Supports gzip and bzip2 compression.
-        """)
-
-    FORMAT_3_0_NATIVE = DBItem(2, """
-        3.0 (native)
-
-        Specifies a native package, with a single tar.*. Supports gzip and
-        bzip2 compression.
-        """)
-
-
 class ISourcePackageFormatSelection(Interface):
     """A source package format allowed within a DistroSeries."""
 

=== modified file 'lib/lp/soyuz/model/archive.py'
--- lib/lp/soyuz/model/archive.py	2010-08-20 20:31:18 +0000
+++ lib/lp/soyuz/model/archive.py	2010-08-25 10:56:48 +0000
@@ -91,13 +91,19 @@
 from lp.services.job.interfaces.job import JobStatus
 from lp.soyuz.adapters.archivedependencies import expand_dependencies
 from lp.soyuz.adapters.packagelocation import PackageLocation
+from lp.soyuz.enums import (
+    ArchivePermissionType,
+    ArchivePurpose,
+    ArchiveStatus,
+    ArchiveSubscriberStatus,
+    PackagePublishingStatus,
+    PackageUploadStatus,
+    )
 from lp.soyuz.interfaces.archive import (
     AlreadySubscribed,
     ArchiveDependencyError,
     ArchiveDisabled,
     ArchiveNotPrivate,
-    ArchivePurpose,
-    ArchiveStatus,
     CannotCopy,
     CannotRestrictArchitectures,
     CannotSwitchPrivacy,
@@ -124,11 +130,9 @@
 from lp.soyuz.interfaces.archivearch import IArchiveArchSet
 from lp.soyuz.interfaces.archiveauthtoken import IArchiveAuthTokenSet
 from lp.soyuz.interfaces.archivepermission import (
-    ArchivePermissionType,
     IArchivePermissionSet,
     )
 from lp.soyuz.interfaces.archivesubscriber import (
-    ArchiveSubscriberStatus,
     ArchiveSubscriptionError,
     IArchiveSubscriberSet,
     )
@@ -146,9 +150,7 @@
 from lp.soyuz.interfaces.publishing import (
     active_publishing_status,
     IPublishingSet,
-    PackagePublishingStatus,
     )
-from lp.soyuz.interfaces.queue import PackageUploadStatus
 from lp.soyuz.model.archiveauthtoken import ArchiveAuthToken
 from lp.soyuz.model.archivedependency import ArchiveDependency
 from lp.soyuz.model.archivesubscriber import ArchiveSubscriber

=== modified file 'lib/lp/soyuz/model/archivejob.py'
--- lib/lp/soyuz/model/archivejob.py	2010-08-20 20:31:18 +0000
+++ lib/lp/soyuz/model/archivejob.py	2010-08-25 10:56:48 +0000
@@ -1,3 +1,5 @@
+# Copyright 2010 Canonical Ltd.  This software is licensed under the
+# GNU Affero General Public License version 3 (see the file LICENSE).
 
 __metaclass__ = object
 
@@ -26,8 +28,8 @@
     )
 from lp.services.job.model.job import Job
 from lp.services.job.runner import BaseRunnableJob
+from lp.soyuz.enums import ArchiveJobType
 from lp.soyuz.interfaces.archivejob import (
-    ArchiveJobType,
     IArchiveJob,
     IArchiveJobSource,
     )

=== modified file 'lib/lp/soyuz/model/archivepermission.py'
--- lib/lp/soyuz/model/archivepermission.py	2010-08-20 20:31:18 +0000
+++ lib/lp/soyuz/model/archivepermission.py	2010-08-25 10:56:48 +0000
@@ -55,8 +55,8 @@
     ComponentNotFound,
     IArchive,
     )
+from lp.soyuz.enums import ArchivePermissionType
 from lp.soyuz.interfaces.archivepermission import (
-    ArchivePermissionType,
     IArchivePermission,
     IArchivePermissionSet,
     IArchiveQueueAdmin,

=== modified file 'lib/lp/soyuz/model/archivesubscriber.py'
--- lib/lp/soyuz/model/archivesubscriber.py	2010-08-20 20:31:18 +0000
+++ lib/lp/soyuz/model/archivesubscriber.py	2010-08-25 10:56:48 +0000
@@ -34,9 +34,9 @@
 from lp.registry.model.teammembership import TeamParticipation
 from lp.soyuz.interfaces.archiveauthtoken import IArchiveAuthTokenSet
 from lp.soyuz.interfaces.archivesubscriber import (
-    ArchiveSubscriberStatus,
     IArchiveSubscriber,
     )
+from lp.soyuz.enums import ArchiveSubscriberStatus
 from lp.soyuz.model.archiveauthtoken import ArchiveAuthToken
 
 

=== modified file 'lib/lp/soyuz/model/binarypackagebuild.py'
--- lib/lp/soyuz/model/binarypackagebuild.py	2010-08-24 09:51:26 +0000
+++ lib/lp/soyuz/model/binarypackagebuild.py	2010-08-25 10:56:48 +0000
@@ -80,7 +80,7 @@
     PackageBuildDerived,
     )
 from lp.services.job.model.job import Job
-from lp.soyuz.interfaces.archive import ArchivePurpose
+from lp.soyuz.enums import ArchivePurpose
 from lp.soyuz.interfaces.binarypackagebuild import (
     BuildSetStatus,
     CannotBeRescored,

=== modified file 'lib/lp/soyuz/model/binarypackagebuildbehavior.py'
--- lib/lp/soyuz/model/binarypackagebuildbehavior.py	2010-08-20 20:31:18 +0000
+++ lib/lp/soyuz/model/binarypackagebuildbehavior.py	2010-08-25 10:56:48 +0000
@@ -24,7 +24,7 @@
     get_primary_current_component,
     get_sources_list_for_building,
     )
-from lp.soyuz.interfaces.archive import ArchivePurpose
+from lp.soyuz.enums import ArchivePurpose
 
 
 class BinaryPackageBuildBehavior(BuildFarmJobBehaviorBase):

=== modified file 'lib/lp/soyuz/model/binarypackagename.py'
--- lib/lp/soyuz/model/binarypackagename.py	2010-08-20 20:31:18 +0000
+++ lib/lp/soyuz/model/binarypackagename.py	2010-08-25 10:56:48 +0000
@@ -35,7 +35,7 @@
     IBinaryPackageName,
     IBinaryPackageNameSet,
     )
-from lp.soyuz.interfaces.publishing import PackagePublishingStatus
+from lp.soyuz.enums import PackagePublishingStatus
 from lp.soyuz.model.binarypackagerelease import BinaryPackageRelease
 
 

=== modified file 'lib/lp/soyuz/model/binarypackagerelease.py'
--- lib/lp/soyuz/model/binarypackagerelease.py	2010-08-20 20:31:18 +0000
+++ lib/lp/soyuz/model/binarypackagerelease.py	2010-08-25 10:56:48 +0000
@@ -35,17 +35,17 @@
     SQLBase,
     sqlvalues,
     )
-from lp.soyuz.interfaces.binarypackagerelease import (
+from lp.soyuz.enums import (
     BinaryPackageFileType,
     BinaryPackageFormat,
+    PackagePublishingPriority,
+    PackagePublishingStatus,
+    )
+from lp.soyuz.interfaces.binarypackagerelease import (
     IBinaryPackageRelease,
     IBinaryPackageReleaseDownloadCount,
     IBinaryPackageReleaseSet,
     )
-from lp.soyuz.interfaces.publishing import (
-    PackagePublishingPriority,
-    PackagePublishingStatus,
-    )
 from lp.soyuz.model.files import BinaryPackageFile
 
 

=== modified file 'lib/lp/soyuz/model/buildpackagejob.py'
--- lib/lp/soyuz/model/buildpackagejob.py	2010-08-20 20:31:18 +0000
+++ lib/lp/soyuz/model/buildpackagejob.py	2010-08-25 10:56:48 +0000
@@ -23,10 +23,12 @@
 from lp.buildmaster.model.buildfarmjob import BuildFarmJobOldDerived
 from lp.registry.interfaces.pocket import PackagePublishingPocket
 from lp.registry.interfaces.sourcepackage import SourcePackageUrgency
-from lp.soyuz.interfaces.archive import ArchivePurpose
+from lp.soyuz.enums import (
+    ArchivePurpose,
+    PackagePublishingStatus,
+    )
 from lp.soyuz.interfaces.binarypackagebuild import IBinaryPackageBuildSet
 from lp.soyuz.interfaces.buildpackagejob import IBuildPackageJob
-from lp.soyuz.interfaces.publishing import PackagePublishingStatus
 from lp.soyuz.model.buildfarmbuildjob import BuildFarmBuildJob
 
 
@@ -105,7 +107,7 @@
         # otherwise.
         if self.build.source_package_release.section.name == 'translations':
             pass
-        elif self.build.archive.purpose == ArchivePurpose.COPY:
+        elif self.build.archive.is_copy:
             score = rebuild_archive_score
         else:
             # Calculates the urgency-related part of the score.

=== modified file 'lib/lp/soyuz/model/copyarchivejob.py'
--- lib/lp/soyuz/model/copyarchivejob.py	2010-08-20 20:31:18 +0000
+++ lib/lp/soyuz/model/copyarchivejob.py	2010-08-25 10:56:48 +0000
@@ -1,3 +1,5 @@
+# Copyright 2010 Canonical Ltd.  This software is licensed under the
+# GNU Affero General Public License version 3 (see the file LICENSE).
 
 __metaclass__ = object
 
@@ -17,8 +19,8 @@
 from lp.services.job.model.job import Job
 from lp.soyuz.adapters.packagelocation import PackageLocation
 from lp.soyuz.interfaces.archive import IArchiveSet
+from lp.soyuz.enums import ArchiveJobType
 from lp.soyuz.interfaces.archivejob import (
-    ArchiveJobType,
     ICopyArchiveJob,
     ICopyArchiveJobSource,
     )

=== modified file 'lib/lp/soyuz/model/distroarchseries.py'
--- lib/lp/soyuz/model/distroarchseries.py	2010-08-20 20:31:18 +0000
+++ lib/lp/soyuz/model/distroarchseries.py	2010-08-25 10:56:48 +0000
@@ -44,6 +44,7 @@
     )
 from lp.registry.interfaces.person import validate_public_person
 from lp.registry.interfaces.pocket import PackagePublishingPocket
+from lp.soyuz.enums import PackagePublishingStatus
 from lp.soyuz.interfaces.binarypackagebuild import IBinaryPackageBuildSet
 from lp.soyuz.interfaces.binarypackagename import IBinaryPackageName
 from lp.soyuz.interfaces.binarypackagerelease import IBinaryPackageReleaseSet
@@ -55,7 +56,6 @@
     )
 from lp.soyuz.interfaces.publishing import (
     ICanPublishPackages,
-    PackagePublishingStatus,
     )
 from lp.soyuz.model.binarypackagename import BinaryPackageName
 from lp.soyuz.model.binarypackagerelease import BinaryPackageRelease

=== modified file 'lib/lp/soyuz/model/distroarchseriesbinarypackage.py'
--- lib/lp/soyuz/model/distroarchseriesbinarypackage.py	2010-08-20 20:31:18 +0000
+++ lib/lp/soyuz/model/distroarchseriesbinarypackage.py	2010-08-25 10:56:48 +0000
@@ -24,7 +24,7 @@
 from lp.soyuz.interfaces.distroarchseriesbinarypackage import (
     IDistroArchSeriesBinaryPackage,
     )
-from lp.soyuz.interfaces.publishing import PackagePublishingStatus
+from lp.soyuz.enums import PackagePublishingStatus
 from lp.soyuz.model.binarypackagerelease import BinaryPackageRelease
 from lp.soyuz.model.distroarchseriesbinarypackagerelease import (
     DistroArchSeriesBinaryPackageRelease,

=== modified file 'lib/lp/soyuz/model/distroarchseriesbinarypackagerelease.py'
--- lib/lp/soyuz/model/distroarchseriesbinarypackagerelease.py	2010-08-20 20:31:18 +0000
+++ lib/lp/soyuz/model/distroarchseriesbinarypackagerelease.py	2010-08-25 10:56:48 +0000
@@ -18,7 +18,7 @@
 from lp.soyuz.interfaces.distroarchseriesbinarypackagerelease import (
     IDistroArchSeriesBinaryPackageRelease,
     )
-from lp.soyuz.interfaces.publishing import PackagePublishingStatus
+from lp.soyuz.enums import PackagePublishingStatus
 from lp.soyuz.model.distributionsourcepackagerelease import (
     DistributionSourcePackageRelease,
     )

=== modified file 'lib/lp/soyuz/model/distroseriessourcepackagerelease.py'
--- lib/lp/soyuz/model/distroseriessourcepackagerelease.py	2010-08-20 20:31:18 +0000
+++ lib/lp/soyuz/model/distroseriessourcepackagerelease.py	2010-08-25 10:56:48 +0000
@@ -20,7 +20,7 @@
 from lp.soyuz.interfaces.distroseriessourcepackagerelease import (
     IDistroSeriesSourcePackageRelease,
     )
-from lp.soyuz.interfaces.publishing import PackagePublishingStatus
+from lp.soyuz.enums import PackagePublishingStatus
 from lp.soyuz.interfaces.sourcepackagerelease import ISourcePackageRelease
 from lp.soyuz.model.binarypackagerelease import BinaryPackageRelease
 from lp.soyuz.model.publishing import SourcePackagePublishingHistory

=== modified file 'lib/lp/soyuz/model/files.py'
--- lib/lp/soyuz/model/files.py	2010-08-20 20:31:18 +0000
+++ lib/lp/soyuz/model/files.py	2010-08-25 10:56:48 +0000
@@ -20,7 +20,7 @@
     sqlvalues,
     )
 from lp.registry.interfaces.sourcepackage import SourcePackageFileType
-from lp.soyuz.interfaces.binarypackagerelease import BinaryPackageFileType
+from lp.soyuz.enums import BinaryPackageFileType
 from lp.soyuz.interfaces.files import (
     IBinaryPackageFile,
     IBinaryPackageFileSet,

=== modified file 'lib/lp/soyuz/model/packagecloner.py'
--- lib/lp/soyuz/model/packagecloner.py	2010-08-20 20:31:18 +0000
+++ lib/lp/soyuz/model/packagecloner.py	2010-08-25 10:56:48 +0000
@@ -26,9 +26,9 @@
     IStoreSelector,
     MAIN_STORE,
     )
+from lp.soyuz.enums import PackagePublishingStatus
 from lp.soyuz.interfaces.archivearch import IArchiveArchSet
 from lp.soyuz.interfaces.packagecloner import IPackageCloner
-from lp.soyuz.interfaces.publishing import PackagePublishingStatus
 
 
 def clone_packages(origin, destination, distroarchseries_list=None):

=== modified file 'lib/lp/soyuz/model/packagecopyrequest.py'
--- lib/lp/soyuz/model/packagecopyrequest.py	2010-08-20 20:31:18 +0000
+++ lib/lp/soyuz/model/packagecopyrequest.py	2010-08-25 10:56:48 +0000
@@ -26,10 +26,10 @@
     )
 from lp.registry.interfaces.person import validate_public_person
 from lp.registry.interfaces.pocket import PackagePublishingPocket
+from lp.soyuz.enums import PackageCopyStatus
 from lp.soyuz.interfaces.packagecopyrequest import (
     IPackageCopyRequest,
     IPackageCopyRequestSet,
-    PackageCopyStatus,
     )
 
 

=== modified file 'lib/lp/soyuz/model/packagediff.py'
--- lib/lp/soyuz/model/packagediff.py	2010-08-20 20:31:18 +0000
+++ lib/lp/soyuz/model/packagediff.py	2010-08-25 10:56:48 +0000
@@ -36,10 +36,10 @@
     MAIN_STORE,
     )
 from canonical.librarian.utils import copy_and_close
+from lp.soyuz.enums import PackageDiffStatus
 from lp.soyuz.interfaces.packagediff import (
     IPackageDiff,
     IPackageDiffSet,
-    PackageDiffStatus,
     )
 
 

=== modified file 'lib/lp/soyuz/model/publishing.py'
--- lib/lp/soyuz/model/publishing.py	2010-08-20 20:31:18 +0000
+++ lib/lp/soyuz/model/publishing.py	2010-08-25 10:56:48 +0000
@@ -69,13 +69,16 @@
 from lp.registry.interfaces.person import validate_public_person
 from lp.registry.interfaces.pocket import PackagePublishingPocket
 from lp.services.worlddata.model.country import Country
-from lp.soyuz.interfaces.archive import ArchivePurpose
-from lp.soyuz.interfaces.archivearch import IArchiveArchSet
+from lp.soyuz.enums import (
+    BinaryPackageFormat,
+    PackagePublishingPriority,
+    PackagePublishingStatus,
+    PackageUploadStatus,
+    )
 from lp.soyuz.interfaces.binarypackagebuild import (
     BuildSetStatus,
     IBinaryPackageBuildSet,
     )
-from lp.soyuz.interfaces.binarypackagerelease import BinaryPackageFormat
 from lp.soyuz.interfaces.component import IComponentSet
 from lp.soyuz.interfaces.publishing import (
     active_publishing_status,
@@ -84,11 +87,8 @@
     IPublishingSet,
     ISourcePackageFilePublishing,
     ISourcePackagePublishingHistory,
-    PackagePublishingPriority,
-    PackagePublishingStatus,
     PoolFileOverwriteError,
     )
-from lp.soyuz.interfaces.queue import PackageUploadStatus
 from lp.soyuz.model.binarypackagename import BinaryPackageName
 from lp.soyuz.model.binarypackagerelease import (
     BinaryPackageRelease,
@@ -557,7 +557,7 @@
     def createMissingBuilds(self, architectures_available=None,
                             pas_verify=None, logger=None):
         """See `ISourcePackagePublishingHistory`."""
-        if self.archive.purpose == ArchivePurpose.PPA:
+        if self.archive.is_ppa:
             pas_verify = None
 
         if architectures_available is None:
@@ -1718,7 +1718,7 @@
         augmented_summary = summary
         if (source_publication.status in active_publishing_status and
                 summary['status'] == BuildSetStatus.FULLYBUILT and
-                source_publication.archive.purpose != ArchivePurpose.COPY):
+                not source_publication.archive.is_copy):
 
             unpublished_builds = list(
                 source_publication.getUnpublishedBuilds())

=== modified file 'lib/lp/soyuz/model/queue.py'
--- lib/lp/soyuz/model/queue.py	2010-08-20 20:31:18 +0000
+++ lib/lp/soyuz/model/queue.py	2010-08-25 10:56:48 +0000
@@ -72,8 +72,12 @@
     PackagePublishingPocket,
     pocketsuffix,
     )
+from lp.soyuz.enums import (
+    BinaryPackageFormat,
+    PackageUploadCustomFormat,
+    PackageUploadStatus,
+    )
 from lp.soyuz.interfaces.archive import MAIN_ARCHIVE_PURPOSES
-from lp.soyuz.interfaces.binarypackagerelease import BinaryPackageFormat
 from lp.soyuz.interfaces.publishing import (
     IPublishingSet,
     ISourcePackagePublishingHistory,
@@ -86,8 +90,6 @@
     IPackageUploadSet,
     IPackageUploadSource,
     NonBuildableSourceUploadError,
-    PackageUploadCustomFormat,
-    PackageUploadStatus,
     QueueBuildAcceptError,
     QueueInconsistentStateError,
     QueueSourceAcceptError,

=== modified file 'lib/lp/soyuz/model/sourcepackageformat.py'
--- lib/lp/soyuz/model/sourcepackageformat.py	2010-08-20 20:31:18 +0000
+++ lib/lp/soyuz/model/sourcepackageformat.py	2010-08-25 10:56:48 +0000
@@ -23,10 +23,10 @@
     MAIN_STORE,
     MASTER_FLAVOR,
     )
+from lp.soyuz.enums import SourcePackageFormat
 from lp.soyuz.interfaces.sourcepackageformat import (
     ISourcePackageFormatSelection,
     ISourcePackageFormatSelectionSet,
-    SourcePackageFormat,
     )
 
 

=== modified file 'lib/lp/soyuz/model/sourcepackagerelease.py'
--- lib/lp/soyuz/model/sourcepackagerelease.py	2010-08-20 20:31:18 +0000
+++ lib/lp/soyuz/model/sourcepackagerelease.py	2010-08-25 10:56:48 +0000
@@ -59,6 +59,10 @@
     SourcePackageType,
     SourcePackageUrgency,
     )
+from lp.soyuz.enums import (
+    PackageDiffStatus,
+    PackagePublishingStatus,
+    )
 from lp.soyuz.interfaces.archive import (
     IArchiveSet,
     MAIN_ARCHIVE_PURPOSES,
@@ -66,9 +70,7 @@
 from lp.soyuz.interfaces.binarypackagebuild import IBinaryPackageBuildSet
 from lp.soyuz.interfaces.packagediff import (
     PackageDiffAlreadyRequested,
-    PackageDiffStatus,
     )
-from lp.soyuz.interfaces.publishing import PackagePublishingStatus
 from lp.soyuz.interfaces.sourcepackagerelease import ISourcePackageRelease
 from lp.soyuz.model.binarypackagebuild import BinaryPackageBuild
 from lp.soyuz.model.files import SourcePackageReleaseFile

=== modified file 'lib/lp/soyuz/pas.py'
--- lib/lp/soyuz/pas.py	2010-08-20 20:31:18 +0000
+++ lib/lp/soyuz/pas.py	2010-08-25 10:56:48 +0000
@@ -6,8 +6,6 @@
 
 from sqlobject import SQLObjectNotFound
 
-from lp.soyuz.interfaces.archive import ArchivePurpose
-
 
 class BuildDaemonPackagesArchSpecific:
     """Parse and implement "PackagesArchSpecific"."""
@@ -151,7 +149,7 @@
     assert hint_string, 'Missing arch_hint_list'
 
     # Ignore P-a-s for PPA publications.
-    if pubrec.archive.purpose == ArchivePurpose.PPA:
+    if pubrec.archive.is_ppa:
         pas_verify = None
 
     # The 'PPA supported' flag only applies to virtualized archives

=== modified file 'lib/lp/soyuz/scripts/expire_archive_files.py'
--- lib/lp/soyuz/scripts/expire_archive_files.py	2010-08-20 20:31:18 +0000
+++ lib/lp/soyuz/scripts/expire_archive_files.py	2010-08-25 10:56:48 +0000
@@ -14,6 +14,7 @@
     MAIN_STORE,
     )
 from lp.services.scripts.base import LaunchpadCronScript
+from lp.soyuz.enums import ArchivePurpose
 
 # PPAs that we never want to expire.
 BLACKLISTED_PPAS = """
@@ -58,9 +59,6 @@
 
     def determineSourceExpirables(self, num_days):
         """Return expirable libraryfilealias IDs."""
-        # Avoid circular imports.
-        from lp.soyuz.interfaces.archive import ArchivePurpose
-
         stay_of_execution = '%d days' % num_days
         archive_types = (ArchivePurpose.PPA, ArchivePurpose.PARTNER)
 
@@ -113,9 +111,6 @@
 
     def determineBinaryExpirables(self, num_days):
         """Return expirable libraryfilealias IDs."""
-        # Avoid circular imports.
-        from lp.soyuz.interfaces.archive import ArchivePurpose
-
         stay_of_execution = '%d days' % num_days
         archive_types = (ArchivePurpose.PPA, ArchivePurpose.PARTNER)
 

=== modified file 'lib/lp/soyuz/scripts/ftpmaster.py'
--- lib/lp/soyuz/scripts/ftpmaster.py	2010-08-20 20:31:18 +0000
+++ lib/lp/soyuz/scripts/ftpmaster.py	2010-08-25 10:56:48 +0000
@@ -60,7 +60,7 @@
     )
 from lp.soyuz.interfaces.binarypackagename import IBinaryPackageNameSet
 from lp.soyuz.interfaces.binarypackagerelease import IBinaryPackageReleaseSet
-from lp.soyuz.interfaces.publishing import PackagePublishingStatus
+from lp.soyuz.enums import PackagePublishingStatus
 from lp.soyuz.scripts.ftpmasterbase import (
     SoyuzScript,
     SoyuzScriptError,

=== modified file 'lib/lp/soyuz/scripts/ftpmasterbase.py'
--- lib/lp/soyuz/scripts/ftpmasterbase.py	2010-08-20 20:31:18 +0000
+++ lib/lp/soyuz/scripts/ftpmasterbase.py	2010-08-25 10:56:48 +0000
@@ -21,6 +21,7 @@
     LaunchpadScriptFailure,
     )
 from lp.soyuz.adapters.packagelocation import build_package_location
+from lp.soyuz.enums import ArchivePurpose
 from lp.soyuz.interfaces.component import IComponentSet
 
 
@@ -241,9 +242,6 @@
 
     def setupLocation(self):
         """Setup `PackageLocation` for context distribution and suite."""
-        # Avoid circular imports.
-        from lp.soyuz.interfaces.archive import ArchivePurpose
-
         # These can raise PackageLocationError, but we're happy to pass
         # it upwards.
         if getattr(self.options, 'partner_archive', ''):

=== modified file 'lib/lp/soyuz/scripts/gina/handlers.py'
--- lib/lp/soyuz/scripts/gina/handlers.py	2010-08-20 20:31:18 +0000
+++ lib/lp/soyuz/scripts/gina/handlers.py	2010-08-25 10:56:48 +0000
@@ -45,10 +45,12 @@
     )
 from lp.registry.interfaces.sourcepackage import SourcePackageType
 from lp.registry.model.sourcepackagename import SourcePackageName
+from lp.soyuz.enums import (
+    BinaryPackageFormat,
+    PackagePublishingStatus,
+    )
 from lp.soyuz.interfaces.binarypackagebuild import IBinaryPackageBuildSet
 from lp.soyuz.interfaces.binarypackagename import IBinaryPackageNameSet
-from lp.soyuz.interfaces.binarypackagerelease import BinaryPackageFormat
-from lp.soyuz.interfaces.publishing import PackagePublishingStatus
 from lp.soyuz.model.component import Component
 from lp.soyuz.model.files import (
     BinaryPackageFile,

=== modified file 'lib/lp/soyuz/scripts/initialise_distroseries.py'
--- lib/lp/soyuz/scripts/initialise_distroseries.py	2010-08-23 13:41:04 +0000
+++ lib/lp/soyuz/scripts/initialise_distroseries.py	2010-08-25 10:56:48 +0000
@@ -21,12 +21,18 @@
 from lp.buildmaster.interfaces.buildbase import BuildStatus
 from lp.registry.interfaces.pocket import PackagePublishingPocket
 from lp.soyuz.adapters.packagelocation import PackageLocation
+from lp.soyuz.enums import (
+    ArchivePurpose,
+    PackageUploadStatus,
+    )
 from lp.soyuz.interfaces.archive import (
-    ArchivePurpose,
     IArchiveSet,
     )
+<<<<<<< TREE
 from lp.soyuz.interfaces.packageset import IPackagesetSet
 from lp.soyuz.interfaces.queue import PackageUploadStatus
+=======
+>>>>>>> MERGE-SOURCE
 from lp.soyuz.model.packagecloner import clone_packages
 from lp.soyuz.model.packageset import Packageset
 

=== modified file 'lib/lp/soyuz/scripts/packagecopier.py'
--- lib/lp/soyuz/scripts/packagecopier.py	2010-08-20 20:31:18 +0000
+++ lib/lp/soyuz/scripts/packagecopier.py	2010-08-25 10:56:48 +0000
@@ -27,8 +27,8 @@
 from canonical.librarian.utils import copy_and_close
 from lp.buildmaster.interfaces.buildbase import BuildStatus
 from lp.soyuz.adapters.packagelocation import build_package_location
+from lp.soyuz.enums import ArchivePurpose
 from lp.soyuz.interfaces.archive import (
-    ArchivePurpose,
     CannotCopy,
     )
 from lp.soyuz.interfaces.binarypackagebuild import BuildSetStatus
@@ -43,7 +43,7 @@
     IPackageUploadCustom,
     IPackageUploadSet,
     )
-from lp.soyuz.interfaces.sourcepackageformat import SourcePackageFormat
+from lp.soyuz.enums import SourcePackageFormat
 from lp.soyuz.scripts.ftpmasterbase import (
     SoyuzScript,
     SoyuzScriptError,

=== modified file 'lib/lp/soyuz/scripts/populate_archive.py'
--- lib/lp/soyuz/scripts/populate_archive.py	2010-08-20 20:31:18 +0000
+++ lib/lp/soyuz/scripts/populate_archive.py	2010-08-25 10:56:48 +0000
@@ -16,6 +16,7 @@
 from canonical.launchpad.validators.name import valid_name
 from lp.app.errors import NotFoundError
 from lp.soyuz.adapters.packagelocation import build_package_location
+from lp.soyuz.enums import ArchivePurpose
 from lp.soyuz.interfaces.component import IComponentSet
 from lp.soyuz.interfaces.packagecloner import IPackageCloner
 from lp.soyuz.interfaces.processor import IProcessorFamilySet
@@ -86,8 +87,7 @@
         """
         # Avoid circular imports.
         from lp.registry.interfaces.person import IPersonSet
-        from lp.soyuz.interfaces.archive import (
-            ArchivePurpose, IArchiveSet)
+        from lp.soyuz.interfaces.archive import IArchiveSet
         from lp.soyuz.interfaces.archivearch import IArchiveArchSet
         from lp.soyuz.interfaces.packagecopyrequest import (
             IPackageCopyRequestSet)

=== modified file 'lib/lp/soyuz/scripts/ppa_add_missing_builds.py'
--- lib/lp/soyuz/scripts/ppa_add_missing_builds.py	2010-08-02 02:13:52 +0000
+++ lib/lp/soyuz/scripts/ppa_add_missing_builds.py	2010-08-25 10:56:48 +0000
@@ -8,7 +8,7 @@
 
 from lp.app.errors import NotFoundError
 from lp.services.scripts.base import LaunchpadScript
-from lp.soyuz.interfaces.publishing import PackagePublishingStatus
+from lp.soyuz.enums import PackagePublishingStatus
 
 
 class PPAMissingBuilds(LaunchpadScript):

=== modified file 'lib/lp/soyuz/scripts/ppareport.py'
--- lib/lp/soyuz/scripts/ppareport.py	2010-08-20 20:31:18 +0000
+++ lib/lp/soyuz/scripts/ppareport.py	2010-08-25 10:56:48 +0000
@@ -28,6 +28,7 @@
     LaunchpadScript,
     LaunchpadScriptFailure,
     )
+from lp.soyuz.enums import ArchivePurpose
 
 
 class PPAReportScript(LaunchpadScript):
@@ -74,7 +75,6 @@
         with matching owner names.
         """
         # Avoiding circular imports.
-        from lp.soyuz.interfaces.archive import ArchivePurpose
         from lp.soyuz.model.archive import Archive
         from lp.soyuz.model.publishing import SourcePackagePublishingHistory
         from lp.registry.model.person import Person

=== modified file 'lib/lp/soyuz/scripts/processaccepted.py'
--- lib/lp/soyuz/scripts/processaccepted.py	2010-08-20 20:31:18 +0000
+++ lib/lp/soyuz/scripts/processaccepted.py	2010-08-25 10:56:48 +0000
@@ -27,13 +27,15 @@
 from lp.registry.interfaces.distribution import IDistributionSet
 from lp.registry.interfaces.pocket import PackagePublishingPocket
 from lp.services.scripts.base import LaunchpadScript
+from lp.soyuz.enums import (
+    ArchivePurpose,
+    PackageUploadStatus,
+    )
 from lp.soyuz.interfaces.archive import (
-    ArchivePurpose,
     IArchiveSet,
     )
 from lp.soyuz.interfaces.queue import (
     IPackageUploadSet,
-    PackageUploadStatus,
     )
 
 

=== modified file 'lib/lp/soyuz/scripts/publishdistro.py'
--- lib/lp/soyuz/scripts/publishdistro.py	2010-08-20 20:31:18 +0000
+++ lib/lp/soyuz/scripts/publishdistro.py	2010-08-25 10:56:48 +0000
@@ -24,9 +24,11 @@
 from lp.archivepublisher.publishing import getPublisher
 from lp.registry.interfaces.distribution import IDistributionSet
 from lp.services.scripts.base import LaunchpadScriptFailure
-from lp.soyuz.interfaces.archive import (
+from lp.soyuz.enums import (
     ArchivePurpose,
     ArchiveStatus,
+    )
+from lp.soyuz.interfaces.archive import (
     IArchiveSet,
     MAIN_ARCHIVE_PURPOSES,
     )

=== modified file 'lib/lp/soyuz/scripts/queue.py'
--- lib/lp/soyuz/scripts/queue.py	2010-08-20 20:31:18 +0000
+++ lib/lp/soyuz/scripts/queue.py	2010-08-25 10:56:48 +0000
@@ -29,10 +29,10 @@
 from canonical.launchpad.webapp.tales import DurationFormatterAPI
 from canonical.librarian.utils import filechunks
 from lp.app.errors import NotFoundError
+from lp.soyuz.enums import PackageUploadStatus
 from lp.soyuz.interfaces.component import IComponentSet
 from lp.soyuz.interfaces.queue import (
     IPackageUploadSet,
-    PackageUploadStatus,
     QueueInconsistentStateError,
     )
 from lp.soyuz.interfaces.section import ISectionSet

=== modified file 'lib/lp/soyuz/scripts/tests/test_copypackage.py'
--- lib/lp/soyuz/scripts/tests/test_copypackage.py	2010-08-20 20:31:18 +0000
+++ lib/lp/soyuz/scripts/tests/test_copypackage.py	2010-08-25 10:56:48 +0000
@@ -34,8 +34,14 @@
 from lp.registry.interfaces.pocket import PackagePublishingPocket
 from lp.registry.interfaces.series import SeriesStatus
 from lp.soyuz.adapters.packagelocation import PackageLocationError
+from lp.soyuz.enums import (
+    ArchivePurpose,
+    PackagePublishingStatus,
+    PackageUploadCustomFormat,
+    PackageUploadStatus,
+    SourcePackageFormat,
+    )
 from lp.soyuz.interfaces.archive import (
-    ArchivePurpose,
     CannotCopy,
     )
 from lp.soyuz.interfaces.binarypackagebuild import BuildSetStatus
@@ -44,16 +50,12 @@
     active_publishing_status,
     IBinaryPackagePublishingHistory,
     ISourcePackagePublishingHistory,
-    PackagePublishingStatus,
     )
 from lp.soyuz.interfaces.queue import (
-    PackageUploadCustomFormat,
-    PackageUploadStatus,
     QueueInconsistentStateError,
     )
 from lp.soyuz.interfaces.sourcepackageformat import (
     ISourcePackageFormatSelectionSet,
-    SourcePackageFormat,
     )
 from lp.soyuz.model.processor import ProcessorFamily
 from lp.soyuz.model.publishing import (

=== modified file 'lib/lp/soyuz/scripts/tests/test_expire_archive_files.py'
--- lib/lp/soyuz/scripts/tests/test_expire_archive_files.py	2010-08-20 20:31:18 +0000
+++ lib/lp/soyuz/scripts/tests/test_expire_archive_files.py	2010-08-25 10:56:48 +0000
@@ -15,7 +15,7 @@
 from canonical.launchpad.scripts import QuietFakeLogger
 from canonical.testing.layers import LaunchpadZopelessLayer
 from lp.registry.interfaces.distribution import IDistributionSet
-from lp.soyuz.interfaces.archive import ArchivePurpose
+from lp.soyuz.enums import ArchivePurpose
 from lp.soyuz.scripts.expire_archive_files import ArchiveExpirer
 from lp.soyuz.tests.test_publishing import SoyuzTestPublisher
 from lp.testing import TestCaseWithFactory

=== modified file 'lib/lp/soyuz/scripts/tests/test_initialise_distroseries.py'
--- lib/lp/soyuz/scripts/tests/test_initialise_distroseries.py	2010-08-23 13:41:04 +0000
+++ lib/lp/soyuz/scripts/tests/test_initialise_distroseries.py	2010-08-25 10:56:48 +0000
@@ -25,7 +25,7 @@
 from lp.registry.interfaces.pocket import PackagePublishingPocket
 from lp.soyuz.interfaces.archivepermission import IArchivePermissionSet
 from lp.soyuz.interfaces.packageset import IPackagesetSet
-from lp.soyuz.interfaces.sourcepackageformat import SourcePackageFormat
+from lp.soyuz.enums import SourcePackageFormat
 from lp.soyuz.model.distroarchseries import DistroArchSeries
 from lp.soyuz.scripts.initialise_distroseries import (
     InitialisationError,

=== modified file 'lib/lp/soyuz/scripts/tests/test_obsoletedistroseries.py'
--- lib/lp/soyuz/scripts/tests/test_obsoletedistroseries.py	2010-08-20 20:31:18 +0000
+++ lib/lp/soyuz/scripts/tests/test_obsoletedistroseries.py	2010-08-25 10:56:48 +0000
@@ -16,7 +16,7 @@
 from canonical.testing import LaunchpadZopelessLayer
 from lp.registry.interfaces.distribution import IDistributionSet
 from lp.registry.interfaces.series import SeriesStatus
-from lp.soyuz.interfaces.publishing import PackagePublishingStatus
+from lp.soyuz.enums import PackagePublishingStatus
 from lp.soyuz.model.publishing import (
     BinaryPackagePublishingHistory,
     SourcePackagePublishingHistory,

=== modified file 'lib/lp/soyuz/scripts/tests/test_populatearchive.py'
--- lib/lp/soyuz/scripts/tests/test_populatearchive.py	2010-08-20 20:31:18 +0000
+++ lib/lp/soyuz/scripts/tests/test_populatearchive.py	2010-08-25 10:56:48 +0000
@@ -23,12 +23,12 @@
 from lp.registry.interfaces.distribution import IDistributionSet
 from lp.registry.interfaces.person import IPersonSet
 from lp.services.job.interfaces.job import JobStatus
+from lp.soyuz.enums import ArchivePurpose
 from lp.soyuz.interfaces.archive import (
-    ArchivePurpose,
     IArchiveSet,
     )
+from lp.soyuz.enums import PackagePublishingStatus
 from lp.soyuz.interfaces.binarypackagebuild import IBinaryPackageBuildSet
-from lp.soyuz.interfaces.publishing import PackagePublishingStatus
 from lp.soyuz.scripts.ftpmaster import (
     PackageLocationError,
     SoyuzScriptError,

=== modified file 'lib/lp/soyuz/scripts/tests/test_ppa_add_missing_builds.py'
--- lib/lp/soyuz/scripts/tests/test_ppa_add_missing_builds.py	2010-08-20 20:31:18 +0000
+++ lib/lp/soyuz/scripts/tests/test_ppa_add_missing_builds.py	2010-08-25 10:56:48 +0000
@@ -14,8 +14,10 @@
     )
 from canonical.launchpad.scripts import QuietFakeLogger
 from canonical.testing.layers import LaunchpadZopelessLayer
-from lp.soyuz.interfaces.archive import ArchivePurpose
-from lp.soyuz.interfaces.publishing import PackagePublishingStatus
+from lp.soyuz.enums import (
+    ArchivePurpose,
+    PackagePublishingStatus,
+    )
 from lp.soyuz.scripts.ppa_add_missing_builds import PPAMissingBuilds
 from lp.soyuz.tests.test_publishing import SoyuzTestPublisher
 from lp.testing import TestCaseWithFactory

=== modified file 'lib/lp/soyuz/scripts/tests/test_processdeathrow.py'
--- lib/lp/soyuz/scripts/tests/test_processdeathrow.py	2010-08-20 20:31:18 +0000
+++ lib/lp/soyuz/scripts/tests/test_processdeathrow.py	2010-08-25 10:56:48 +0000
@@ -27,7 +27,7 @@
 from canonical.testing import LaunchpadZopelessLayer
 from lp.registry.interfaces.distribution import IDistributionSet
 from lp.registry.interfaces.person import IPersonSet
-from lp.soyuz.interfaces.publishing import PackagePublishingStatus
+from lp.soyuz.enums import PackagePublishingStatus
 
 
 class TestProcessDeathRow(TestCase):

=== modified file 'lib/lp/soyuz/scripts/tests/test_publishdistro.py'
--- lib/lp/soyuz/scripts/tests/test_publishdistro.py	2010-08-20 20:31:18 +0000
+++ lib/lp/soyuz/scripts/tests/test_publishdistro.py	2010-08-25 10:56:48 +0000
@@ -21,12 +21,14 @@
 from lp.registry.interfaces.distribution import IDistributionSet
 from lp.registry.interfaces.person import IPersonSet
 from lp.services.scripts.base import LaunchpadScriptFailure
+from lp.soyuz.enums import (
+    ArchivePurpose,
+    BinaryPackageFormat,
+    PackagePublishingStatus,
+    )
 from lp.soyuz.interfaces.archive import (
-    ArchivePurpose,
     IArchiveSet,
     )
-from lp.soyuz.interfaces.binarypackagerelease import BinaryPackageFormat
-from lp.soyuz.interfaces.publishing import PackagePublishingStatus
 from lp.soyuz.scripts import publishdistro
 from lp.soyuz.tests.test_publishing import TestNativePublishingBase
 

=== modified file 'lib/lp/soyuz/scripts/tests/test_queue.py'
--- lib/lp/soyuz/scripts/tests/test_queue.py	2010-08-20 20:31:18 +0000
+++ lib/lp/soyuz/scripts/tests/test_queue.py	2010-08-25 10:56:48 +0000
@@ -48,14 +48,16 @@
 from lp.registry.interfaces.pocket import PackagePublishingPocket
 from lp.registry.interfaces.series import SeriesStatus
 from lp.services.mail import stub
+from lp.soyuz.enums import (
+    ArchivePurpose,
+    PackagePublishingStatus,
+    PackageUploadStatus,
+    )
 from lp.soyuz.interfaces.archive import (
-    ArchivePurpose,
     IArchiveSet,
     )
-from lp.soyuz.interfaces.publishing import PackagePublishingStatus
 from lp.soyuz.interfaces.queue import (
     IPackageUploadSet,
-    PackageUploadStatus,
     )
 from lp.soyuz.scripts.queue import (
     CommandRunner,

=== modified file 'lib/lp/soyuz/scripts/tests/test_removepackage.py'
--- lib/lp/soyuz/scripts/tests/test_removepackage.py	2010-08-20 20:31:18 +0000
+++ lib/lp/soyuz/scripts/tests/test_removepackage.py	2010-08-25 10:56:48 +0000
@@ -21,9 +21,9 @@
 from canonical.testing import LaunchpadZopelessLayer
 from lp.registry.interfaces.distribution import IDistributionSet
 from lp.registry.interfaces.person import IPersonSet
+from lp.soyuz.enums import PackagePublishingStatus
 from lp.soyuz.interfaces.publishing import (
     active_publishing_status,
-    PackagePublishingStatus,
     )
 from lp.soyuz.model.publishing import (
     BinaryPackagePublishingHistory,

=== modified file 'lib/lp/soyuz/stories/distribution/xx-distribution-packages.txt'
--- lib/lp/soyuz/stories/distribution/xx-distribution-packages.txt	2010-05-19 17:03:40 +0000
+++ lib/lp/soyuz/stories/distribution/xx-distribution-packages.txt	2010-08-25 10:56:48 +0000
@@ -130,7 +130,7 @@
 
     # Publish the source 'netapplet' in the breezy-autotest and
     #  main archive.
-    >>> from lp.soyuz.interfaces.publishing import PackagePublishingStatus
+    >>> from lp.soyuz.enums import PackagePublishingStatus
     >>> netapplet_pub_breezy = publisher.getPubSource(
     ...     sourcename="netapplet", archive=ubuntutest.main_archive,
     ...     status=PackagePublishingStatus.PUBLISHED, version='1.3.1')

=== modified file 'lib/lp/soyuz/stories/ppa/xx-copy-packages.txt'
--- lib/lp/soyuz/stories/ppa/xx-copy-packages.txt	2010-08-06 21:29:32 +0000
+++ lib/lp/soyuz/stories/ppa/xx-copy-packages.txt	2010-08-25 10:56:48 +0000
@@ -464,7 +464,7 @@
 We will build and publish the architecture independent binary for
 pmount ('pmount-bin') and publish it in hoary/i386 and hoary/hppa.
 
-    >>> from lp.soyuz.interfaces.publishing import PackagePublishingStatus
+    >>> from lp.soyuz.enums import PackagePublishingStatus
     >>> login('foo.bar@xxxxxxxxxxxxx')
     >>> jblack = person_set.getByName('jblack')
     >>> pmount_build = jblack.archive.getBuildRecords()[0]
@@ -512,8 +512,6 @@
 After the binary package go from PENDING->PUBLISHED, the page reflects the
 changes:
 
-    >>> from lp.soyuz.interfaces.publishing import (
-    ...     PackagePublishingStatus)
     >>> login('foo.bar@xxxxxxxxxxxxx')
     >>> for binary in pmount_binaries:
     ...     binary.setPublished()

=== modified file 'lib/lp/soyuz/stories/ppa/xx-delete-packages.txt'
--- lib/lp/soyuz/stories/ppa/xx-delete-packages.txt	2010-01-31 19:36:27 +0000
+++ lib/lp/soyuz/stories/ppa/xx-delete-packages.txt	2010-08-25 10:56:48 +0000
@@ -326,8 +326,8 @@
     >>> from canonical.database.constants import UTC_NOW
     >>> from canonical.launchpad.ftests import login, logout
     >>> from canonical.launchpad.interfaces import (
-    ...    IDistributionSet, ILibraryFileAliasSet, IPersonSet,
-    ...    PackagePublishingStatus)
+    ...    IDistributionSet, ILibraryFileAliasSet, IPersonSet)
+    >>> from lp.soyuz.enums import PackagePublishingStatus
     >>> from lp.soyuz.tests.test_publishing import (
     ...     SoyuzTestPublisher)
 

=== modified file 'lib/lp/soyuz/stories/ppa/xx-ppa-packages.txt'
--- lib/lp/soyuz/stories/ppa/xx-ppa-packages.txt	2010-05-19 05:47:50 +0000
+++ lib/lp/soyuz/stories/ppa/xx-ppa-packages.txt	2010-08-25 10:56:48 +0000
@@ -140,7 +140,7 @@
     ...     name='pmount', version='0.1-1')[1]
     >>> print pmount_i386_pub.displayname
     pmount 0.1-1 in warty i386
-    >>> from lp.soyuz.interfaces.publishing import PackagePublishingStatus
+    >>> from lp.soyuz.enums import PackagePublishingStatus
     >>> pmount_i386_pub.status = PackagePublishingStatus.PENDING
     >>> pmount_i386_pub.datepublished = None
     >>> transaction.commit()
@@ -272,7 +272,7 @@
 for iceweasel before marking it as superseded.
 
     >>> from canonical.launchpad.interfaces import (
-    ...     IPersonSet, PackagePublishingStatus)
+    ...     IPersonSet)
     >>> from zope.component import getUtility
     >>> login('foo.bar@xxxxxxxxxxxxx')
     >>> cprov = getUtility(IPersonSet).getByName('cprov')

=== modified file 'lib/lp/soyuz/stories/soyuz/xx-package-diff.txt'
--- lib/lp/soyuz/stories/soyuz/xx-package-diff.txt	2010-05-13 12:04:56 +0000
+++ lib/lp/soyuz/stories/soyuz/xx-package-diff.txt	2010-08-25 10:56:48 +0000
@@ -57,8 +57,8 @@
 
 Activate Foo Bar's PPA and upload another 'biscuit' source version.
 
-    >>> from lp.soyuz.interfaces.archive import (
-    ...     ArchivePurpose, IArchiveSet)
+    >>> from lp.soyuz.enums import ArchivePurpose
+    >>> from lp.soyuz.interfaces.archive import IArchiveSet
     >>> foobar = getUtility(IPersonSet).getByName('name16')
     >>> ppa = getUtility(IArchiveSet).new(
     ...     owner=foobar, distribution=ubuntu, purpose=ArchivePurpose.PPA)
@@ -99,8 +99,7 @@
     >>> from zope.security.proxy import removeSecurityProxy
     >>> from canonical.database.constants import UTC_NOW
     >>> from canonical.launchpad.ftests import syncUpdate
-    >>> from lp.soyuz.interfaces.packagediff import (
-    ...     PackageDiffStatus)
+    >>> from lp.soyuz.enums import PackageDiffStatus
     >>> from canonical.librarian.interfaces import ILibrarianClient
 
     >>> def perform_fake_diff(diff, filename):

=== modified file 'lib/lp/soyuz/stories/soyuz/xx-packagepublishinghistory.txt'
--- lib/lp/soyuz/stories/soyuz/xx-packagepublishinghistory.txt	2009-12-02 16:03:13 +0000
+++ lib/lp/soyuz/stories/soyuz/xx-packagepublishinghistory.txt	2010-08-25 10:56:48 +0000
@@ -4,7 +4,7 @@
 shows the complete history of a package in all series.
 
     >>> from lp.soyuz.tests.test_publishing import SoyuzTestPublisher
-    >>> from lp.soyuz.interfaces.publishing import (
+    >>> from lp.soyuz.enums import (
     ...     PackagePublishingStatus)
     >>> stp = SoyuzTestPublisher()
     >>> login('foo.bar@xxxxxxxxxxxxx')

=== modified file 'lib/lp/soyuz/stories/soyuz/xx-person-packages.txt'
--- lib/lp/soyuz/stories/soyuz/xx-person-packages.txt	2010-07-14 16:27:33 +0000
+++ lib/lp/soyuz/stories/soyuz/xx-person-packages.txt	2010-08-25 10:56:48 +0000
@@ -172,7 +172,7 @@
     >>> from lp.registry.interfaces.distribution import IDistributionSet
     >>> from lp.soyuz.tests.test_publishing import (
     ...      SoyuzTestPublisher)
-    >>> from lp.soyuz.interfaces.publishing import (
+    >>> from lp.soyuz.enums import (
     ...     PackagePublishingStatus)
 
     >>> login("foo.bar@xxxxxxxxxxxxx")
@@ -299,8 +299,8 @@
 Now we'll publish it in the primary archive.
 
     >>> login("foo.bar@xxxxxxxxxxxxx")
-    >>> from lp.soyuz.interfaces.archive import (
-    ...     ArchivePurpose, IArchiveSet)
+    >>> from lp.soyuz.enums import ArchivePurpose
+    >>> from lp.soyuz.interfaces.archive import IArchiveSet
     >>> from lp.registry.interfaces.distribution import IDistributionSet
     >>> ubuntu = getUtility(IDistributionSet)['ubuntu']
     >>> primary = getUtility(IArchiveSet).getByDistroPurpose(ubuntu,

=== modified file 'lib/lp/soyuz/stories/soyuz/xx-private-builds.txt'
--- lib/lp/soyuz/stories/soyuz/xx-private-builds.txt	2010-05-18 07:59:52 +0000
+++ lib/lp/soyuz/stories/soyuz/xx-private-builds.txt	2010-08-25 10:56:48 +0000
@@ -23,7 +23,7 @@
     >>> from lp.registry.interfaces.distribution import IDistributionSet
     >>> from lp.soyuz.tests.test_publishing import (
     ...      SoyuzTestPublisher)
-    >>> from lp.soyuz.interfaces.publishing import (
+    >>> from lp.soyuz.enums import (
     ...     PackagePublishingStatus)
     >>> from canonical.launchpad.ftests import login, logout
     >>> from canonical.database.sqlbase import flush_database_updates

=== modified file 'lib/lp/soyuz/stories/soyuz/xx-queue-pages.txt'
--- lib/lp/soyuz/stories/soyuz/xx-queue-pages.txt	2010-05-13 12:04:56 +0000
+++ lib/lp/soyuz/stories/soyuz/xx-queue-pages.txt	2010-08-25 10:56:48 +0000
@@ -176,8 +176,7 @@
     >>> from zope.security.proxy import removeSecurityProxy
     >>> from canonical.database.constants import UTC_NOW
     >>> from canonical.librarian.interfaces import ILibrarianClient
-    >>> from lp.soyuz.interfaces.packagediff import (
-    ...     PackageDiffStatus)
+    >>> from lp.soyuz.enums import PackageDiffStatus
     >>> login(ANONYMOUS)
     >>> old = main_archive.getPublishedSources(
     ...     name='alsa-utils', version='1.0.9a-4')[0].sourcepackagerelease

=== modified file 'lib/lp/soyuz/stories/webservice/xx-archive.txt'
--- lib/lp/soyuz/stories/webservice/xx-archive.txt	2010-08-01 23:58:59 +0000
+++ lib/lp/soyuz/stories/webservice/xx-archive.txt	2010-08-25 10:56:48 +0000
@@ -607,7 +607,7 @@
     ...     sourcename="package1", version="1.0",
     ...     archive=ubuntu_db.main_archive)
 
-    >>> from lp.soyuz.interfaces.publishing import (
+    >>> from lp.soyuz.enums import (
     ...     PackagePublishingStatus)
     >>> ignore = test_publisher.getPubSource(
     ...     sourcename="package1", version="1.1",

=== modified file 'lib/lp/soyuz/stories/webservice/xx-binary-package-publishing.txt'
--- lib/lp/soyuz/stories/webservice/xx-binary-package-publishing.txt	2010-03-19 11:27:28 +0000
+++ lib/lp/soyuz/stories/webservice/xx-binary-package-publishing.txt	2010-08-25 10:56:48 +0000
@@ -98,7 +98,7 @@
     >>> from lp.registry.interfaces.distribution import IDistributionSet
     >>> from lp.soyuz.tests.test_publishing import (
     ...      SoyuzTestPublisher)
-    >>> from lp.soyuz.interfaces.publishing import (
+    >>> from lp.soyuz.enums import (
     ...     PackagePublishingStatus)
     >>> cprov_db = getUtility(IPersonSet).getByName('cprov')
     >>> ubuntu_db = getUtility(IDistributionSet).getByName('ubuntu')

=== modified file 'lib/lp/soyuz/stories/webservice/xx-packageupload.txt'
--- lib/lp/soyuz/stories/webservice/xx-packageupload.txt	2009-08-28 06:39:38 +0000
+++ lib/lp/soyuz/stories/webservice/xx-packageupload.txt	2010-08-25 10:56:48 +0000
@@ -43,7 +43,7 @@
 
     >>> login("admin@xxxxxxxxxxxxx")
     >>> from lp.registry.interfaces.pocket import PackagePublishingPocket
-    >>> from lp.soyuz.interfaces.queue import PackageUploadCustomFormat
+    >>> from lp.soyuz.enums import PackageUploadCustomFormat
     >>> from lp.registry.interfaces.distribution import IDistributionSet
     >>> from zope.component import getUtility
     >>> warty_series = getUtility(IDistributionSet)['ubuntu']['warty']

=== modified file 'lib/lp/soyuz/stories/webservice/xx-source-package-publishing.txt'
--- lib/lp/soyuz/stories/webservice/xx-source-package-publishing.txt	2010-06-14 18:14:28 +0000
+++ lib/lp/soyuz/stories/webservice/xx-source-package-publishing.txt	2010-08-25 10:56:48 +0000
@@ -225,7 +225,7 @@
     >>> from lp.registry.interfaces.distribution import IDistributionSet
     >>> from lp.soyuz.tests.test_publishing import (
     ...      SoyuzTestPublisher)
-    >>> from lp.soyuz.interfaces.publishing import (
+    >>> from lp.soyuz.enums import (
     ...     PackagePublishingStatus)
     >>> cprov_db = getUtility(IPersonSet).getByName('cprov')
     >>> ubuntu_db = getUtility(IDistributionSet).getByName('ubuntu')

=== modified file 'lib/lp/soyuz/tests/ppa.py'
--- lib/lp/soyuz/tests/ppa.py	2010-08-20 20:31:18 +0000
+++ lib/lp/soyuz/tests/ppa.py	2010-08-25 10:56:48 +0000
@@ -15,7 +15,7 @@
 from lp.registry.interfaces.sourcepackagename import ISourcePackageNameSet
 from lp.soyuz.interfaces.binarypackagename import IBinaryPackageNameSet
 from lp.soyuz.interfaces.component import IComponentSet
-from lp.soyuz.interfaces.publishing import (
+from lp.soyuz.enums import (
     PackagePublishingPriority,
     PackagePublishingStatus,
     )

=== modified file 'lib/lp/soyuz/tests/soyuz.py'
--- lib/lp/soyuz/tests/soyuz.py	2010-08-20 20:31:18 +0000
+++ lib/lp/soyuz/tests/soyuz.py	2010-08-25 10:56:48 +0000
@@ -26,7 +26,7 @@
 from lp.registry.interfaces.person import IPersonSet
 from lp.registry.interfaces.pocket import PackagePublishingPocket
 from lp.soyuz.interfaces.packagediff import IPackageDiffSet
-from lp.soyuz.interfaces.publishing import PackagePublishingStatus
+from lp.soyuz.enums import PackagePublishingStatus
 from lp.soyuz.model.publishing import (
     BinaryPackagePublishingHistory,
     SourcePackagePublishingHistory,

=== modified file 'lib/lp/soyuz/tests/test_archive.py'
--- lib/lp/soyuz/tests/test_archive.py	2010-08-20 20:31:18 +0000
+++ lib/lp/soyuz/tests/test_archive.py	2010-08-25 10:56:48 +0000
@@ -28,10 +28,13 @@
 from lp.registry.interfaces.series import SeriesStatus
 from lp.services.job.interfaces.job import JobStatus
 from lp.services.worlddata.interfaces.country import ICountrySet
+from lp.soyuz.enums import (
+    ArchivePurpose,
+    ArchiveStatus,
+    PackagePublishingStatus,
+    )
 from lp.soyuz.interfaces.archive import (
     ArchiveDisabled,
-    ArchivePurpose,
-    ArchiveStatus,
     CannotRestrictArchitectures,
     CannotUploadToPocket,
     CannotUploadToPPA,
@@ -47,7 +50,6 @@
 from lp.soyuz.interfaces.binarypackagename import IBinaryPackageNameSet
 from lp.soyuz.interfaces.component import IComponentSet
 from lp.soyuz.interfaces.processor import IProcessorFamilySet
-from lp.soyuz.interfaces.publishing import PackagePublishingStatus
 from lp.soyuz.model.binarypackagerelease import (
     BinaryPackageReleaseDownloadCount,
     )

=== modified file 'lib/lp/soyuz/tests/test_archivejob.py'
--- lib/lp/soyuz/tests/test_archivejob.py	2010-08-20 20:31:18 +0000
+++ lib/lp/soyuz/tests/test_archivejob.py	2010-08-25 10:56:48 +0000
@@ -1,7 +1,10 @@
+# Copyright 2010 Canonical Ltd.  This software is licensed under the
+# GNU Affero General Public License version 3 (see the file LICENSE).
+
 import unittest
 
 from canonical.testing import DatabaseFunctionalLayer
-from lp.soyuz.interfaces.archivejob import ArchiveJobType
+from lp.soyuz.enums import ArchiveJobType
 from lp.soyuz.model.archivejob import (
     ArchiveJob,
     ArchiveJobDerived,

=== modified file 'lib/lp/soyuz/tests/test_binarypackagebuild.py'
--- lib/lp/soyuz/tests/test_binarypackagebuild.py	2010-08-24 09:51:26 +0000
+++ lib/lp/soyuz/tests/test_binarypackagebuild.py	2010-08-25 10:56:48 +0000
@@ -24,13 +24,13 @@
     TestHandleStatusMixin,
     )
 from lp.services.job.model.job import Job
+from lp.soyuz.enums import PackagePublishingStatus
 from lp.soyuz.interfaces.binarypackagebuild import (
     IBinaryPackageBuild,
     IBinaryPackageBuildSet,
     )
 from lp.soyuz.interfaces.buildpackagejob import IBuildPackageJob
 from lp.soyuz.interfaces.component import IComponentSet
-from lp.soyuz.interfaces.publishing import PackagePublishingStatus
 from lp.soyuz.model.binarypackagebuild import BinaryPackageBuild
 from lp.soyuz.model.buildpackagejob import BuildPackageJob
 from lp.soyuz.model.processor import ProcessorFamilySet

=== modified file 'lib/lp/soyuz/tests/test_binarypackagename.py'
--- lib/lp/soyuz/tests/test_binarypackagename.py	2010-08-06 13:46:34 +0000
+++ lib/lp/soyuz/tests/test_binarypackagename.py	2010-08-25 10:56:48 +0000
@@ -13,7 +13,7 @@
 from canonical.testing import DatabaseFunctionalLayer
 from lp.app.errors import NotFoundError
 from lp.soyuz.interfaces.binarypackagename import IBinaryPackageNameSet
-from lp.soyuz.interfaces.publishing import PackagePublishingStatus
+from lp.soyuz.enums import PackagePublishingStatus
 from lp.soyuz.model.binarypackagename import getBinaryPackageDescriptions
 from lp.testing import TestCaseWithFactory
 

=== modified file 'lib/lp/soyuz/tests/test_buildpackagejob.py'
--- lib/lp/soyuz/tests/test_buildpackagejob.py	2010-08-20 20:31:18 +0000
+++ lib/lp/soyuz/tests/test_buildpackagejob.py	2010-08-25 10:56:48 +0000
@@ -19,10 +19,10 @@
     )
 from lp.buildmaster.interfaces.buildbase import BuildStatus
 from lp.buildmaster.interfaces.builder import IBuilderSet
-from lp.soyuz.interfaces.archive import ArchivePurpose
+from lp.soyuz.enums import ArchivePurpose
 from lp.soyuz.interfaces.buildfarmbuildjob import IBuildFarmBuildJob
 from lp.soyuz.interfaces.buildpackagejob import IBuildPackageJob
-from lp.soyuz.interfaces.publishing import PackagePublishingStatus
+from lp.soyuz.enums import PackagePublishingStatus
 from lp.soyuz.model.binarypackagebuild import BinaryPackageBuild
 from lp.soyuz.model.processor import ProcessorFamilySet
 from lp.soyuz.tests.test_publishing import SoyuzTestPublisher

=== modified file 'lib/lp/soyuz/tests/test_copyarchivejob.py'
--- lib/lp/soyuz/tests/test_copyarchivejob.py	2010-08-20 20:31:18 +0000
+++ lib/lp/soyuz/tests/test_copyarchivejob.py	2010-08-25 10:56:48 +0000
@@ -12,9 +12,9 @@
 from lp.buildmaster.interfaces.buildbase import BuildStatus
 from lp.registry.interfaces.pocket import PackagePublishingPocket
 from lp.soyuz.adapters.packagelocation import PackageLocation
-from lp.soyuz.interfaces.archive import ArchivePurpose
+from lp.soyuz.enums import ArchivePurpose
 from lp.soyuz.interfaces.binarypackagebuild import IBinaryPackageBuildSet
-from lp.soyuz.interfaces.publishing import PackagePublishingStatus
+from lp.soyuz.enums import PackagePublishingStatus
 from lp.soyuz.model.copyarchivejob import CopyArchiveJob
 from lp.soyuz.model.processor import ProcessorFamilySet
 from lp.testing import (

=== modified file 'lib/lp/soyuz/tests/test_packagecloner.py'
--- lib/lp/soyuz/tests/test_packagecloner.py	2010-08-20 20:31:18 +0000
+++ lib/lp/soyuz/tests/test_packagecloner.py	2010-08-25 10:56:48 +0000
@@ -10,14 +10,16 @@
 from lp.buildmaster.interfaces.buildbase import BuildStatus
 from lp.registry.interfaces.pocket import PackagePublishingPocket
 from lp.soyuz.adapters.packagelocation import PackageLocation
-from lp.soyuz.interfaces.archive import ArchivePurpose
+from lp.soyuz.enums import (
+    ArchivePurpose,
+    PackagePublishingStatus,
+    )
 from lp.soyuz.interfaces.archivearch import IArchiveArchSet
 from lp.soyuz.interfaces.binarypackagebuild import IBinaryPackageBuildSet
 from lp.soyuz.interfaces.component import IComponentSet
 from lp.soyuz.interfaces.packagecloner import IPackageCloner
 from lp.soyuz.interfaces.publishing import (
     IPublishingSet,
-    PackagePublishingStatus,
     )
 from lp.soyuz.model.processor import ProcessorFamilySet
 from lp.testing import TestCaseWithFactory

=== modified file 'lib/lp/soyuz/tests/test_packagediff.py'
--- lib/lp/soyuz/tests/test_packagediff.py	2010-08-20 20:31:18 +0000
+++ lib/lp/soyuz/tests/test_packagediff.py	2010-08-25 10:56:48 +0000
@@ -18,7 +18,7 @@
     MAIN_STORE,
     )
 from canonical.testing import LaunchpadZopelessLayer
-from lp.soyuz.interfaces.packagediff import PackageDiffStatus
+from lp.soyuz.enums import PackageDiffStatus
 from lp.soyuz.tests.soyuz import TestPackageDiffsBase
 
 

=== modified file 'lib/lp/soyuz/tests/test_packageupload.py'
--- lib/lp/soyuz/tests/test_packageupload.py	2010-08-20 20:31:18 +0000
+++ lib/lp/soyuz/tests/test_packageupload.py	2010-08-25 10:56:48 +0000
@@ -18,13 +18,15 @@
 from lp.registry.interfaces.pocket import PackagePublishingPocket
 from lp.registry.interfaces.series import SeriesStatus
 from lp.services.mail import stub
-from lp.soyuz.interfaces.archive import ArchivePurpose
+from lp.soyuz.enums import (
+    ArchivePurpose,
+    PackagePublishingStatus,
+    PackageUploadCustomFormat,
+    PackageUploadStatus,
+    )
 from lp.soyuz.interfaces.component import IComponentSet
-from lp.soyuz.interfaces.publishing import PackagePublishingStatus
 from lp.soyuz.interfaces.queue import (
     IPackageUploadSet,
-    PackageUploadCustomFormat,
-    PackageUploadStatus,
     )
 from lp.soyuz.tests.test_publishing import SoyuzTestPublisher
 from lp.testing import TestCaseWithFactory

=== modified file 'lib/lp/soyuz/tests/test_processaccepted.py'
--- lib/lp/soyuz/tests/test_processaccepted.py	2010-08-20 20:31:18 +0000
+++ lib/lp/soyuz/tests/test_processaccepted.py	2010-08-25 10:56:48 +0000
@@ -10,8 +10,10 @@
 from canonical.launchpad.webapp.errorlog import ErrorReportingUtility
 from canonical.testing import LaunchpadZopelessLayer
 from lp.registry.interfaces.series import SeriesStatus
-from lp.soyuz.interfaces.archive import ArchivePurpose
-from lp.soyuz.interfaces.publishing import PackagePublishingStatus
+from lp.soyuz.enums import (
+    ArchivePurpose,
+    PackagePublishingStatus,
+    )
 from lp.soyuz.scripts.processaccepted import ProcessAccepted
 from lp.soyuz.tests.test_publishing import SoyuzTestPublisher
 from lp.testing import TestCaseWithFactory

=== modified file 'lib/lp/soyuz/tests/test_publishing.py'
--- lib/lp/soyuz/tests/test_publishing.py	2010-08-20 20:31:18 +0000
+++ lib/lp/soyuz/tests/test_publishing.py	2010-08-25 10:56:48 +0000
@@ -35,20 +35,22 @@
 from lp.registry.interfaces.pocket import PackagePublishingPocket
 from lp.registry.interfaces.sourcepackage import SourcePackageUrgency
 from lp.registry.interfaces.sourcepackagename import ISourcePackageNameSet
+from lp.soyuz.enums import (
+    ArchivePurpose,
+    BinaryPackageFormat,
+    PackageUploadStatus,
+    )
 from lp.soyuz.interfaces.archive import (
-    ArchivePurpose,
     IArchiveSet,
     )
 from lp.soyuz.interfaces.archivearch import IArchiveArchSet
 from lp.soyuz.interfaces.binarypackagename import IBinaryPackageNameSet
-from lp.soyuz.interfaces.binarypackagerelease import BinaryPackageFormat
 from lp.soyuz.interfaces.component import IComponentSet
 from lp.soyuz.interfaces.publishing import (
     IPublishingSet,
     PackagePublishingPriority,
     PackagePublishingStatus,
     )
-from lp.soyuz.interfaces.queue import PackageUploadStatus
 from lp.soyuz.interfaces.section import ISectionSet
 from lp.soyuz.model.processor import ProcessorFamily
 from lp.soyuz.model.publishing import (
@@ -58,7 +60,6 @@
 from lp.testing import TestCaseWithFactory
 from lp.testing.factory import (
     LaunchpadObjectFactory,
-    remove_security_proxy_and_shout_at_engineer,
     )
 from lp.testing.fakemethod import FakeMethod
 

=== modified file 'lib/lp/soyuz/tests/test_publishing_top_level_api.py'
--- lib/lp/soyuz/tests/test_publishing_top_level_api.py	2010-08-20 20:31:18 +0000
+++ lib/lp/soyuz/tests/test_publishing_top_level_api.py	2010-08-25 10:56:48 +0000
@@ -5,7 +5,7 @@
 
 from lp.registry.interfaces.pocket import PackagePublishingPocket
 from lp.registry.interfaces.series import SeriesStatus
-from lp.soyuz.interfaces.publishing import PackagePublishingStatus
+from lp.soyuz.enums import PackagePublishingStatus
 from lp.soyuz.tests.test_publishing import TestNativePublishingBase
 
 

=== modified file 'lib/lp/testing/factory.py'
--- lib/lp/testing/factory.py	2010-08-22 18:31:30 +0000
+++ lib/lp/testing/factory.py	2010-08-25 10:56:48 +0000
@@ -201,26 +201,26 @@
 from lp.services.worlddata.interfaces.country import ICountrySet
 from lp.services.worlddata.interfaces.language import ILanguageSet
 from lp.soyuz.adapters.packagelocation import PackageLocation
+from lp.soyuz.enums import (
+    ArchivePurpose,
+    BinaryPackageFileType,
+    BinaryPackageFormat,
+    PackagePublishingPriority,
+    PackagePublishingStatus,
+    PackageUploadStatus,
+    )
 from lp.soyuz.interfaces.archive import (
-    ArchivePurpose,
     default_name_by_purpose,
     IArchiveSet,
     )
 from lp.soyuz.interfaces.binarypackagebuild import IBinaryPackageBuildSet
 from lp.soyuz.interfaces.binarypackagename import IBinaryPackageNameSet
-from lp.soyuz.interfaces.binarypackagerelease import (
-    BinaryPackageFileType,
-    BinaryPackageFormat,
-    )
 from lp.soyuz.interfaces.component import IComponentSet
 from lp.soyuz.interfaces.packageset import IPackagesetSet
 from lp.soyuz.interfaces.processor import IProcessorFamilySet
 from lp.soyuz.interfaces.publishing import (
     IPublishingSet,
-    PackagePublishingPriority,
-    PackagePublishingStatus,
     )
-from lp.soyuz.interfaces.queue import PackageUploadStatus
 from lp.soyuz.interfaces.section import ISectionSet
 from lp.soyuz.model.files import (
     BinaryPackageFile,

=== modified file 'lib/lp/testing/tests/test_factory.py'
--- lib/lp/testing/tests/test_factory.py	2010-08-20 20:31:18 +0000
+++ lib/lp/testing/tests/test_factory.py	2010-08-25 10:56:48 +0000
@@ -29,9 +29,14 @@
 from lp.services.worlddata.interfaces.language import ILanguage
 from lp.soyuz.interfaces.binarypackagebuild import IBinaryPackageBuild
 from lp.soyuz.interfaces.binarypackagename import IBinaryPackageName
-from lp.soyuz.interfaces.binarypackagerelease import (
+from lp.soyuz.enums import (
     BinaryPackageFileType,
     BinaryPackageFormat,
+    PackagePublishingPriority,
+    PackagePublishingStatus,
+    PackageUploadStatus,
+    )
+from lp.soyuz.interfaces.binarypackagerelease import (
     IBinaryPackageRelease,
     )
 from lp.soyuz.interfaces.files import (
@@ -42,12 +47,9 @@
     IBinaryPackagePublishingHistory,
     ISourcePackagePublishingHistory,
     PackagePublishingPocket,
-    PackagePublishingPriority,
-    PackagePublishingStatus,
     )
 from lp.soyuz.interfaces.queue import (
     IPackageUpload,
-    PackageUploadStatus,
     )
 from lp.soyuz.interfaces.sourcepackagerelease import ISourcePackageRelease
 from lp.testing import TestCaseWithFactory

=== modified file 'scripts/ftpmaster-tools/archive-override-check.py'
--- scripts/ftpmaster-tools/archive-override-check.py	2010-08-02 23:13:29 +0000
+++ scripts/ftpmaster-tools/archive-override-check.py	2010-08-25 10:56:48 +0000
@@ -26,7 +26,7 @@
 from lp.registry.interfaces.distribution import IDistributionSet
 from lp.registry.interfaces.pocket import PackagePublishingPocket
 from lp.soyuz.scripts.ftpmaster import PubSourceChecker
-from lp.soyuz.interfaces.publishing import PackagePublishingStatus
+from lp.soyuz.enums import PackagePublishingStatus
 
 from contrib.glock import GlobalLock
 

=== modified file 'scripts/ftpmaster-tools/remove-package.py'
--- scripts/ftpmaster-tools/remove-package.py	2010-04-27 19:48:39 +0000
+++ scripts/ftpmaster-tools/remove-package.py	2010-08-25 10:56:48 +0000
@@ -25,11 +25,11 @@
 from canonical.database.constants import UTC_NOW
 from canonical.launchpad.database import (BinaryPackagePublishingHistory,
                                           SourcePackagePublishingHistory)
-from canonical.launchpad.interfaces import (
-    IDistributionSet, PackagePublishingStatus)
+from canonical.launchpad.interfaces import IDistributionSet
 from canonical.launchpad.scripts import (execute_zcml_for_scripts,
                                          logger, logger_options)
 from canonical.lp import initZopeless
+from lp.soyuz.enums import PackagePublishingStatus
 
 from contrib.glock import GlobalLock
 

=== modified file 'scripts/ftpmaster-tools/sync-source.py'
--- scripts/ftpmaster-tools/sync-source.py	2010-07-02 14:56:45 +0000
+++ scripts/ftpmaster-tools/sync-source.py	2010-08-25 10:56:48 +0000
@@ -47,12 +47,13 @@
 
 from canonical.database.sqlbase import sqlvalues, cursor
 from canonical.launchpad.interfaces import (
-    IDistributionSet, IPersonSet, PackagePublishingStatus)
+    IDistributionSet, IPersonSet)
 from canonical.launchpad.scripts import (
     execute_zcml_for_scripts, logger, logger_options)
 from canonical.librarian.client import LibrarianClient
 from canonical.lp import initZopeless
 from lp.registry.interfaces.pocket import PackagePublishingPocket
+from lp.soyuz.enums import PackagePublishingStatus
 from lp.soyuz.scripts.ftpmaster import SyncSource, SyncSourceError
 
 

=== modified file 'utilities/soyuz-sampledata-setup.py'
--- utilities/soyuz-sampledata-setup.py	2010-08-13 01:38:28 +0000
+++ utilities/soyuz-sampledata-setup.py	2010-08-25 10:56:48 +0000
@@ -52,11 +52,13 @@
 from lp.registry.interfaces.person import IPersonSet
 from lp.registry.interfaces.series import SeriesStatus
 from lp.registry.model.codeofconduct import SignedCodeOfConduct
+from lp.soyuz.enums import SourcePackageFormat
 from lp.soyuz.interfaces.component import IComponentSet
 from lp.soyuz.interfaces.processor import IProcessorFamilySet
 from lp.soyuz.interfaces.section import ISectionSet
 from lp.soyuz.interfaces.sourcepackageformat import (
-    ISourcePackageFormatSelectionSet, SourcePackageFormat)
+    ISourcePackageFormatSelectionSet,
+    )
 from lp.soyuz.model.section import SectionSelection
 from lp.soyuz.model.component import ComponentSelection
 from lp.soyuz.scripts.initialise_distroseries import InitialiseDistroSeries