[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
06/12: gnu: QtWebEngine: Simplify code to remove third-party files.
From: |
guix-commits |
Subject: |
06/12: gnu: QtWebEngine: Simplify code to remove third-party files. |
Date: |
Thu, 1 Dec 2022 18:25:09 -0500 (EST) |
mbakke pushed a commit to branch master
in repository guix.
commit 84c577d7a7046c2d675d674c301ae1f4684a80bd
Author: Marius Bakke <marius@gnu.org>
AuthorDate: Mon Nov 28 05:02:05 2022 +0100
gnu: QtWebEngine: Simplify code to remove third-party files.
* gnu/packages/qt.scm (remove-third-party-files): Simplify some procedures.
---
gnu/packages/qt.scm | 20 +++++++-------------
1 file changed, 7 insertions(+), 13 deletions(-)
diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index 31acacff80..0f5e1c3530 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -2284,8 +2284,7 @@ using the Enchant spell-checking library.")
#~(begin
(define preserved-club
;; Prefix exceptions with ./ for comparison with ftw.
- (map (lambda (member)
- (string-append "./" member))
+ (map (cut string-append "./" <>)
preserved-third-party-files))
(define protected (make-regexp "\\.(gn|gyp)i?$"))
(define (empty? dir)
@@ -2298,17 +2297,12 @@ using the Enchant spell-checking library.")
(define (parents child)
;; Return all parent directories of CHILD up to and including
;; the closest "third_party".
- (let* ((dirs (match (string-split child #\/)
- ((dirs ... last) dirs)))
- (closest (list-index (lambda (dir)
- (string=? "third_party" dir))
- (reverse dirs)))
- (delim (- (length dirs) closest)))
- (fold (lambda (dir prev)
- (cons (string-append (car prev) "/" dir)
- prev))
- (list (string-join (list-head dirs delim) "/"))
- (list-tail dirs delim))))
+ (let loop ((parent (dirname child))
+ (parents '()))
+ (if (string=? "third_party" (basename parent))
+ (cons parent parents)
+ (loop (dirname parent)
+ (cons parent parents)))))
(define (remove-loudly file)
(format #t "deleting ~a...~%" file)
(force-output)
- branch master updated (00ddf185e6 -> 2775bb95c7), guix-commits, 2022/12/01
- 03/12: gnu: gn: Remove input labels., guix-commits, 2022/12/01
- 07/12: gnu: svt-av1: Update to 1.3.0., guix-commits, 2022/12/01
- 06/12: gnu: QtWebEngine: Simplify code to remove third-party files.,
guix-commits <=
- 01/12: gnu: balsa: Fix build., guix-commits, 2022/12/01
- 05/12: gnu: qtwebengine@6: Fix third-party code removal snippet., guix-commits, 2022/12/01
- 10/12: gnu: harfbuzz: Add 5.3.1., guix-commits, 2022/12/01
- 12/12: gnu: ungoogled-chromium: Update to 108.0.5359.71-1., guix-commits, 2022/12/01
- 08/12: gnu: balsa: Add release-monitoring-url., guix-commits, 2022/12/01
- 09/12: gnu: balsa: Update to 2.6.4., guix-commits, 2022/12/01
- 02/12: gnu: gn: Update to 0.0-2072.1c4151f., guix-commits, 2022/12/01
- 11/12: gnu: ungoogled-chromium: Generalize OpenJPEG substitution., guix-commits, 2022/12/01
- 04/12: gnu: gn: Use G-expression., guix-commits, 2022/12/01