GNU bug report logs - #70910
xdot has stopped working after update to 1.3

Previous Next

Package: guix;

Reported by: Ada Stevenson <adanskana <at> gmail.com>

Date: Mon, 13 May 2024 05:04:03 UTC

Severity: normal

Done: Sharlatan Hellseher <sharlatanus <at> gmail.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 70910 in the body.
You can then email your comments to 70910 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 bug-guix <at> gnu.org:
bug#70910; Package guix. (Mon, 13 May 2024 05:04:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ada Stevenson <adanskana <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Mon, 13 May 2024 05:04:03 GMT) Full text and rfc822 format available.

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

From: Ada Stevenson <adanskana <at> gmail.com>
To: bug-guix <at> gnu.org
Cc: Ludovic Courtès <ludo <at> gnu.org>
Subject: xdot has stopped working after update to 1.3
Date: Mon, 13 May 2024 04:44:29 +0000
[Message part 1 (text/plain, inline)]
Hi Guix,

I was trying to use `xdot` to view to output of `guix graph` (`guix 
graph bash | xdot -`). However, it crashed instantly with the following 
stack trace:

> dot: No such file or directory
> Traceback (most recent call last):
>   File 
> "/gnu/store/r9mrqfpci65hsypgm7r5kpzxlm6fcd1l-xdot-1.3/bin/.xdot-real", 
> line 33, in <module>
>     sys.exit(load_entry_point('xdot==1.3', 'gui_scripts', 'xdot')())
>   File 
> "/gnu/store/r9mrqfpci65hsypgm7r5kpzxlm6fcd1l-xdot-1.3/lib/python3.10/site-packages/xdot/__main__.py", 
> line 80, in main
>     win.set_dotcode(sys.stdin.buffer.read())
>   File 
> "/gnu/store/r9mrqfpci65hsypgm7r5kpzxlm6fcd1l-xdot-1.3/lib/python3.10/site-packages/xdot/ui/window.py", 
> line 712, in set_dotcode
>     if self.dotwidget.set_dotcode(dotcode, filename):
>   File 
> "/gnu/store/r9mrqfpci65hsypgm7r5kpzxlm6fcd1l-xdot-1.3/lib/python3.10/site-packages/xdot/ui/window.py", 
> line 148, in set_dotcode
>     if self._set_dotcode(dotcode, filename, center=center):
>   File 
> "/gnu/store/r9mrqfpci65hsypgm7r5kpzxlm6fcd1l-xdot-1.3/lib/python3.10/site-packages/xdot/ui/window.py", 
> line 134, in _set_dotcode
>     xdotcode = self.run_filter(dotcode)
>   File 
> "/gnu/store/r9mrqfpci65hsypgm7r5kpzxlm6fcd1l-xdot-1.3/lib/python3.10/site-packages/xdot/ui/window.py", 
> line 129, in run_filter
>     return xdotcode
> UnboundLocalError: local variable 'xdotcode' referenced before assignment

