all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#74206] [PATCH] gnu: Fix java-jaxen.
@ 2024-11-04 21:26 Hartmut Goebel
  2024-11-08 10:57 ` Liliana Marie Prikler
  0 siblings, 1 reply; 4+ messages in thread
From: Hartmut Goebel @ 2024-11-04 21:26 UTC (permalink / raw)
  To: 74206

java-jaxen was missing the dom4j and xom sub-packages. This was caused by
java-jaxen-bootstrap deleting the respective directories (which is okay) and
java-javen not removing the phase that does this.

Solve this by basing java-jaxen-bootstrap on java-jaxen instead of
vice-versa.

* gnu/packages/java-xml.scm (java-jaxen) Define based on former
java-jaxen-bootstrap, while keeping the former's inputs and removing the
later's build-phases. (java-jaxen-bootstrap): Inherit from java-jaxen, keeping
the pre-existing bootstrap build-ohases and inputs.
---
 gnu/packages/java-xml.scm | 36 +++++++++++++++++++-----------------
 1 file changed, 19 insertions(+), 17 deletions(-)

diff --git a/gnu/packages/java-xml.scm b/gnu/packages/java-xml.scm
index 9ec11fa83e..09fdab8c0c 100644
--- a/gnu/packages/java-xml.scm
+++ b/gnu/packages/java-xml.scm
@@ -200,11 +200,9 @@ (define-public java-apache-xml-commons-resolver
 @end itemize")
     (license license:asl2.0)))
 
-;; Jaxen requires java-dom4j and java-xom that in turn require jaxen.
-;; This package is a bootstrap version without dependencies on dom4j and xom.
-(define java-jaxen-bootstrap
+(define-public java-jaxen
   (package
-    (name "java-jaxen-bootstrap")
+    (name "java-jaxen")
     (version "1.1.6")
     (source (origin
               (method url-fetch)
@@ -218,16 +216,9 @@ (define java-jaxen-bootstrap
     (arguments
      `(#:jar-name "jaxen.jar"
        #:source-dir "src"
-       #:tests? #f; no tests
-       #:phases
-       (modify-phases %standard-phases
-         (add-before 'build 'remove-dom4j
-           (lambda _
-             (delete-file-recursively "src/org/jaxen/dom4j")
-             (delete-file-recursively "src/org/jaxen/xom")
-             #t)))))
+       #:tests? #f)) ; no tests
     (inputs
-     `(("java-jdom" ,java-jdom)))
+     (list java-jdom java-xom java-dom4j))
     (home-page "https://github.com/jaxen-xpath/jaxen")
     (synopsis "XPath library")
     (description "Jaxen is an XPath library written in Java.  It is adaptable
@@ -237,12 +228,23 @@ (define java-jaxen-bootstrap
 with XPath too.")
     (license license:bsd-3)))
 
-(define-public java-jaxen
+;; Jaxen requires java-dom4j and java-xom that in turn require jaxen.
+;; This package is a bootstrap version without dependencies on dom4j and xom.
+(define java-jaxen-bootstrap
   (package
-    (inherit java-jaxen-bootstrap)
-    (name "java-jaxen")
+    (inherit java-jaxen)
+    (name "java-jaxen-bootstrap")
+    (arguments
+     (substitute-keyword-arguments (package-arguments java-jaxen)
+       ((#:phases phases '%standard-phases)
+        #~(modify-phases #$phases
+            (add-before 'build 'remove-dom4j
+              (lambda _
+                (delete-file-recursively "src/org/jaxen/dom4j")
+                (delete-file-recursively "src/org/jaxen/xom")
+                #t))))))
     (inputs
-     (list java-jdom java-xom java-dom4j))))
+     (list java-jdom))))
 
 (define-public java-xom
   (package

base-commit: 33665c52c4670bc3b4d337c89ac9cc6c4c69b26f
-- 
2.41.1





^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [bug#74206] [PATCH] gnu: Fix java-jaxen.
  2024-11-04 21:26 [bug#74206] [PATCH] gnu: Fix java-jaxen Hartmut Goebel
@ 2024-11-08 10:57 ` Liliana Marie Prikler
  2024-11-08 14:47   ` Hartmut Goebel
  0 siblings, 1 reply; 4+ messages in thread
From: Liliana Marie Prikler @ 2024-11-08 10:57 UTC (permalink / raw)
  To: Hartmut Goebel, 74206

Am Montag, dem 04.11.2024 um 22:26 +0100 schrieb Hartmut Goebel:
> java-jaxen was missing the dom4j and xom sub-packages. This was
> caused by java-jaxen-bootstrap deleting the respective directories
> (which is okay) and java-javen not removing the phase that does this.
> 
> Solve this by basing java-jaxen-bootstrap on java-jaxen instead of
> vice-versa.
> 
> * gnu/packages/java-xml.scm (java-jaxen) Define based on former
> java-jaxen-bootstrap, while keeping the former's inputs and removing
> the
> later's build-phases. (java-jaxen-bootstrap): Inherit from java-
> jaxen, keeping
> the pre-existing bootstrap build-ohases and inputs.
> ---
The preferred way for bootstrapping is from bottom up.  You can still
remove the phases and add inputs normally.

Cheers




^ permalink raw reply	[flat|nested] 4+ messages in thread

* [bug#74206] [PATCH] gnu: Fix java-jaxen.
  2024-11-08 10:57 ` Liliana Marie Prikler
@ 2024-11-08 14:47   ` Hartmut Goebel
  2024-11-08 14:56     ` Liliana Marie Prikler
  0 siblings, 1 reply; 4+ messages in thread
From: Hartmut Goebel @ 2024-11-08 14:47 UTC (permalink / raw)
  To: Liliana Marie Prikler, 74206

Am 08.11.24 um 11:57 schrieb Liliana Marie Prikler:
> The preferred way for bootstrapping is from bottom up.  You can still
> remove the phases and add inputs normally.

Removing the phase seem less natural than adding a phase. And not 
removing the phase was what caused the error - which got undetected. 
This way round, if for some reason the phase gets lost, bootstrap will 
fail and the issue will be detected.

-- 
Regards
Hartmut Goebel

| Hartmut Goebel          | h.goebel@crazy-compilers.com               |
| www.crazy-compilers.com | compilers which you thought are impossible |





^ permalink raw reply	[flat|nested] 4+ messages in thread

* [bug#74206] [PATCH] gnu: Fix java-jaxen.
  2024-11-08 14:47   ` Hartmut Goebel
@ 2024-11-08 14:56     ` Liliana Marie Prikler
  0 siblings, 0 replies; 4+ messages in thread
From: Liliana Marie Prikler @ 2024-11-08 14:56 UTC (permalink / raw)
  To: Hartmut Goebel, 74206

Am Freitag, dem 08.11.2024 um 15:47 +0100 schrieb Hartmut Goebel:
> Am 08.11.24 um 11:57 schrieb Liliana Marie Prikler:
> > The preferred way for bootstrapping is from bottom up.  You can
> > still remove the phases and add inputs normally.
> 
> Removing the phase seem less natural than adding a phase. And not 
> removing the phase was what caused the error - which got undetected. 
> This way round, if for some reason the phase gets lost, bootstrap
> will fail and the issue will be detected.
You can just write #:phases %standard-phases.

Cheers




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-11-08 14:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-04 21:26 [bug#74206] [PATCH] gnu: Fix java-jaxen Hartmut Goebel
2024-11-08 10:57 ` Liliana Marie Prikler
2024-11-08 14:47   ` Hartmut Goebel
2024-11-08 14:56     ` Liliana Marie Prikler

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.