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
1=== modified file 'lib/lp/registry/interfaces/sourcepackage.py'
2--- lib/lp/registry/interfaces/sourcepackage.py 2009-10-27 04:04:55 +0000
3+++ lib/lp/registry/interfaces/sourcepackage.py 2009-11-07 10:10:26 +0000
4@@ -11,7 +11,7 @@
5 'ISourcePackage',
6 'ISourcePackageFactory',
7 'SourcePackageFileType',
8- 'SourcePackageFormat',
9+ 'SourcePackageType',
10 'SourcePackageRelationships',
11 'SourcePackageUrgency',
12 ]
13@@ -296,7 +296,7 @@
14 used in the build process for this source package. """)
15
16
17-class SourcePackageFormat(DBEnumeratedType):
18+class SourcePackageType(DBEnumeratedType):
19 """Source Package Format
20
21 Launchpad supports distributions that use source packages in a variety
22
23=== modified file 'lib/lp/soyuz/model/sourcepackagerelease.py'
24--- lib/lp/soyuz/model/sourcepackagerelease.py 2009-09-28 08:35:20 +0000
25+++ lib/lp/soyuz/model/sourcepackagerelease.py 2009-11-07 10:10:26 +0000
26@@ -52,7 +52,7 @@
27 from lp.soyuz.scripts.queue import QueueActionError
28 from lp.registry.interfaces.person import validate_public_person
29 from lp.registry.interfaces.sourcepackage import (
30- SourcePackageFileType, SourcePackageFormat, SourcePackageUrgency)
31+ SourcePackageFileType, SourcePackageType, SourcePackageUrgency)
32
33
34 def _filter_ubuntu_translation_file(filename):
35@@ -105,8 +105,8 @@
36 build_conflicts = StringCol(dbName='build_conflicts')
37 build_conflicts_indep = StringCol(dbName='build_conflicts_indep')
38 architecturehintlist = StringCol(dbName='architecturehintlist')
39- format = EnumCol(dbName='format', schema=SourcePackageFormat,
40- default=SourcePackageFormat.DPKG, notNull=True)
41+ format = EnumCol(dbName='format', schema=SourcePackageType,
42+ default=SourcePackageType.DPKG, notNull=True)
43 upload_distroseries = ForeignKey(foreignKey='DistroSeries',
44 dbName='upload_distroseries')
45 upload_archive = ForeignKey(
46
47=== modified file 'lib/lp/soyuz/scripts/gina/handlers.py'
48--- lib/lp/soyuz/scripts/gina/handlers.py 2009-09-09 21:33:30 +0000
49+++ lib/lp/soyuz/scripts/gina/handlers.py 2009-11-07 10:10:26 +0000
50@@ -45,7 +45,7 @@
51 BinaryPackageFile, SourcePackageReleaseFile)
52
53 from lp.registry.interfaces.person import IPersonSet, PersonCreationRationale
54-from lp.registry.interfaces.sourcepackage import SourcePackageFormat
55+from lp.registry.interfaces.sourcepackage import SourcePackageType
56 from lp.soyuz.interfaces.binarypackagename import IBinaryPackageNameSet
57 from lp.soyuz.interfaces.build import BuildStatus
58 from lp.soyuz.interfaces.publishing import PackagePublishingStatus
59@@ -599,7 +599,7 @@
60 build_conflicts=src.build_conflicts,
61 build_conflicts_indep=src.build_conflicts_indep,
62 architecturehintlist=src.architecture,
63- format=SourcePackageFormat.DPKG,
64+ format=SourcePackageType.DPKG,
65 upload_distroseries=distroseries.id,
66 dsc_format=src.format,
67 dsc_maintainer_rfc822=maintainer_line,