mbox

[bug#42192,0/3] Improve launchpad updater

Message ID 20200704182548.25280-1-arunisaac@systemreboot.net
Headers show

Message

Arun Isaac July 4, 2020, 6:25 p.m. UTC
This patchset fixes a bug in the launchpad importer, and improves it to
recognize more URLs and extensions. `guix refresh --list-updaters` reports an
improvement in coverage from 0.1% to 0.2%.

On a side note, all our updaters try to detect the URL format through a series
of guesses. But, all our packages already encode information about how to
construct the source URL from the version. If we could somehow tap into that
information, our updaters would be much simpler. Unfortunately, all the uri
fields of packages are strings. We would need them to be functions that take
the version as an argument. This is a major conversion. Is it feasible? Any
better ideas?

Arun Isaac (3):
  import: launchpad: Handle list of source URLs correctly.
  import: launchpad: Recognize the .orig.tar.gz extension.
  import: launchpad: Recognize more URLs.

 guix/import/launchpad.scm | 38 +++++++++++++++++++++++++++++---------
 1 file changed, 29 insertions(+), 9 deletions(-)

Comments

Ludovic Courtès Aug. 31, 2020, 1:29 p.m. UTC | #1
Hi Arun,

Arun Isaac <arunisaac@systemreboot.net> skribis:

> This patchset fixes a bug in the launchpad importer, and improves it to
> recognize more URLs and extensions. `guix refresh --list-updaters` reports an
> improvement in coverage from 0.1% to 0.2%.

All three patches LGTM, thank you!

> On a side note, all our updaters try to detect the URL format through a series
> of guesses. But, all our packages already encode information about how to
> construct the source URL from the version. If we could somehow tap into that
> information, our updaters would be much simpler. Unfortunately, all the uri
> fields of packages are strings. We would need them to be functions that take
> the version as an argument. This is a major conversion. Is it feasible? Any
> better ideas?

I sympathize with the idea, but I think it’s a bit too ambitious.  All
in all, what we currently have seems like a reasonable tradeoff.

Ludo’.
Arun Isaac Sept. 1, 2020, 5:20 p.m. UTC | #2
>> This patchset fixes a bug in the launchpad importer, and improves it to
>> recognize more URLs and extensions. `guix refresh --list-updaters` reports an
>> improvement in coverage from 0.1% to 0.2%.
>
> All three patches LGTM, thank you!

Pushed to master, thanks for the review!

> I sympathize with the idea, but I think it’s a bit too ambitious.  All
> in all, what we currently have seems like a reasonable tradeoff.

Fair enough. :-)