← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~jelmer/launchpad/621778-homepage-field into lp:launchpad

 

Jelmer Vernooij has proposed merging lp:~jelmer/launchpad/621778-homepage-field into lp:launchpad.

Requested reviews:
  Robert Collins (lifeless): db
  Launchpad code reviewers (launchpad-reviewers): code


This adds a "Homepage" field to SourcePackageRelease and BinaryPackageRelease. 

This field was added to the Debian policy a fairly recently, see http://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Homepage

I'm adding this field so that it can be used as the default value for the upstream homepage URL when creating an upstream project from an Ubuntu source package. 

See: https://bugs.edge.launchpad.net/launchpad-registry/+bug/621778

-- 
https://code.launchpad.net/~jelmer/launchpad/621778-homepage-field/+merge/33331
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~jelmer/launchpad/621778-homepage-field into lp:launchpad.
=== modified file 'database/schema/comments.sql'
--- database/schema/comments.sql	2010-08-17 11:25:16 +0000
+++ database/schema/comments.sql	2010-08-22 17:28:44 +0000
@@ -1339,6 +1339,7 @@
 COMMENT ON COLUMN SourcePackageRelease.build_conflicts_indep IS 'The list of packages that will conflict with this source while building in architecture independent environment, as mentioned in the control file "Build-Conflicts-Indep:" field.';
 COMMENT ON COLUMN SourcePackageRelease.changelog IS 'The LibraryFileAlias ID of changelog associated with this sourcepackage.  Often in the case of debian packages and will be found after the installation in /usr/share/doc/<binarypackagename>/changelog.Debian.gz';
 COMMENT ON COLUMN SourcePackageRelease.user_defined_fields IS 'A JSON struct containing a sequence of key-value pairs with user defined fields in the control file.';
+COMMENT ON COLUMN SourcePackageRelease.homepage IS 'Upstream project homepage URL.';
 
 -- SourcePackageName
 
@@ -1480,6 +1481,7 @@
 COMMENT ON COLUMN BinaryPackageRelease.breaks IS 'The list of packages which will be broken by the installtion of this package, as it is in the control file "Breaks:" field.';
 COMMENT ON COLUMN BinaryPackageRelease.debug_package IS 'The corresponding binary package release containing debug symbols for this binary, if any.';
 COMMENT ON COLUMN BinaryPackageRelease.user_defined_fields IS 'A JSON struct containing a sequence of key-value pairs with user defined fields in the control file.';
+COMMENT ON COLUMN BinaryPackageRelease.homepage IS 'Upstream project homepage URL.';
 
 
 -- BinaryPackageFile

=== added file 'database/schema/patch-2208-00-2.sql'
--- database/schema/patch-2208-00-2.sql	1970-01-01 00:00:00 +0000
+++ database/schema/patch-2208-00-2.sql	2010-08-22 17:28:44 +0000
@@ -0,0 +1,11 @@
+-- Copyright 2010 Canonical Ltd.  This software is licensed under the
+-- GNU Affero General Public License version 3 (see the file LICENSE).
+SET client_min_messages=ERROR;
+
+ALTER TABLE BinaryPackageRelease
+    ADD COLUMN homepage TEXT;
+
+ALTER TABLE SourcePackageRelease
+    ADD COLUMN homepage TEXT;
+
+INSERT INTO LaunchpadDatabaseRevision VALUES (2208, 00, 2);

=== modified file 'lib/lp/soyuz/interfaces/binarypackagerelease.py'
--- lib/lp/soyuz/interfaces/binarypackagerelease.py	2010-08-21 13:56:34 +0000
+++ lib/lp/soyuz/interfaces/binarypackagerelease.py	2010-08-22 17:28:44 +0000
@@ -80,6 +80,12 @@
     user_defined_fields = List(
         title=_("Sequence of user-defined fields as key-value pairs."))
 
+    homepage = TextLine(
+        title=_("Homepage"),
+        description=_(
+        "Upstream project homepage."),
+        required=False)
+
     files = Attribute("Related list of IBinaryPackageFile entries")
 
     title = TextLine(required=True, readonly=True)

=== modified file 'lib/lp/soyuz/interfaces/sourcepackagerelease.py'
--- lib/lp/soyuz/interfaces/sourcepackagerelease.py	2010-08-21 13:56:34 +0000
+++ lib/lp/soyuz/interfaces/sourcepackagerelease.py	2010-08-22 17:28:44 +0000
@@ -104,6 +104,13 @@
 
     user_defined_fields = List(
         title=_("Sequence of user-defined fields as key-value pairs."))
+
+    homepage = TextLine(
+        title=_("Homepage"),
+        description=_(
+        "Upstream project homepage."),
+        required=False)
+
     # read-only properties
     name = Attribute('The sourcepackagename for this release, as text')
     title = Attribute('The title of this sourcepackagerelease')

=== modified file 'lib/lp/soyuz/model/binarypackagerelease.py'
--- lib/lp/soyuz/model/binarypackagerelease.py	2010-08-21 13:56:34 +0000
+++ lib/lp/soyuz/model/binarypackagerelease.py	2010-08-22 17:28:44 +0000
@@ -81,6 +81,7 @@
     installedsize = IntCol(dbName='installedsize')
     architecturespecific = BoolCol(dbName='architecturespecific',
                                    notNull=True)
+    homepage = StringCol(dbName='homepage')
     datecreated = UtcDateTimeCol(notNull=True, default=UTC_NOW)
     debug_package = ForeignKey(dbName='debug_package',
                               foreignKey='BinaryPackageRelease')

=== modified file 'lib/lp/soyuz/model/sourcepackagerelease.py'
--- lib/lp/soyuz/model/sourcepackagerelease.py	2010-08-21 13:56:34 +0000
+++ lib/lp/soyuz/model/sourcepackagerelease.py	2010-08-22 17:28:44 +0000
@@ -146,6 +146,7 @@
     build_conflicts = StringCol(dbName='build_conflicts')
     build_conflicts_indep = StringCol(dbName='build_conflicts_indep')
     architecturehintlist = StringCol(dbName='architecturehintlist')
+    homepage = StringCol(dbName='homepage')
     format = EnumCol(dbName='format', schema=SourcePackageType,
         default=SourcePackageType.DPKG, notNull=True)
     upload_distroseries = ForeignKey(foreignKey='DistroSeries',


Follow ups