GNU bug report logs - #74206
[PATCH] gnu: Fix java-jaxen.

Previous Next

Package: guix-patches;

Reported by: Hartmut Goebel <h.goebel <at> crazy-compilers.com>

Date: Mon, 4 Nov 2024 21:27:02 UTC

Severity: normal

Tags: patch

Done: Hartmut Goebel <h.goebel <at> crazy-compilers.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 74206 in the body.
You can then email your comments to 74206 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#74206; Package guix-patches. (Mon, 04 Nov 2024 21:27:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Hartmut Goebel <h.goebel <at> crazy-compilers.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Mon, 04 Nov 2024 21:27:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Hartmut Goebel <h.goebel <at> crazy-compilers.com>
To: guix-patches <at> gnu.org
Subject: [PATCH] gnu: Fix java-jaxen.
Date: Mon,  4 Nov 2024 22:26:25 +0100
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





Information forwarded to guix-patches <at> gnu.org:
bug#74206; Package guix-patches. (Fri, 08 Nov 2024 10:59:01 GMT) Full text and rfc822 format available.

Message #8 received at 74206 <at> debbugs.gnu.org (full text, mbox):

From: Liliana Marie Prikler <liliana.prikler <at> gmail.com>
To: Hartmut Goebel <h.goebel <at> crazy-compilers.com>, 74206 <at> debbugs.gnu.org
Subject: Re: [PATCH] gnu: Fix java-jaxen.
Date: Fri, 08 Nov 2024 11:57:34 +0100
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




Information forwarded to guix-patches <at> gnu.org:
bug#74206; Package guix-patches. (Fri, 08 Nov 2024 14:48:02 GMT) Full text and rfc822 format available.

Message #11 received at 74206 <at> debbugs.gnu.org (full text, mbox):

From: Hartmut Goebel <h.goebel <at> crazy-compilers.com>
To: Liliana Marie Prikler <liliana.prikler <at> gmail.com>, 74206 <at> debbugs.gnu.org
Subject: Re: [PATCH] gnu: Fix java-jaxen.
Date: Fri, 8 Nov 2024 15:47:46 +0100
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 <at> crazy-compilers.com               |
| www.crazy-compilers.com | compilers which you thought are impossible |





Information forwarded to guix-patches <at> gnu.org:
bug#74206; Package guix-patches. (Fri, 08 Nov 2024 14:57:01 GMT) Full text and rfc822 format available.

Message #14 received at 74206 <at> debbugs.gnu.org (full text, mbox):

From: Liliana Marie Prikler <liliana.prikler <at> gmail.com>
To: Hartmut Goebel <h.goebel <at> crazy-compilers.com>, 74206 <at> debbugs.gnu.org
Subject: Re: [PATCH] gnu: Fix java-jaxen.
Date: Fri, 08 Nov 2024 15:56:14 +0100
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




Information forwarded to guix-patches <at> gnu.org:
bug#74206; Package guix-patches. (Tue, 19 Nov 2024 23:53:01 GMT) Full text and rfc822 format available.

Message #17 received at 74206 <at> debbugs.gnu.org (full text, mbox):

From: Hartmut Goebel <h.goebel <at> crazy-compilers.com>
To: 74206 <at> debbugs.gnu.org
Subject: [PATCH v2] gnu: Fix java-jaxen.
Date: Wed, 20 Nov 2024 00:52:49 +0100
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 removing the #:phases argument for java-jaxen and thus make guix
use the default phases.

* gnu/packages/java-xml.scm (java-jaxen)[arguments]: Remove #:phases.
, making
---
 gnu/packages/java-xml.scm | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/gnu/packages/java-xml.scm b/gnu/packages/java-xml.scm
index 9ec11fa83e..0153e26ef8 100644
--- a/gnu/packages/java-xml.scm
+++ b/gnu/packages/java-xml.scm
@@ -241,6 +241,10 @@ (define-public java-jaxen
   (package
     (inherit java-jaxen-bootstrap)
     (name "java-jaxen")
+    (arguments
+     (strip-keyword-arguments
+      '(#:phases)  ;; remove any phases added by java-jaxen-bootstrap
+      (package-arguments java-jaxen-bootstrap)))
     (inputs
      (list java-jdom java-xom java-dom4j))))
 

base-commit: 33665c52c4670bc3b4d337c89ac9cc6c4c69b26f
-- 
2.41.1





Reply sent to Hartmut Goebel <h.goebel <at> crazy-compilers.com>:
You have taken responsibility. (Thu, 05 Dec 2024 21:39:02 GMT) Full text and rfc822 format available.

Notification sent to Hartmut Goebel <h.goebel <at> crazy-compilers.com>:
bug acknowledged by developer. (Thu, 05 Dec 2024 21:39:02 GMT) Full text and rfc822 format available.

Message #22 received at 74206-close <at> debbugs.gnu.org (full text, mbox):

From: Hartmut Goebel <h.goebel <at> crazy-compilers.com>
To: 74206-close <at> debbugs.gnu.org
Subject: Re: [PATCH v2] gnu: Fix java-jaxen.
Date: Thu, 5 Dec 2024 22:38:25 +0100
[Message part 1 (text/plain, inline)]
pushed as d75d1fe6ac7ded7e61322d18b07d347beb609aa0
[Message part 2 (text/html, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 03 Jan 2025 12:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 163 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.