unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Royce Strange <royball@disroot.org>
To: Tobias Geerinckx-Rice <me@tobias.gr>
Cc: 36394@debbugs.gnu.org
Subject: bug#36394: guix.gnu.org/packages lists incorrect sqlite versions
Date: Thu, 11 Jun 2020 01:07:40 -0500	[thread overview]
Message-ID: <87lfkurv83.fsf@disroot.org> (raw)
In-Reply-To: <87ftnwcixr.fsf@nckx> (Tobias Geerinckx-Rice's message of "Wed, 26 Jun 2019 20:14:56 +0200")

[-- Attachment #1: Type: text/plain, Size: 1128 bytes --]

Tobias Geerinckx-Rice <me@tobias.gr> writes:

> Guix,
>
> The package list at <https://guix.gnu.org/packages/S/page/4/> displays
> the wrong versions for sqlite:
>
>  sqlite 3.26.0
>  sqlite 3.26.0
>  sqlite-with-column-metadata 3.26.0
>
> Which should be:
>
>  $ guix pull && guix package -A ^sqlite
>  sqlite	3.26.0	…
>  sqlite	3.24.0	…
>  sqlite-with-column-metadata	3.24.0	…

It looks like the duplicates happen to replaced packages:
https://guix.gnu.org/packages/G/page/9/
(see gnutls, as sqlite is one package now)

Narrowed it down to the code that generates the packages list 
for the website in the guix-artwork repo.

It looks like the original intent was to filter out replaced packages,
instead of keeping them in the list (which is what guix search does).
This will affect https://guix.gnu.org/packages.json which I believe feeds
guix package information in repology.

Attached is a patch to filter out the replaced packages.
If it is more appropriate for the website to be consistent with 
guix search and keep replaced packages in the list, 
I can submit an updated patch.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-website-Fix-duplicated-packages-in-the-package-list.patch --]
[-- Type: text/x-patch, Size: 1500 bytes --]

From aac774421d5b746e633138c78768dcadb6be1650 Mon Sep 17 00:00:00 2001
From: Royce Strange <royball@disroot.org>
Date: Thu, 11 Jun 2020 00:41:45 -0500
Subject: [PATCH] website: Fix duplicated packages in the package-list

Fixes <https://bugs.gnu.org/36394>.

* website/apps/packages/data.scm (%package-list):
Filter out replaced packages.
---
 website/apps/packages/data.scm | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/website/apps/packages/data.scm b/website/apps/packages/data.scm
index f1fa55d..d1bbc92 100644
--- a/website/apps/packages/data.scm
+++ b/website/apps/packages/data.scm
@@ -41,11 +41,10 @@
            (sort (parameterize ((%package-module-path (last-pair
                                                        (%package-module-path))))
                    (fold-packages (lambda (package lst)
-                                    (if (package-superseded package)
+                                    (if (or (package-superseded package)
+                                            (package-replacement package))
                                         lst
-                                        (cons (or (package-replacement package)
-                                                  package)
-                                              lst)))
+                                        (cons package lst)))
                                   '()))
                  (lambda (p1 p2)
                    (string<? (package-name p1)
-- 
2.26.2


  reply	other threads:[~2020-06-11  6:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-26 18:14 bug#36394: guix.gnu.org/packages lists incorrect sqlite versions Tobias Geerinckx-Rice
2020-06-11  6:07 ` Royce Strange [this message]
2020-06-13 20:43   ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87lfkurv83.fsf@disroot.org \
    --to=royball@disroot.org \
    --cc=36394@debbugs.gnu.org \
    --cc=me@tobias.gr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).