unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Nicolas Graves via Guix-patches via <guix-patches@gnu.org>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: 73439@debbugs.gnu.org
Subject: [bug#73439] [PATCH v5 1/5] import: Add %libreoffice-updater.
Date: Fri, 18 Oct 2024 16:29:48 +0200	[thread overview]
Message-ID: <87ed4dv603.fsf@ngraves.fr> (raw)
In-Reply-To: <87o73hpp70.fsf@gnu.org>

On 2024-10-18 14:31, Ludovic Courtès wrote:

> Hi,
>
> Nicolas Graves <ngraves@ngraves.fr> skribis:
>
>> Change-Id: I481b1175db531c4fea4a57838fe190f679cd1a85
>> ---
>>  Makefile.am                 |  1 +
>>  guix/import/libreoffice.scm | 98 +++++++++++++++++++++++++++++++++++++
>
> Neat.  Could you add a test, an @item in doc/guix.texi next to the other
> updaters, and a commit log?
>
>> +(define (libreoffice-latest-version)
>
> Please add a docstring to all top-level procedures.
>
>> +  (let* ((response port (http-get libreoffice-latest-url
>> +                                  #:streaming? #t))
>> +         (content (get-string-all port))
>
> PORT is not closed.  If you’re going to load it all in memory, just
> leave #:streaming? to #f and you’ll get a string instead of a port.
>
>> +         ;; xml->sxml is not flexible enough for html.
>> +         ;; For instance, <img> tags don't have closing </img>.
>> +         ;; This trick preprocesses html to extract all <a> tags in
>> +         ;; a <body> wrapper, which sxml-match can handle well.
>> +         (xml (xml->sxml
>> +               (string-append
>> +                "<body><"
>> +                (string-join
>> +                 (filter (cute string-prefix? "a " <>)
>> +                         (string-split content #\<))
>> +                 "</a><")
>> +                "></a></body>")
>> +               #:trim-whitespace? #t)))
>
> This is terrible.  :-)
>
> (guix import go) and (guix gnu-maintenance) use (htmlprag) for that.
> Would that work for you?

No issue for that, but I don't get how this works by looking at the
source code only, hence my dirty hacks ;)

> Thinking about it, the strategy looks very similar to that of the
> ‘generic-html’ updater.
>
> Would it be enough to add a ‘release-monitoring-url’ property to the
> relevant LibreOffice packages?

Actually now I don't really now anymore what was possible and what was
not. I remember trying and successfully updating libreoffice without
this patch once, but not able to reproduce.

With more experimentation :
- the current release-monitoring-url is able to update to the
latest-version, but isn't able to udpate to a --target-version
- same thing for my libreoffice-latest-url

I guess we don't want to maintain this code if we are able to keep being
up-to-date. Let's skip this commit and merge others once QA is done with
them. I can always cherry-pick this patch in the future if I need it.

>
> Thanks,
> Ludo’.
>
>
>

-- 
Best regards,
Nicolas Graves




  reply	other threads:[~2024-10-18 14:31 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-23 12:15 [bug#73439] [PATCH 00/10] Update libreoffice to its latest version Nicolas Graves via Guix-patches via
2024-09-23 12:37 ` [bug#73439] [PATCH 01/10] import: Add %libreoffice-updater Nicolas Graves via Guix-patches via
2024-09-23 12:37   ` [bug#73439] [PATCH 02/10] gnu: libreoffice: Update to 24.2.0.3 Nicolas Graves via Guix-patches via
2024-09-23 12:37   ` [bug#73439] [PATCH 03/10] gnu: libreoffice: Update to 24.2.1.2 Nicolas Graves via Guix-patches via
2024-09-23 12:37   ` [bug#73439] [PATCH 04/10] gnu: libreoffice: Update to 24.2.2.2 Nicolas Graves via Guix-patches via
2024-09-23 12:37   ` [bug#73439] [PATCH 05/10] gnu: libreoffice: Update to 24.2.3.2 Nicolas Graves via Guix-patches via
2024-09-23 12:37   ` [bug#73439] [PATCH 06/10] gnu: libreoffice: Update to 24.2.4.2 Nicolas Graves via Guix-patches via
2024-09-23 12:37   ` [bug#73439] [PATCH 07/10] gnu: libreoffice: Update to 24.2.5.2 Nicolas Graves via Guix-patches via
2024-09-23 12:37   ` [bug#73439] [PATCH 08/10] gnu: libreoffice: Update to 24.2.6.2 Nicolas Graves via Guix-patches via
2024-09-23 12:37   ` [bug#73439] [PATCH 09/10] gnu: libreoffice: Update to 24.8.1.2 Nicolas Graves via Guix-patches via
2024-09-23 12:37   ` [bug#73439] [PATCH 10/10] gnu: hunspell-dictionaries: " Nicolas Graves via Guix-patches via
2024-09-23 18:35 ` [bug#73439] [PATCH 00/10] Update libreoffice to its latest version Liliana Marie Prikler
2024-09-24 14:29   ` Nicolas Graves via Guix-patches via
2024-09-24 17:03     ` Liliana Marie Prikler
2024-09-25  7:52       ` Nicolas Graves via Guix-patches via
2024-09-25 15:43         ` Liliana Marie Prikler
2024-10-14 13:31         ` Simon Josefsson via Guix-patches via
2024-10-16 15:26           ` Nicolas Graves via Guix-patches via
2024-09-25  7:40 ` [bug#73439] [PATCH v2 1/5] import: Add %libreoffice-updater Nicolas Graves via Guix-patches via
2024-09-25  7:40   ` [bug#73439] [PATCH v2 2/5] gnu: libreoffice: Update to 24.2.0.3 Nicolas Graves via Guix-patches via
2024-09-25  7:40   ` [bug#73439] [PATCH v2 3/5] gnu: libreoffice: Update to 24.8.1.2 Nicolas Graves via Guix-patches via
2024-09-25  7:40   ` [bug#73439] [PATCH v2 4/5] gnu: hunspell-dictionaries: " Nicolas Graves via Guix-patches via
2024-09-25  7:40   ` [bug#73439] [PATCH v2 5/5] gnu: Add libreoffice-lts Nicolas Graves via Guix-patches via
2024-09-26  7:50 ` [bug#73439] [PATCH v3 1/4] import: Add %libreoffice-updater Nicolas Graves via Guix-patches via
2024-09-26  7:50   ` [bug#73439] [PATCH v3 2/4] gnu: libreoffice: Update to 24.2.0.3 Nicolas Graves via Guix-patches via
2024-09-26  7:50   ` [bug#73439] [PATCH v3 3/4] gnu: libreoffice: Update to 24.2.6.2 Nicolas Graves via Guix-patches via
2024-09-26  7:50   ` [bug#73439] [PATCH v3 4/4] gnu: hunspell-dictionary: " Nicolas Graves via Guix-patches via
2024-10-01 14:54 ` [bug#73439] [PATCH v4 1/4] import: Add %libreoffice-updater Nicolas Graves via Guix-patches via
2024-10-01 14:54   ` [bug#73439] [PATCH v4 2/4] gnu: libreoffice: Update to 24.2.0.3 Nicolas Graves via Guix-patches via
2024-10-01 14:54   ` [bug#73439] [PATCH v4 3/4] gnu: libreoffice: Update to 24.2.6.2 Nicolas Graves via Guix-patches via
2024-10-01 14:54   ` [bug#73439] [PATCH v4 4/4] gnu: hunspell-dictionary: " Nicolas Graves via Guix-patches via
2024-10-16 17:07 ` [bug#73439] [PATCH v5 1/5] import: Add %libreoffice-updater Nicolas Graves via Guix-patches via
2024-10-16 17:07   ` [bug#73439] [PATCH v5 2/5] gnu: libreoffice: Update to 24.2.0.3 Nicolas Graves via Guix-patches via
2024-10-16 17:07   ` [bug#73439] [PATCH v5 3/5] gnu: libreoffice: Update to 24.2.6.2 Nicolas Graves via Guix-patches via
2024-10-16 17:07   ` [bug#73439] [PATCH v5 4/5] gnu: libreoffice: Update to 24.8.2.1 Nicolas Graves via Guix-patches via
2024-10-16 17:07   ` [bug#73439] [PATCH v5 5/5] gnu: hunspell-dictionary: " Nicolas Graves via Guix-patches via
2024-10-18 12:31   ` [bug#73439] [PATCH v5 1/5] import: Add %libreoffice-updater Ludovic Courtès
2024-10-18 14:29     ` Nicolas Graves via Guix-patches via [this message]
2024-10-21 15:40       ` 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=87ed4dv603.fsf@ngraves.fr \
    --to=guix-patches@gnu.org \
    --cc=73439@debbugs.gnu.org \
    --cc=ludo@gnu.org \
    --cc=ngraves@ngraves.fr \
    /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).