Part of lp.registry.scripts
The entries will still need to be processed by the cron job that works
out the exact differences. Any pre-existing
entries remain untouched.
|Function||compose_sql_find_latest_source_package_releases||Produce SQL that gets the last-published `SourcePackageRelease`s.|
|Function||compose_sql_find_differences||Produce SQL that finds differences for a
|Function||compose_sql_difference_type||Produce SQL to compute a difference's
|Function||find_derived_series||Find all derived
Produce SQL that gets the last-published `SourcePackageRelease`s. Within `distroseries`, looks for the `SourcePackageRelease` belonging to each respective `SourcePackageName`'s respective latest `SourcePackagePublishingHistory`. For each of those, it produces a tuple consisting of: * `SourcePackageName` id: sourcepackagename * `SourcePackageRelease` id: sourcepackagerelease * Source package version: version. :return: SQL query, as a string.
Produce SQL that finds differences for a `DistroSeries`. The query compares `derived_distroseries` and its `previous_series` and for each package whose latest `SourcePackageRelease`s in the respective series differ, produces a tuple of: * `SourcePackageName` id: sourcepackagename * Source package version in derived series: source_version * Source package version in parent series: parent_source_version. :return: SQL query, as a string.
Create `DistroSeriesDifference` rows based on found differences. Uses field values that describe the difference, as produced by the SQL from `compose_sql_find_differences`: * sourcepackagename * source_version * parent_source_version Existing `DistroSeriesDifference` rows are not affected. :param derived_distroseries: A derived `DistroSeries`. :param temp_table: The name of a table to select the input fields from. :return: SQL query, as a string.
derived_distroseriesto parent, and register differences.
The differences are registered by creating
records, insofar as they do not yet exist.