From: Thomas Perrot <[email protected]> The cargo sparse index marks yanked crate versions with "yanked": true. Treat those the same way as non-existing versions so that version checking never promotes a yanked release as the latest one.
Signed-off-by: Thomas Perrot <[email protected]> --- lib/bb/fetch2/crate.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/bb/fetch2/crate.py b/lib/bb/fetch2/crate.py index b89817ab94d5..d84bae0bcd1e 100644 --- a/lib/bb/fetch2/crate.py +++ b/lib/bb/fetch2/crate.py @@ -178,7 +178,8 @@ class Crate(Wget): response = self._fetch_index(ud.versionsurl, ud, d) for line in response.splitlines(): data = json.loads(line) - versions.append((0, data["vers"], "")) + if not data.get("yanked", False): + versions.append((0, data["vers"], "")) versions = sorted(versions, key=cmp_to_key(bb.utils.vercmp)) return (versions[-1][1], "") -- 2.54.0
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#236592): https://lists.openembedded.org/g/openembedded-core/message/236592 Mute This Topic: https://lists.openembedded.org/mt/119197956/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
