Better split up the comparision functionality

The packages comparison was getting confused by differences in the
derivations, so split the data used to make the comparison more sensible.

This resolves an issue comparing 8dd723f5… and 365892e9… which coinsided with
the fix for importing foreign architecture derivations, meaning that a whole
lot of new derivations appeared in the database. Prior to these changes, it
appeared like every package was new, and with these changes, the list is more
sensible.
This commit is contained in:
Christopher Baines 2020-01-02 20:41:24 +00:00
parent a6302a32ef
commit 83c86431ae
2 changed files with 111 additions and 54 deletions

View file

@ -460,18 +460,19 @@
(build-statuses (assq-ref query-parameters 'build_status)))
(let*
((data
(package-differences-data conn
(commit->revision-id conn base-commit)
(commit->revision-id conn target-commit)
#:systems systems
#:targets targets))
(package-derivation-differences-data
conn
(commit->revision-id conn base-commit)
(commit->revision-id conn target-commit)
#:systems systems
#:targets targets))
(names-and-versions
(package-data->names-and-versions data)))
(package-derivation-data->names-and-versions data)))
(let-values
(((base-packages-vhash target-packages-vhash)
(package-data->package-data-vhashes data)))
(package-derivation-data->package-derivation-data-vhashes data)))
(let ((derivation-changes
(package-data-derivation-changes names-and-versions
(package-derivation-data-changes names-and-versions
base-packages-vhash
target-packages-vhash)))
(case (most-appropriate-mime-type
@ -538,18 +539,18 @@
target-branch
target-datetime))
(data
(package-differences-data conn
(first base-revision-details)
(first target-revision-details)
#:systems systems
#:targets targets))
(package-derivation-differences-data conn
(first base-revision-details)
(first target-revision-details)
#:systems systems
#:targets targets))
(names-and-versions
(package-data->names-and-versions data)))
(package-derivation-data->names-and-versions data)))
(let-values
(((base-packages-vhash target-packages-vhash)
(package-data->package-data-vhashes data)))
(package-derivation-data->package-derivation-data-vhashes data)))
(let ((derivation-changes
(package-data-derivation-changes names-and-versions
(package-derivation-data-changes names-and-versions
base-packages-vhash
target-packages-vhash)))
(case (most-appropriate-mime-type