Merge lp:~wgrant/launchpad/sourcepackageformat-to-sourcepackagetype into lp:launchpad

Proposed by William Grant
Status: Merged
Approved by: Julian Edwards
Approved revision: no longer in the source branch.
Merged at revision: not available
Proposed branch: lp:~wgrant/launchpad/sourcepackageformat-to-sourcepackagetype
Merge into: lp:launchpad
Diff against target: 67 lines (+7/-7)
3 files modified
lib/lp/registry/interfaces/sourcepackage.py (+2/-2)
lib/lp/soyuz/model/sourcepackagerelease.py (+3/-3)
lib/lp/soyuz/scripts/gina/handlers.py (+2/-2)
To merge this branch: bzr merge lp:~wgrant/launchpad/sourcepackageformat-to-sourcepackagetype
Reviewer Review Type Date Requested Status
Julian Edwards (community) code Approve
Review via email: mp+14581@code.launchpad.net
To post a comment you must log in.
Revision history for this message
William Grant (wgrant) wrote :

My source format 3.0 branches require a SourcePackageFormat enum for the "Format: 3.0 (quilt)" field present in the source package .dsc file. Unfortunately, the name 'SourcePackageFormat' is already in use to represent different packaging systems (DPKG, RPM, etc.), although only one value is used.

Since we could not think of a better name for the new enum, my proposal is to rename the existing SourcePackageFormat to SourcePackageType.

Julian supports the rename.

Revision history for this message
Julian Edwards (julian-edwards) wrote :

Looks good, thanks William,

review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'lib/lp/registry/interfaces/sourcepackage.py'
--- lib/lp/registry/interfaces/sourcepackage.py 2009-10-27 04:04:55 +0000
+++ lib/lp/registry/interfaces/sourcepackage.py 2009-11-07 10:10:26 +0000
@@ -11,7 +11,7 @@
11 'ISourcePackage',11 'ISourcePackage',
12 'ISourcePackageFactory',12 'ISourcePackageFactory',
13 'SourcePackageFileType',13 'SourcePackageFileType',
14 'SourcePackageFormat',14 'SourcePackageType',
15 'SourcePackageRelationships',15 'SourcePackageRelationships',
16 'SourcePackageUrgency',16 'SourcePackageUrgency',
17 ]17 ]
@@ -296,7 +296,7 @@
296 used in the build process for this source package. """)296 used in the build process for this source package. """)
297297
298298
299class SourcePackageFormat(DBEnumeratedType):299class SourcePackageType(DBEnumeratedType):
300 """Source Package Format300 """Source Package Format
301301
302 Launchpad supports distributions that use source packages in a variety302 Launchpad supports distributions that use source packages in a variety
303303
=== modified file 'lib/lp/soyuz/model/sourcepackagerelease.py'
--- lib/lp/soyuz/model/sourcepackagerelease.py 2009-09-28 08:35:20 +0000
+++ lib/lp/soyuz/model/sourcepackagerelease.py 2009-11-07 10:10:26 +0000
@@ -52,7 +52,7 @@
52from lp.soyuz.scripts.queue import QueueActionError52from lp.soyuz.scripts.queue import QueueActionError
53from lp.registry.interfaces.person import validate_public_person53from lp.registry.interfaces.person import validate_public_person
54from lp.registry.interfaces.sourcepackage import (54from lp.registry.interfaces.sourcepackage import (
55 SourcePackageFileType, SourcePackageFormat, SourcePackageUrgency)55 SourcePackageFileType, SourcePackageType, SourcePackageUrgency)
5656
5757
58def _filter_ubuntu_translation_file(filename):58def _filter_ubuntu_translation_file(filename):
@@ -105,8 +105,8 @@
105 build_conflicts = StringCol(dbName='build_conflicts')105 build_conflicts = StringCol(dbName='build_conflicts')
106 build_conflicts_indep = StringCol(dbName='build_conflicts_indep')106 build_conflicts_indep = StringCol(dbName='build_conflicts_indep')
107 architecturehintlist = StringCol(dbName='architecturehintlist')107 architecturehintlist = StringCol(dbName='architecturehintlist')
108 format = EnumCol(dbName='format', schema=SourcePackageFormat,108 format = EnumCol(dbName='format', schema=SourcePackageType,
109 default=SourcePackageFormat.DPKG, notNull=True)109 default=SourcePackageType.DPKG, notNull=True)
110 upload_distroseries = ForeignKey(foreignKey='DistroSeries',110 upload_distroseries = ForeignKey(foreignKey='DistroSeries',
111 dbName='upload_distroseries')111 dbName='upload_distroseries')
112 upload_archive = ForeignKey(112 upload_archive = ForeignKey(
113113
=== modified file 'lib/lp/soyuz/scripts/gina/handlers.py'
--- lib/lp/soyuz/scripts/gina/handlers.py 2009-09-09 21:33:30 +0000
+++ lib/lp/soyuz/scripts/gina/handlers.py 2009-11-07 10:10:26 +0000
@@ -45,7 +45,7 @@
45 BinaryPackageFile, SourcePackageReleaseFile)45 BinaryPackageFile, SourcePackageReleaseFile)
4646
47from lp.registry.interfaces.person import IPersonSet, PersonCreationRationale47from lp.registry.interfaces.person import IPersonSet, PersonCreationRationale
48from lp.registry.interfaces.sourcepackage import SourcePackageFormat48from lp.registry.interfaces.sourcepackage import SourcePackageType
49from lp.soyuz.interfaces.binarypackagename import IBinaryPackageNameSet49from lp.soyuz.interfaces.binarypackagename import IBinaryPackageNameSet
50from lp.soyuz.interfaces.build import BuildStatus50from lp.soyuz.interfaces.build import BuildStatus
51from lp.soyuz.interfaces.publishing import PackagePublishingStatus51from lp.soyuz.interfaces.publishing import PackagePublishingStatus
@@ -599,7 +599,7 @@
599 build_conflicts=src.build_conflicts,599 build_conflicts=src.build_conflicts,
600 build_conflicts_indep=src.build_conflicts_indep,600 build_conflicts_indep=src.build_conflicts_indep,
601 architecturehintlist=src.architecture,601 architecturehintlist=src.architecture,
602 format=SourcePackageFormat.DPKG,602 format=SourcePackageType.DPKG,
603 upload_distroseries=distroseries.id,603 upload_distroseries=distroseries.id,
604 dsc_format=src.format,604 dsc_format=src.format,
605 dsc_maintainer_rfc822=maintainer_line,605 dsc_maintainer_rfc822=maintainer_line,