Use the line numbers to make the package deduplication more stable
Previously this would just compare on the version if the name was the same, but there are package definitions that share the name and version (itstool is one example). To try and make this more stable, to avoid weird errors, and unstable comparisons between revisions, use the line number when deduplicating packages.
This commit is contained in:
parent
a66cbd41f9
commit
1ab6ecd64f
1 changed files with 12 additions and 2 deletions
|
|
@ -499,8 +499,18 @@ WHERE job_id = $1"
|
|||
(let ((a-name (inferior-package-name a))
|
||||
(b-name (inferior-package-name b)))
|
||||
(if (string=? a-name b-name)
|
||||
(string<? (inferior-package-version a)
|
||||
(inferior-package-version b))
|
||||
(let ((a-version (inferior-package-version a))
|
||||
(b-version (inferior-package-version b)))
|
||||
(if (string=? a-version b-version)
|
||||
;; The name and version are the same, so try and pick
|
||||
;; the same package each time, by looking at the
|
||||
;; location.
|
||||
(let ((a-location (inferior-package-location a))
|
||||
(b-location (inferior-package-location b)))
|
||||
(< (location-line a-location)
|
||||
(location-line b-location)))
|
||||
(string<? (inferior-package-version a)
|
||||
(inferior-package-version b))))
|
||||
(string<? a-name
|
||||
b-name)))))))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue