GNU bug report logs -
#57749
[patch] maven: fix build with java-slf4j-simple-source expanded
Previous Next
Full log
Message #11 received at 57749 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Julien Lepiller <julien <at> lepiller.eu> writes:
> I don't think checking for file-exists before mkdir-p makes much sense. Doesn't mkdir-p make the same
> checks already?
You’re right — thank you!
> I thought find-files required two arguments? Also the first argument
> could be simplified to input-folder
The second argument is #:optional. But yes, it should be input-folder —
that was the whole point of the first let.
Thank you!
> Otherwise LGTM, but I can't push myself currently. Thanks!
Here’s the updated patch:
[0001-gnu-maven-fix-build-with-java-slf4j-simple-source-ex.patch (text/x-patch, inline)]
From 12164a5b46ad0a5c27c42b426ad94df8f9910b48 Mon Sep 17 00:00:00 2001
From: Arne Babenhauserheide <arne_bab <at> web.de>
Date: Mon, 12 Sep 2022 14:31:42 +0200
Subject: [PATCH] gnu: maven: fix build with java-slf4j-simple-source expanded
* gnu/packages/maven.scm (maven): copy files from source.
---
gnu/packages/maven.scm | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/maven.scm b/gnu/packages/maven.scm
index 28ec4eb9a8..f198c2a475 100644
--- a/gnu/packages/maven.scm
+++ b/gnu/packages/maven.scm
@@ -4,6 +4,7 @@
;;; Copyright © 2019 Björn Höfling <bjoern.hoefling <at> bjoernhoefling.de>
;;; Copyright © 2020 Efraim Flashner <efraim <at> flashner.co.il>
;;; Copyright © 2022 Artyom V. Poptsov <poptsov.artyom <at> gmail.com>
+;;; Copyright © 2022 Arne Babenhauserheide <arne_bab <at> web.de>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -1787,7 +1788,16 @@ (define-public maven-slf4j-provider
(lambda* (#:key inputs #:allow-other-keys)
(mkdir-p "generated-sources")
(with-directory-excursion "generated-sources"
- (invoke "tar" "xf" (assoc-ref inputs "java-slf4j-simple-source"))
+ (let ((input-folder (assoc-ref inputs "java-slf4j-simple-source")))
+ ;; copy all files
+ (for-each (lambda (filename)
+ (let ((target ;; remove folder prefix plus slash
+ (string-drop
+ filename
+ (1+ (string-length input-folder)))))
+ (mkdir-p (dirname target))
+ (copy-file filename target)))
+ (find-files input-folder)))
(for-each delete-file (find-files "." "StaticLoggerBinder.java")))
(for-each
(lambda (simple)
--
2.37.3
[Message part 3 (text/plain, inline)]
Best wishes,
Arne
--
Unpolitisch sein
heißt politisch sein,
ohne es zu merken.
draketo.de
[signature.asc (application/pgp-signature, inline)]
This bug report was last modified 2 years and 238 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.