Commit graph

5 commits

Author SHA1 Message Date
Maxim Cournoyer
5800d2aae2
maint: update-guix-package: Prevent accidentally breaking guix pull.
Fixes <https://issues.guix.gnu.org/43893>.

This changes the 'update-guix-package' tool so that it:

1. Always uses a clean checkout to compute the hash of the updated 'guix'
package.
2. Ensures the commit used in the updated 'guix' package definition has already
been pushed upstream.

* build-aux/update-guix-package.scm (%savannah-guix-git-repo-push-url): New
variable.
(with-input-pipe-to-string, with-temporary-git-worktree): New syntaxes.
(find-origin-remote, git-add-worktree): New procedures.
(commit-already-pushed?): New predicate.
(main): Check the commit used has already been pushed upstream and compute the
hash from a clean checkout.
* doc/contributing.texi (Updating the Guix Package): Document it.
* .dir-locals.el (scheme-mode): Fix indentation of with-temporary-git-worktree.
2020-10-19 14:02:53 -04:00
Vincent Legoll
ccd9107ed9
update-guix-package: Use 'origin-hash'.
* gnu/packages/package-management.scm (main): Use 'origin-hash' instead
of 'origin-sha256'.

Signed-off-by: Tobias Geerinckx-Rice <me@tobias.gr>
2020-05-28 10:21:23 +02:00
Ludovic Courtès
6eac835f17
maint: update-guix-package: Really register GC roots.
Previously we'd pass a relative file name to 'add-indirect-root', which
the daemon would interpret as relative to "/".  Consequently, checkouts
were not protected from GC.

* build-aux/update-guix-package.scm (main): Pass an absolute file name
to 'add-indirect-root'.
2018-12-07 15:14:12 +01:00
Ludovic Courtès
aa1c3a0000
maint: update-guix-package: Protect the checkout from GC.
* build-aux/update-guix-package.scm (main): Define 'root', and call
'add-indirect-root' to protect SOURCE from GC.
2017-05-09 12:58:42 +02:00
Ludovic Courtès
94fa8d7616
maint: Add 'update-guix-package' target.
* build-aux/update-guix-package.scm: New file.
* Makefile.am (EXTRA_DIST): Add it.
(update-guix-package): New target.
(.PHONY): Add it.
* gnu/packages/package-management.scm (guix): Mention it.
2017-05-07 00:18:36 +02:00