Using `guix time-machine` I was able to identify the regression commit 
as 2aeb9faa421635c0531d96658414e5bf288a3142 
<http://git.savannah.gnu.org/cgit/guix.git/commit/?id=2aeb9faa421635c0531d96658414e5bf288a3142> 
(when Ludo' updated it to 1.3). Using `xdot` within the time machine 
inside the parent commit works.

I've cc'd Ludo' and hopefully we can fix this!

Warmly,

Ada
[Message part 2 (text/html, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#70910; Package guix. (Mon, 13 May 2024 10:20:01 GMT) Full text and rfc822 format available.

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

From: Ludovic Courtès <ludo <at> gnu.org>
To: Ada Stevenson <adanskana <at> gmail.com>
Cc: "Artyom V. Poptsov" <poptsov.artyom <at> gmail.com>, 70910 <at> debbugs.gnu.org
Subject: Re: bug#70910: xdot has stopped working after update to 1.3
Date: Mon, 13 May 2024 12:18:53 +0200
Hi Ada,

(Cc: Artyom, who updated xdot in
a47fe0fdc4b13c850da29c0e11ab63d2041534c1.)

Ada Stevenson <adanskana <at> gmail.com> skribis:

> I was trying to use `xdot` to view to output of `guix graph` (`guix
> graph bash | xdot -`). However, it crashed instantly with the
> following stack trace:
>
>> dot: No such file or directory
>> Traceback (most recent call last):
>>   File
>> "/gnu/store/r9mrqfpci65hsypgm7r5kpzxlm6fcd1l-xdot-1.3/bin/.xdot-real",
>> line 33, in <module>
>>     sys.exit(load_entry_point('xdot==1.3', 'gui_scripts', 'xdot')())

Looks like the problem is that ‘dot’ is not in $PATH in your case.

On my machine, ‘dot’ is in $PATH because I also have it in my profile,
and thus ‘guix graph bash | xdot -’ works fine.

Artyom, I think we should replace the reference to ‘dot’ in the source
with its absolute file name, ‘/gnu/store/…/bin/dot’.  That way xdot
would work whether or not one has installed ‘graphviz’ independently.

Could you take a look?

Thanks,
Ludo’.




Information forwarded to bug-guix <at> gnu.org:
bug#70910; Package guix. (Mon, 13 May 2024 19:11:02 GMT) Full text and rfc822 format available.

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

From: "Artyom V. Poptsov" <poptsov.artyom <at> gmail.com>
To: 70910 <at> debbugs.gnu.org
Cc: Ludovic Courtès <ludo <at> gnu.org>,
 "Artyom V. Poptsov" <poptsov.artyom <at> gmail.com>
Subject: [PATCH] gnu: xdot: Bugfix: Add the directory containing "dot" to the
 PATH.
Date: Mon, 13 May 2024 22:08:52 +0300
"xdot" would always fail to run when graphviz "dot" binary is not available
directly in the user system.  This patch fixes it by adding graphviz binaries
from the inputs to the PATH environment variable in "xdot" wrapping script.

Reported by Ada Stevenson <adanskana <at> gmail.com> in
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=70910

* gnu/packages/graphviz.scm (xdot) [arguments]: Add the "bin" directory from
  the graphviz input to the xdot wrapping.

Change-Id: Iba4bbc37daf07407ad4c18b822956fbb730c0033
---
 gnu/packages/graphviz.scm | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/gnu/packages/graphviz.scm b/gnu/packages/graphviz.scm
index 0fc5c6024e..18f4fc147d 100644
--- a/gnu/packages/graphviz.scm
+++ b/gnu/packages/graphviz.scm
@@ -314,9 +314,12 @@ (define-public xdot
                    (add-after 'install 'wrap
                      (lambda* (#:key inputs outputs #:allow-other-keys)
                        (let ((out (assoc-ref outputs "out"))
+                             (graphviz (assoc-ref inputs "graphviz"))
                              (gi-typelib-path (getenv "GI_TYPELIB_PATH"))
                              (python-path (getenv "GUIX_PYTHONPATH")))
                          (wrap-program (string-append out "/bin/xdot")
+                           `("PATH" ":" prefix
+                             (,(string-append graphviz "/bin")))
                            `("GI_TYPELIB_PATH" ":" prefix
                              (,gi-typelib-path))
                            `("GUIX_PYTHONPATH" ":" prefix

base-commit: b23aa4c1d6ebbbee316d2f2bee87ad4ce7c67345
-- 
2.41.0





Information forwarded to bug-guix <at> gnu.org:
bug#70910; Package guix. (Tue, 14 May 2024 08:07:02 GMT) Full text and rfc822 format available.

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

From: Ada Stevenson <adanskana <at> gmail.com>
To: 70910 <at> debbugs.gnu.org
Cc: poptsov.artyom <at> gmail.com, Ludovic Courtès <ludo <at> gnu.org>
Subject: xdot has stopped working after update to 1.3
Date: Tue, 14 May 2024 07:08:46 +0000
Hi all,

I've tested the patch on a fresh checkout. LGTM!

Thanks for looking into this, Ludo', Artyom!

Warmly,

Ada





Reply sent to Sharlatan Hellseher <sharlatanus <at> gmail.com>:
You have taken responsibility. (Thu, 16 May 2024 22:27:02 GMT) Full text and rfc822 format available.

Notification sent to Ada Stevenson <adanskana <at> gmail.com>:
bug acknowledged by developer. (Thu, 16 May 2024 22:27:02 GMT) Full text and rfc822 format available.

Message #19 received at 70910-done <at> debbugs.gnu.org (full text, mbox):

From: Sharlatan Hellseher <sharlatanus <at> gmail.com>
To: 70910-done <at> debbugs.gnu.org 
Subject: xdot has stopped working after update to 1.3
Date: Thu, 16 May 2024 23:25:22 +0100
[Message part 1 (text/plain, inline)]
Hi,

Pushed as 0846eaecd45783bf40e8dc67b0c16f71068524b7 to master.

--
Oleg
[signature.asc (application/pgp-signature, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 14 Jun 2024 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 42 days ago.

Previous Next


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