GNU bug report logs -
#73439
[PATCH 00/10] Update libreoffice to its latest version.
Previous Next
Reported by: Nicolas Graves <ngraves <at> ngraves.fr>
Date: Mon, 23 Sep 2024 12:23:02 UTC
Severity: normal
Tags: patch
Done: Ludovic Courtès <ludo <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
On 2024-10-18 14:31, Ludovic Courtès wrote:
> Hi,
>
> Nicolas Graves <ngraves <at> 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
This bug report was last modified 172 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.