summaryrefslogtreecommitdiff
path: root/guix/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'guix/scripts')
-rw-r--r--guix/scripts/package.scm8
1 files changed, 6 insertions, 2 deletions
diff --git a/guix/scripts/package.scm b/guix/scripts/package.scm
index 4673cf18b2..99a6cfaa29 100644
--- a/guix/scripts/package.scm
+++ b/guix/scripts/package.scm
@@ -204,8 +204,12 @@ non-zero relevance score."
(match m2
((package2 . score2)
(if (= score1 score2)
- (string>? (package-full-name package1)
- (package-full-name package2))
+ (if (string=? (package-name package1)
+ (package-name package2))
+ (version>? (package-version package1)
+ (package-version package2))
+ (string>? (package-name package1)
+ (package-name package2)))
(> score1 score2))))))))))
(define (transaction-upgrade-entry store entry transaction)