[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#55424] [PATCH 002/602] etc/committer: Prefix (sxml xpath) symbols t
From: |
Maxim Cournoyer |
Subject: |
[bug#55424] [PATCH 002/602] etc/committer: Prefix (sxml xpath) symbols to avoid name conflict. |
Date: |
Sun, 15 May 2022 00:36:29 -0400 |
This avoids a naming conflict for 'filter', provided by both (srfi srfi-1)
and (sxml xpath).
* etc/committer.scm.in: Use 'use-modules' instead of 'import', and use a
prefix for the (sxml xpath) module.
(new-sexp): Adjust accordingly.
(change-commit-message): Likewise.
---
etc/committer.scm.in | 33 +++++++++++++++++----------------
1 file changed, 17 insertions(+), 16 deletions(-)
diff --git a/etc/committer.scm.in b/etc/committer.scm.in
index 5a57d51577..3b37320e89 100755
--- a/etc/committer.scm.in
+++ b/etc/committer.scm.in
@@ -6,6 +6,7 @@
;;; Copyright © 2020, 2021 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2021 Sarah Morgensen <iskarian@mgsn.dev>
;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz>
+;;; Copyright © 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -28,19 +29,19 @@
;;; Code:
-(import (sxml xpath)
- (srfi srfi-1)
- (srfi srfi-2)
- (srfi srfi-9)
- (srfi srfi-11)
- (srfi srfi-26)
- (ice-9 format)
- (ice-9 popen)
- (ice-9 match)
- (ice-9 rdelim)
- (ice-9 regex)
- (ice-9 textual-ports)
- (guix gexp))
+(use-modules ((sxml xpath) #:prefix xpath:)
+ (srfi srfi-1)
+ (srfi srfi-2)
+ (srfi srfi-9)
+ (srfi srfi-11)
+ (srfi srfi-26)
+ (ice-9 format)
+ (ice-9 popen)
+ (ice-9 match)
+ (ice-9 rdelim)
+ (ice-9 regex)
+ (ice-9 textual-ports)
+ (guix gexp))
(define* (break-string str #:optional (max-line-length 70))
"Break the string STR into lines that are no longer than MAX-LINE-LENGTH.
@@ -214,10 +215,10 @@ (define (new-sexp hunk)
(define* (change-commit-message file-name old new #:optional (port
(current-output-port)))
"Print ChangeLog commit message for changes between OLD and NEW."
(define (get-values expr field)
- (match ((sxpath `(// ,field quasiquote *)) expr)
+ (match ((xpath:sxpath `(// ,field quasiquote *)) expr)
(()
;; New-style plain lists
- (match ((sxpath `(// ,field list *)) expr)
+ (match ((xpath:sxpath `(// ,field list *)) expr)
((inner) inner)
(_ '())))
;; Old-style labelled inputs
@@ -234,7 +235,7 @@ (define (listify items)
(define variable-name
(second old))
(define version
- (and=> ((sxpath '(// version *any*)) new)
+ (and=> ((xpath:sxpath '(// version *any*)) new)
first))
(format port
"gnu: ~a: Update to ~a.~%~%* ~a (~a): Update to ~a.~%"
--
2.36.0
- [bug#55424] [PATCH 000/602] Purge Python 2 packages, Maxim Cournoyer, 2022/05/15
- [bug#55424] [PATCH 001/602] packages: Fix typo in package-superseded doc., Maxim Cournoyer, 2022/05/15
- [bug#55424] [PATCH 004/602] utils: Add a 'delete-expression' procedure., Maxim Cournoyer, 2022/05/15
- [bug#55424] [PATCH 002/602] etc/committer: Prefix (sxml xpath) symbols to avoid name conflict.,
Maxim Cournoyer <=
- [bug#55424] [PATCH 003/602] etc/committer: Teach it how to commit package removal., Maxim Cournoyer, 2022/05/15
- [bug#55424] [PATCH 005/602] utils: Add a %guix-source-root-directory procedure., Maxim Cournoyer, 2022/05/15
- [bug#55424] [PATCH 007/602] gnu: Remove python-pytest-runner-2., Maxim Cournoyer, 2022/05/15
- [bug#55424] [PATCH 033/602] gnu: Remove python2-nose-timer., Maxim Cournoyer, 2022/05/15
- [bug#55424] [PATCH 006/602] diagnostics: Fix typo about 0-indexed COL in location., Maxim Cournoyer, 2022/05/15
- [bug#55424] [PATCH 008/602] gnu: Remove python2-langkit., Maxim Cournoyer, 2022/05/15
- [bug#55424] [PATCH 009/602] gnu: Remove graphios., Maxim Cournoyer, 2022/05/15
- [bug#55424] [PATCH 034/602] gnu: Remove python2-pytest-catchlog., Maxim Cournoyer, 2022/05/15
- [bug#55424] [PATCH 084/602] gnu: Remove python2-pygpgme., Maxim Cournoyer, 2022/05/15
- [bug#55424] [PATCH 080/602] gnu: Remove python2-tmx., Maxim Cournoyer, 2022/05/15