Subject: bug#75496: closed (Re: bug#75496: Acknowledgement ([PATCH rust-team 1/2] import: crate: Fix find-package-version.))

From: [email-masked] (GNU bug Tracking System)
Date: Sun, 26 Jan 2025 09:10:02 +0000

Your bug report

#75496: [PATCH rust-team 1/2] import: crate: Fix find-package-version.

which was filed against the guix-patches package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
75496: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=75496
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#75496: Acknowledgement ([PATCH rust-team 1/2] import: crate: Fix find-package-version.)
From: Efraim Flashner <[email-masked]>
To: Herman Rimm <[email-masked]>
Cc: Divya Ranjan Pattanaik <[email-masked]>, [email-masked]
Date: Sun, 26 Jan 2025 11:08:48 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

On Sat, Jan 11, 2025 at 04:56:42PM +0100, Herman Rimm wrote:
> Hello,
> 
> Can [PATCH 1/2] be applied/merged to the master branch as well?
> 
> Cheers,
> Herman

They both can be applied to master.

It took me a while to remember what this was about, but I have seen
package updates that downgraded dependent crates to older versions.  I'm
going to miss preferring older versions (that are easier to package)
when it comes to new crates, but it's definitely a change we need.

Patches pushed!

-- 
Efraim Flashner   <[email-masked]>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

Subject: [PATCH rust-team 1/2] import: crate: Fix find-package-version.
From: Herman Rimm <[email-masked]>
To: [email-masked]
Date: Sat, 11 Jan 2025 15:37:06 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

Fixes bug from 5ce1512b0f68cf39cb399623a14302f309c06129, where the
earliest existing package (if any) was returned instead.  See also:

https://issues.guix.gnu.org/68346#3-lineno97

* guix/import/crate.scm (crate->guix-package)[find-package-version]:
Invert boolean expression.

Change-Id: I1d05f55a027241e7c5f62cc98a50a09b5639bdcf
---
 guix/import/crate.scm | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/guix/import/crate.scm b/guix/import/crate.scm
index b4806c8bb22..a7134b85722 100644
--- a/guix/import/crate.scm
+++ b/guix/import/crate.scm
@@ -335,9 +335,9 @@ (define* (crate->guix-package
                           (find-packages-by-name
                            (crate-name->package-name name))))
              (match-lambda* (((semver1 yanked1) (semver2 yanked2))
-                             (or (and yanked1 (not yanked2))
-                                 (and (eq? yanked1 yanked2)
-                                      (semver<? semver1 semver2))))))))
+                             (and (or (not yanked1) yanked2)
+                                  (or (not (eq? yanked1 yanked2))
+                                      (semver>? semver1 semver2))))))))
       (and (not (eq? #f version))
            (match-let (((semver yanked) version))
              (list (semver->string semver) yanked)))))

base-commit: 986245daca2fb50d58cf0f2b9273f0d670d38af2
-- 
2.47.1