mbox series

[bug#57460,00/19] Refresh to specific version

Message ID cover.1661691694.git.h.goebel@crazy-compilers.com
Headers show
Series Refresh to specific version | expand

Message

Hartmut Goebel Aug. 28, 2022, 1:15 p.m. UTC
This series now implements refreshing packages to a specific version,
see <https://lists.gnu.org/archive/html/guix-devel/2022-07/msg00061.html>.

+@example
+$ guix refresh trytond-party
… trytond-party would be upgraded from 6.2.0 to 6.4.0
+$ guix refresh -u trytond-party@6.2.1
…
… trytond-party: updating from version 6.2.0 to version 6.2.1...
…
+@end example


The „main“ part of thhis series does the following:

* All updaters get a new keyword-argument "version"
* Updaters supporting updating to a specific version
  - will pass the version on to call functions and try to update to the
    specific version.
  - "latest-XX-release" functions have been renamed into "import-XX-release"
    to mirror the change
* Updaters not supporting updating to a specific version
  - will issue an error message if a version is given.
  - "latest-XX-release" functions keep the name
  

My plan is to squash the „main” patches into a single one after review (and
extend the commit-message from this post). WDYT?

For testing the change, please run "sh test-import-with-version.sh", which
will update one package for each importer/updater and report about those not
supporting updating to a specific version.


Hartmut Goebel (20):
  upstream-updater: Rename record field.
  import: cpan: Remove unused exports.
  updaters: Issue error-message if version is given:
  import: sourceforge: Issue error-message if version is given.
  refresh: Allow updating to a specific version (gnu-maintenance)
  refresh: Allow updating to a specific version (crate)
  refresh: Allow updating to a specific version (egg)
  refresh: Allow updating to a specific version (git)
  refresh: Allow updating to a specific version (github)
  refresh: Allow updating to a specific version (gnome)
  refresh: Allow updating to a specific version (hexpm)
  refresh: Allow updating to a specific version (kde)
  refresh: Allow updating to a specific version (launchpad)
  refresh: Allow updating to a specific version (pypi)
  refresh: Allow updating to a specific version (script)
  refresh: Allow updating to a specific version (upstream)
  refresh: Allow updating to a specific version (documentation)

These patches will not go into master. Their sole purpose is to carry the code
required to test this patch.

  TEMP REMOVE import: git: Restrict to non-github origins.
  TEMP REMOVE upstream: Output names of importers tried.
  TEMP REMOVE Add test-script for refesh-with-version

 doc/guix.texi               |  13 +++
 guix/gnu-maintenance.scm    | 152 ++++++++++++++++++++++--------------
 guix/import/cpan.scm        |  32 +++-----
 guix/import/cran.scm        |  23 ++++--
 guix/import/crate.scm       |   7 +-
 guix/import/egg.scm         |   7 +-
 guix/import/elpa.scm        |  11 ++-
 guix/import/gem.scm         |  12 ++-
 guix/import/git.scm         |  33 +++++---
 guix/import/github.scm      |  29 ++++---
 guix/import/gnome.scm       |  47 +++++++----
 guix/import/gnu.scm         |   2 +-
 guix/import/hackage.scm     |  12 ++-
 guix/import/hexpm.scm       |   6 +-
 guix/import/kde.scm         |  58 ++++++++------
 guix/import/launchpad.scm   |   7 +-
 guix/import/minetest.scm    |  12 ++-
 guix/import/opam.scm        |  11 ++-
 guix/import/pypi.scm        |  11 +--
 guix/import/stackage.scm    |  10 ++-
 guix/scripts/refresh.scm    |  40 +++++++---
 guix/upstream.scm           |  26 +++---
 test-import-with-version.sh |  98 +++++++++++++++++++++++
 tests/import-github.scm     |   2 +-
 tests/transformations.scm   |   8 +-
 25 files changed, 465 insertions(+), 204 deletions(-)
 create mode 100644 test-import-with-version.sh


base-commit: 84d191ea30eb7d97ee3f4d62f39c811ba77bb187

Comments

M Aug. 28, 2022, 1:30 p.m. UTC | #1
On 28-08-2022 15:15, Hartmut Goebel wrote:

> This series now implements refreshing packages to a specific version,
> see <https://lists.gnu.org/archive/html/guix-devel/2022-07/msg00061.html>.

I have looked at the patches and they all seem reasonable to me 
(although not verified locally) -- only two nitpicks but they don't 
affect the semantics at all.

Greetings,
Maxime.
Ludovic Courtès Sept. 24, 2022, 9:48 a.m. UTC | #2
Hi!

Maxime Devos <maximedevos@telenet.be> skribis:

> On 28-08-2022 15:15, Hartmut Goebel wrote:
>
>> This series now implements refreshing packages to a specific version,
>> see <https://lists.gnu.org/archive/html/guix-devel/2022-07/msg00061.html>.
>
> I have looked at the patches and they all seem reasonable to me
> (although not verified locally) -- only two nitpicks but they don't
> affect the semantics at all.

I had some further comments as you saw, but most of them are cosmetic.
:-)  I think this patch series is a much welcome improvement, and it’s
almost ready.

The one thing that needs to be sorted out is the version syntax in ‘guix
refresh’, but it sounds like we should be able to do that without too
much difficulty.

Apologies for the delay in reviewing, and thanks for this work!

Ludo’.
Hartmut Goebel Nov. 1, 2022, 4:02 p.m. UTC | #3
Am 24.09.22 um 11:48 schrieb Ludovic Courtès:
> The one thing that needs to be sorted out is the version syntax in ‘guix
> refresh’, but it sounds like we should be able to do that without too
> much difficulty.

I addresses this and just submitted an updated version (of this change 
only).

Although I'd prefer '==' two equal-signs instead of just one to be 
future-proof for the case we want to add other specifiers ('<', '<=', 
'>=', >')

> Apologies for the delay in reviewing, and thanks for this work!

Never mind, I was busy anyway ;-)