GNU bug report logs - #73142
Erroring libsixel package's bash completions for img2sixel

Previous Next

Package: guix;

Reported by: elaexuotee <at> wilsonb.com

Date: Mon, 9 Sep 2024 12:12:01 UTC

Severity: normal

To reply to this bug, email your comments to 73142 AT debbugs.gnu.org.

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#73142; Package guix. (Mon, 09 Sep 2024 12:12:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to elaexuotee <at> wilsonb.com:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Mon, 09 Sep 2024 12:12:02 GMT) Full text and rfc822 format available.

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

From: elaexuotee <at> wilsonb.com
To: bug-guix <at> gnu.org
Subject: Erroring libsixel package's bash completions for img2sixel
Date: Mon, 09 Sep 2024 13:11:31 +0100
Hey!

The recent move of libsixel into mpv's propagated-inputs surfaced a bug in
our libsixel's bash completions. My bash sessions now start with an error:

    -bash: have: Command not found

This was introduced in commit 43df0d83 from https://issues.guix.gnu.org/72180.
In particular, tracing with `set -o xtrace' show that it originates in the
first command of share/bash-completion/completions/img2sixel:

    have img2sixel

Upstream has a relevant issue: https://github.com/libsixel/libsixel/issues/81.
Our configuration step might need to set --with-bashcompltiondir.

- BW




Information forwarded to bug-guix <at> gnu.org:
bug#73142; Package guix. (Mon, 09 Sep 2024 18:43:02 GMT) Full text and rfc822 format available.

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

From: elaexuotee <at> wilsonb.com
To: 73142 <at> debbugs.gnu.org
Subject: Re: Erroring libsixel package's bash completions for img2sixel
Date: Mon, 09 Sep 2024 19:42:24 +0100
It appears that share/bash-compltion/bash_completion performs an
`unset -f have' at the end of the script. This means that only the scripts
under /etc/bash_completion.d/ have access to `have', but said directory doesn't
even exist in our case.

That said, `have' is deprecated in favor of `_have' in 2.11, anyway. I have let
upstream libsixel know, but we could work around the issue with a
single-character patch:

diff --git a/converters/shell-completion/bash/img2sixel b/converters/shell-completion/bash/img2sixel
index 028651b..d96a326 100644
--- a/converters/shell-completion/bash/img2sixel
+++ b/converters/shell-completion/bash/img2sixel
@@ -1,6 +1,6 @@
 # bash completion for img2sixel

-have img2sixel &&
+_have img2sixel &&
 _img2sixel()
 {
     local cur prev





Information forwarded to bug-guix <at> gnu.org:
bug#73142; Package guix. (Sat, 07 Dec 2024 05:46:01 GMT) Full text and rfc822 format available.

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

From: Hilton Chain <hako <at> ultrarare.space>
To: 73142 <at> debbugs.gnu.org
Cc: Tobias Geerinckx-Rice <me <at> tobias.gr>, help-guix <at> gnu.org,
 elaexuotee <at> wilsonb.com, Nils Landt <nils <at> landt.email>,
 Einar Largenius <einar.largenius <at> gmail.com>
Subject: [PATCH] gnu: libsixel: Fix bash completion.
Date: Sat, 07 Dec 2024 13:44:58 +0800
* gnu/packages/image.scm (libsixel)[source]: Fix bash completion.

Fixes: https://issues.guix.gnu.org/73142
Reported-By: elaexuotee <at> wilsonb.com
Fixes: https://mail.gnu.org/archive/html/help-guix/2024-12/msg00029.html
Reported-by: Einar Largenius <einar.largenius <at> gmail.com>
Change-Id: I7e30bfa4ad6efcf27b2e89a42c34802b53bd30e0
---

Does this patch fix the issue?

 gnu/packages/image.scm | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm
index 7337a27b88..0367c08994 100644
--- a/gnu/packages/image.scm
+++ b/gnu/packages/image.scm
@@ -2831,7 +2831,12 @@ (define-public libsixel
              (commit (string-append "v" version))))
        (file-name (git-file-name name version))
        (sha256
-        (base32 "1nny4295ipy4ajcxmmh04c796hcds0y7z7rv3qd17mj70y8j0r2d"))))
+        (base32 "1nny4295ipy4ajcxmmh04c796hcds0y7z7rv3qd17mj70y8j0r2d"))
+       (modules '((guix build utils)))
+       (snippet
+        ;; https://github.com/libsixel/libsixel/issues/81
+        #~(substitute* "converters/shell-completion/bash/img2sixel"
+            (("have") "_have")))))
     (build-system meson-build-system)
     (arguments
      (list

base-commit: 006679d1e6ca7acea0629b4f019c8cf89cde08be
prerequisite-patch-id: f132b4af7b85df465998e4f459bf729f8b66f320
prerequisite-patch-id: 71423f8b55ad6f04c3f3d647cbd9d42c6c332e06
prerequisite-patch-id: be124126488f174ea7e3bff735083a3edc09619a
prerequisite-patch-id: 244ca7d9a3430a90876970592a78d05207ee1893
prerequisite-patch-id: 53dc53cf4e9f0bb6e2f2c55194f3bc75a7381106
--
2.46.0




Information forwarded to bug-guix <at> gnu.org:
bug#73142; Package guix. (Mon, 09 Dec 2024 09:22:01 GMT) Full text and rfc822 format available.

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

From: Einar Largenius <einar.largenius <at> gmail.com>
To: Hilton Chain <hako <at> ultrarare.space>
Cc: Tobias Geerinckx-Rice <me <at> tobias.gr>, 73142 <at> debbugs.gnu.org,
 Nils Landt <nils <at> landt.email>, help-guix <at> gnu.org, elaexuotee <at> wilsonb.com
Subject: Re: [PATCH] gnu: libsixel: Fix bash completion.
Date: Mon, 09 Dec 2024 10:20:26 +0100
Hi,

It turned out I sourced my completion incorrectly. When I changed my setup as per Nilss suggestion the issue stopped. I assume by sourcing it this way this issue is already taken into account and resolved elsewhere.

lördag den 07 december 2024 skrev Hilton Chain:

> * gnu/packages/image.scm (libsixel)[source]: Fix bash completion.
>
> Fixes: https://issues.guix.gnu.org/73142
> Reported-By: elaexuotee <at> wilsonb.com
> Fixes: https://mail.gnu.org/archive/html/help-guix/2024-12/msg00029.html
> Reported-by: Einar Largenius <einar.largenius <at> gmail.com>
> Change-Id: I7e30bfa4ad6efcf27b2e89a42c34802b53bd30e0
> ---
>
> Does this patch fix the issue?

-- 
Med vänliga hälsningar Einar




This bug report was last modified 187 days ago.

Previous Next


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