From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms1.migadu.com with LMTPS id sPw3G+4lMmZsUQAAe85BDQ:P1 (envelope-from ) for ; Wed, 01 May 2024 13:22:22 +0200 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id sPw3G+4lMmZsUQAAe85BDQ (envelope-from ) for ; Wed, 01 May 2024 13:22:22 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=q4MvBQSm; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1714562542; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=C2FJzYHUcxdmPTbw3okK19E8JplzycTD1Qoy0VrUdo0=; b=P03PLWFeXUgDPS3ozj1cuGtX/+V+rQx+NAJcB901Prs8B0KcUBhnab3a0bkhaRZMRnyfdQ Syjv+I5KSohMSPNzDYIfOupXVu4fBgvTSRhE7Ip8Jht36N4XcgzG5fXPHiSOBhmF415eYm ICxGbG61skAIiMAImGupNy7zjwYhKZdGaW0hCsQfufyGx9Ya6JUmIrxi1XbqIOCOM3o91l yBQp4FRE0ASsxayFiKOsOfGneXXDAbbIvnWF+0rTrgbax0d+LWW8X4fBbvtu741kkTuprY lt+KR8nxxWCiHi/30ufE0VRO54VoXaUMxvbjBlBj+2EXhJuzZyXT+92E9Y1lbA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=q4MvBQSm; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Seal: i=1; s=key1; d=yhetil.org; t=1714562542; a=rsa-sha256; cv=none; b=aG2nSBtKL0LBG5xviqn6vnBwNQ/fZb6lYyoX/aMbQP/VuWPAySHdwWj3yVBz8THtatU5oR rj/eUFnhLA1D1hNBPh0ZcKt3SMySXncWdrbIVLY9qXOkK+1gccVWeXWg9nGMXASRik3/iu 43AJxHFcJux6mypt5WML409SwJluF1nHF6wxONHte7/1/6oXqeSdYKQ/h9G7KJEkvvdaeo P2+I6N0hjOLwzLaaEU8HtzC8Cye545b1h8qGo7KVj0TOGtzIVCWOowpxy+17E4zZXuLZIt IJsNTKY+sWJ8llCbR8PSdOLbLu0oaABUnvc49k2Frz8ZLFl+DS45X9B14EElgQ== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 5859214975 for ; Wed, 1 May 2024 13:22:22 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s27FX-0008IW-FV; Wed, 01 May 2024 06:31:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s27FV-0008Hs-4z for guix-patches@gnu.org; Wed, 01 May 2024 06:31:41 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s27FU-0005G0-OP for guix-patches@gnu.org; Wed, 01 May 2024 06:31:40 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s27Fp-0004rH-JM for guix-patches@gnu.org; Wed, 01 May 2024 06:32:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#70499] [PATCH] utils: Add find-unordered-packages procedure. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 01 May 2024 10:32:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70499 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Herman Rimm Cc: Josselin Poiret , Simon Tournier , Mathieu Othacehe , Tobias Geerinckx-Rice , Ricardo Wurmus , Christopher Baines , 70499@debbugs.gnu.org Received: via spool by 70499-submit@debbugs.gnu.org id=B70499.171455946518622 (code B ref 70499); Wed, 01 May 2024 10:32:01 +0000 Received: (at 70499) by debbugs.gnu.org; 1 May 2024 10:31:05 +0000 Received: from localhost ([127.0.0.1]:36648 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s27Ev-0004qI-5F for submit@debbugs.gnu.org; Wed, 01 May 2024 06:31:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36128) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s27Er-0004pv-Qc for 70499@debbugs.gnu.org; Wed, 01 May 2024 06:31:04 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s27EK-00058Z-L8; Wed, 01 May 2024 06:30:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=C2FJzYHUcxdmPTbw3okK19E8JplzycTD1Qoy0VrUdo0=; b=q4MvBQSmOLYVJD1Ptc6H v1h1bDfSmN0/k879SVp+N+4RLn/Et6ft5DKccRnVYG1eHBiFcz0MQ5w4q4kDOFi9JPlwuLb0bDx9w aJv27VeVk92AXmdx1Tm7Hldec/YjA3+zBrHFKiS7bjcPtVw0di9jgPm/33sBVExO4l2dCmC7B96H9 BpTw2HP8pjPI4brHbe1LkTuuVw8lht9VTAeqcmb5/cU0D0CWt892UMuvEE1Le/2G8dfFoS5FX9g4s vj2MfkTi4yn8R8TQCeUAl1VuZe5YrT0I5+QcmGfEefY5LAuN6elE1iJRya9Pr8DWzvbhgmMo92TTz 82QPhb/K3oEHnQ==; From: Ludovic =?UTF-8?Q?Court=C3=A8s?= In-Reply-To: <1f19f015e714d68c84cd91618b1340365c8363bb.1713722288.git.herman@rimm.ee> (Herman Rimm's message of "Sun, 21 Apr 2024 19:59:49 +0200") References: <1f19f015e714d68c84cd91618b1340365c8363bb.1713722288.git.herman@rimm.ee> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: Tridi 13 =?UTF-8?Q?Flor=C3=A9al?= an 232 de la =?UTF-8?Q?R=C3=A9volution,?= jour du =?UTF-8?Q?B=C3=A2ton-d'or?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Wed, 01 May 2024 12:30:20 +0200 Message-ID: <87o79p7rk3.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -5.59 X-Spam-Score: -5.59 X-Migadu-Queue-Id: 5859214975 X-Migadu-Scanner: mx13.migadu.com X-TUID: 8hRdMS35BQfC Hi Herman, Herman Rimm skribis: > * guix/utils.scm (find-unordered-packages): Add and export procedure. > * tests/utils.scm ("find-unordered-packages"): Add test. > > Change-Id: I26ea0fca7d428b192711f75ff3cf5e5a4416b1b6 > --- > Hello, > > I added a procedure which returns the line numbers where packages break > from alphabetical order, e.g.: > > scheme@(guix-user)> (lset-xor eqv? (find-unordered-packages > "gnu/packages/crates-io.scm")) > $1 =3D (626 1153 2693 2715 2840 4074 4139 4187 6099 6243 6382 6896 7677 > 9465 10346 11424 12089 12552 12676 12887 16147 16364 16897 18195 18260 > 19912 21335 22489 22792 23898 24344 24801 25443 25492 26591 27832 > 27944 31206 32365 32502 32609 32770 34281 34913 36192 36320 36621 > 36718 36828 37511 38169 39000 39360 39684 40921 41153 41459 41501 > 42121 42803 42910 44318 44585 46435 47350 47456 47709 48043 49624 > 49905 51084 51216 51560 53586 54473 57062 58925 59048 59134 59584 > 59664 59702 59914 62399 66006 66266 66391 68003 68200 68244 70292 > 70321 71660 71686 71761 72643 73746 73880 74434 74459 77309 77646 > 78136 79569 81722 81896 83802 85617 87167 89037 92212) > > It could be extended to also expect package versions in decreasing > order. Maybe I can use it to sort packages automatically later.=20 Nice. Do you plan to use this procedure in a command-line tool? > +(define (find-unordered-packages file) > + "Return the line numbers of top-level package definitions whose name > +alphabetically preceeds the previous name." My first thought when seeing the name is that this was returning a list of packages, and then I wondered how it differed from =E2=80=98fold-package= s=E2=80=99 and the likes. Maybe call it =E2=80=98package-definition-alphabetical-sort-breakage=E2=80= =99 or something like that? Thanks, Ludo=E2=80=99.